Abstract:
A multiple wave generator for an electronic musical instrument which has a wave data memory storing plural data samples of a wave shape, a wave address register storing wave address data partially designating sampled data in the wave data memory, a difference address register storing difference address data which specifies incremental address amount, a wave address calculator adding the wave address data to the difference address data and writing into the wave address register, the summed address data being separated into wave memory address data and partial address data, and a wave calculator. The wave memory address data, which are part of the wave address data, are applied to the wave data memory for reading out one data sample, and the one data sample and the partial address data are applied to the wave calculator for calculating interpolated wave sample data corresponding to the wave memory address and the partial address.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to an electronic musical instrument and more particularly to a novel musical wave generator which generates plural waves having different frequencies using interpolation calculation of wave sample data. 
     2. Description of the Prior Art 
     A conventional wave generator for an electronic musical instrument utilizing digital systems has a digtial memory storing samples of a complex wave shape of a musical tone. The samples in the memory are read out by a clock pulse and converted to analog signals. The analog signals have the shape of the musical tone. The analog signals are multiplied by an envelope signal. Such systems have several problems. 
     The first problem is wave calcuation. Timbre of musical tone is determined by level of harmonics. A complex wave shape of the tone can be calculated by inverse Fourier calculation of the level data. When the level data are changed from one timbre to another, the inverse Fourier calculation must be executed. This calculation takes too much time. So, an electronic musical instrument cannot produce a new timbre immediately after a timbre switch is operated. 
     The second problem is that timbre does not change during onset and end of the tone. To change the timbre, the inverse Fourier calculation must be done all the time, but speed of the calculation is not fast enough, so this is impractical. Therefore, good sounds having realistic image of a trumpet or a violin cannot be generated. 
     The third problem concerns clock signal frequency. For generating musical scales C, C♯, D, . . . . , B, twelve clock frequencies are prepared and one of them is used as clock signal frequency. This method is convenient for monophonic musical instruments, but not for polyphonic musical instruments. When C and C♯ should be generated, these two frequencies are different from each other, so a single clock frequency system cannot be adopted. The system becomes too complicated, because synchronizing two frequencies of C and C♯ is necessary. 
     The fourth problem is that it is hard to obtain frequency resolved precisely at will unless very large memory is prepared. 
     SUMMARY OF THE INVENTION 
     It is therefore an object of the present invention to provide a multiple wave generator which can generate plural waves having different frequencies. 
     Another object of the present invention is to provide a wave generator which utilizes an interpolating calcuation of wave sample data for reduction of size of wave memory avoiding degradations in accuracy of frequency and wave shape, in other words, S/N. 
     A further object of the present invention is to provide a wave generator which can be used for synthesizing very natural sounds having timbre change during onset and end of tones. 
     These and other objects and features of the present invention will be made clear from the following detailed description of the invention considered together with the accompanying drawings wherein: 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a wave form diagram showing the principle of wave generation of the present invention; 
     FIG. 2 is a block diagram of an embodiment of the present invention; 
     FIG. 3 is a block diagram of another embodiment of the present invention; 
     FIG. 4 is a process diagram of data conversion and calculation; 
     FIG. 5 is a block diagram of a further embodiment of the present invention; 
     FIG. 6 is a detailed block diagram of an arrangement for frequency data transfer; 
     FIG. 7 is a time chart describing operation of data transfer; 
     FIG. 8(a) is a logic circuit diagram of an example of a renewal controller; 
     FIG. 8(b) is a time chart of the renewal controller shown in FIG. 8(a); 
     FIG. 9 is another detailed block diagram of an arrangement for frequency data transfer; 
     FIG. 10 is a logic circuit diagram of an example of another renewal controller used in the embodiment of FIG. 9; 
     FIG. 11 is a time chart of another renewal controller; 
     FIG. 12 is a diagram showing sinusoidal wave samples stored in a wave memory; and 
     FIG. 13 is a block diagram of an embodiment of a wave calculator. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 shows an example of a sinusoidal wave shape. Referring to FIG. 1, a solid line shows an exact sinusoidal wave. A period of the wave is divided into N segments, wherein N=L×M. N, L and M are positive integers, respectively. The period of the wave is divided by L and each of the points of division is denoted as x 0 , x 1 , x 2 , . . . , x i , . . . , x L-1 . There are M points in a section between x i  and x i+1 . These M points are represented by x ij , wherein j=0, 1, 2, . . . , j, . . . , (M-1). The points of N are represented by x ij , wherein i=0, 1, 2, . . . , i, . . . , L-1, j=0, 1, 2, . . . , j, . . . , M-1. x i  is equal to x i0 . 
     A phase of the period is 2π radians. A phase of the point x ij  is represented by θ ij . 
     
         θ.sub.ij =(2π/N)×(Mi+j)                     (1) 
    
     The sinusoidal wave of FIG. 1 is represented by ##EQU1## A is an amplitude of the sinusoidal wave. 
     The present invention intends to generate N samples of f(x ij ) from L samples of x i0 . (N-L) samples of x ij  (J≠0) are calculated by interpolation. A linear interpolation between x i+1 ,0 and x i ,0 is represented by ##EQU2## When f(x ij ) is sinusoid, f(x ij ) is ##EQU3## 
     In the following explanation, L is 2048 (=2 11 ) and M is 128 (=2 7 ). N=262144=2 18 . Therefore, i, j and (ij) are represented by 11, 7 and 18 bits of binary numbers. 
     FIG. 2 shows an embodiment of the present invention. Referring to FIG. 2, 1 is a wave address register (AREG) and 2 is a difference address register (JREG). The wave address register 1 and the difference address register contain 72 read/write memories, respectively. Each word of the 72 memories is composed of 18 bits. A slot counter 3 counts to 72 and cyclically selects one of the 72 read/write memories. A clock signal φ 0  is applied to the slot counter 3. A clock signal φ 1  and φ 2  are applied to the wave address register 1 and the difference address register 2. The clock signal φ 1  is a read signal RD. This signal RD will read out contents of the memory designated by the slot counter 3. The clock signal φ 2  is a write signal WR. When the WR signal is applied to the wave address register 1, a new address datum from a full adder (FAD1) 4 is written into the memory selected by the slot counter 3. The full adder (FAD1) 4 adds an output datum of the wave address register 1 and the difference address register 2, and applies a sum datum to the wave address register 1. These are an address calculating block. 
     The address calculating block adds the wave address datum WA p  (nT) at nT and the difference address datum D p  (nT) to produce WA p  (nT+T) by the following equation. 
     
         WA.sub.p (nT+T)=WA.sub.p (nT)+D.sub.p (nT)                 (4) 
    
     T is a sample period. n is the number of samples per unit time. p is 0-71 and represents the number designating one of the 72 read/write memories. The period of clock signal φ 1  is T c . 72×T c  is equal to sample period T. The period of φ 0  and φ 2  is also T c . A set of φ 0 , φ 1 , φ 2  composes one time slot. During each time slot, the equation (4) is executed. 72 time slots will calculate the equation of (4) for p=0 to 71. The 72 contents of the wave address register 1 are incremented by D p  (nT) (p=0-71), respectively. 
     An output datum of the wave address register 1 is applied to a wave data memory and a wave data calculator. The wave data memory is composed of the first wave data memory (ROM1) 5 and the second wave data memory (ROM2) 6. The ROM2 contains wave data f(x i0 ). ##EQU4## wherein i=0, 1, 2, . . . , i, . . . , L-1. i is represented by an 11 bit binary number. So f(x i0 ) are 2048 data samples. The ROM1 stores differential samples represented by the next equation. ##EQU5## Δf(x i ,0) are also 2048 data samples. Actually, the data f(x i ,0) and Δf(x i ,0) are digitized data. 
     The output datum of the ROM1 is applied to one input of a multiplier (MPY) 7. Another input terminal of the multiplier 7 receives a partial address j of the wave address datum. The output datum of the multiplier 7 is applied to a divider 8 and is divided by M. The output datum of the divider 8 is represented by the following equation. ##EQU6## The datum is added to the output of the ROM2 by a full adder (FAD2) 9. An output datum of the FAD2 can be represented as follows: ##EQU7## f(x ij ) is an approximation of a sinusoidal wave and is shown by a dashed line in FIG. 1. The dashed line is a sinusoidal wave interpolated linearly. The number L and M can be any positive integer mathematically. But practically L and M had better be powers of 2. 
     When L=2048 and M=128, L and M can be represented by binary numbers of 11 bits and 7 bits, respectively. (ij), i.e. (Mi+j), can be represented by an 18 bit binary number. The lower 7 figures (bits) of (mi+j) coincide with a binary representation of j. The upper 11 bits of (Mi+j) become i. The lower 7 bits can be used as a partial address. The upper 11 bits can be used as an address datum of ROM1 and ROM2. i and j can be separated very easily. The divider 8 can be a 7 bit shifter, because M is 128. 
     ROM1, the multiplier 7, the divider 8 and the full adder 9 compose a wave calculator executing linear interpolation. ROM1, which is a difference wave data memory, can be replaced by a subtractor taking the difference of adjacent wave samples. 
     FIG. 3 shows another embodiment of the present invention. Referring to FIG. 3, ROM3 operates as the multiplier 7 and the divider 8 in FIG. 2. ROM1 stores the differential samples Δf(x i0 ). When L is a very large number, Δf(x i0 ) becomes small. M also becomes small. When the sample data stored in ROM1 are represented by 12 bits. A becomes 2047. The differential samples Δf(x i0 ) can be represented by 4 bits including sign bit. On the other hand, j is 7 bits. Input data of ROM3 is (4+7) bits. When output of ROM3 is 4 bits datum, then size of ROM3 is 
     
         2.sup.11 ×4=2048×4=8192 bits. 
    
     The output datum of ROM3 is approximately 
     
         Δf(x.sub.i0)(j/M) 
    
     FIG. 4 shows word length of respective stages shown in FIG. 3. The wave address data (Mi+j) are separated into the wave memory address i and the partial address j. The wave memory address i is converted to the wave datum of ROM2 and the differential sample datum fo ROM1. The datum of ROM1 and j are converted to the output of ROM3. The output of ROM2 and ROM3 are added. ROM3 containing 8192 bits is smaller and simpler than the multiplier 7 and the divider 8. 
     The embodiments shown in FIG. 2 and 3 must generate wave samples f(x ij ) within clock period T c . Cumulative delay time of ROM1, multiplier 7 and divider 8 must be less than the delay time of ROM2 in FIG. 2. Therefore, ROM1, multiplier 7 and divider 8 must operate very fast. 
     FIG. 5 shows a pipe line structure. These are 4 D-latches before and behind ROM1, ROM2, ROM3 and full addter (FAD2) 9. The clock signal φ 0  shifts data to subsequent stages. Each of ROM1, ROM2, ROM3 and the full adder 9 must put out data to the subsequent stages within clock period T c , so high speed logic circuits are not necessary. 
     The following is how to determine and change frequency of the wave. The wave address datum WA p  (nT) is obtained by equation (4). The wave address datum WA p  (nT) increases one by one, when 
     
         D.sub.p (nT)=1 
    
     And one complete wave, such as the sinusoidal wave of FIG. 1, is generated by N sample periods. When 
     
         D.sub.p (nT)=2 
    
     N sample periods generate two cycles of the wave. When 
     
         D.sub.p (nT)=J 
    
     J waves are generated during N sample periods. Accordingly, frequency F(J) of the wave can be represented by 
     
         F(J)=(J/NT), 
    
     wherein T is the sample period. In the case of N=2 18  and T=28 μs, 
     
         F(J)=0.1362392 J(Hz). 
    
     J ranges from 0 to 2 18  -1. When J=0, the same sample amount is obtained. This is a DC signal. When J=2 16 , 4 samples form one wave the frequency of which is 8928 Hz. When J=2 17 , the frequency is 17,857 KHz. 
     The difference address datum D p  (nT) is stored in the JREG2 of FIG. 2. When the frequency F(J) must be changed, the D p  (nT) is rewritten by a microcomputer 200 and a buffer memory 100, referring to FIG. 2. The microcomputer 200 transfers new wave address datum WA p  (oT) and new diference address datum D p  (oT) to the buffer memory 100 at arbitrary timing. After that, the new WA p  (oT) and D p  (oT) are transferred to the AREG1 and the JREG2 at the time slot p. FIG. 6 shows detailed embodiment of the microcomputer 200 and the buffer memory 100. This embodiment transfers only D p  (xT). 
     Referrring to FIG. 6, 1 is the wave addres register, 2 is the difference address register and 3 is the slot counter, as described in FIG. 2. The output data from the full adder 4 in FIG. 2 is applied to data input terminal DI of the wave address register 1. 22 is a difference address buffer register which stores new difference address data temporarily and is composed of 72 words of memory. Each memory corresponds to a respective time slot p. A selector 20 receives slot number from the slot counter 3, the clock signal φ 1  (RD), address data and a write signal WR2 from the microcomputer 200. When renewal signal RNW is &#34;0&#34;, the selector 20 selects the address data and the WR2, and supplies them to the difference address buffer register 22 (JBR). When RNW is &#34;1&#34;, the slot number and the RD1 are applied to the JBR. 
     The clock signal φ 0  counts up slot number of the slot counter 3. This new slot number is applied to the wave address register 1 and the difference address register 2 for designating memories corresponding to the new slot number. After that, the clock signal φ 1  reads out the wave address datum WA p  (nT) and the difference address datum D p  (nT) from the designated memories and supplies them to the full adder 4. After that, the clock signal φ 2  writes output datum WA p  (nT+T) of the full adder 4 into the wave address register 1. When RNW is &#34;0&#34;, an AND gate 25 blocks the clock signal φ 2  (WR1) and the difference address datum D p  (nT)=J is not changed. Therefore, a sinusoidal wave of frequency F(J) is generated. 
     When the frequency F(J) is changed to another F(J&#39;), the following operation is executed. The microcomputer 200 outputs address data corresponding to the slot number and new difference address datum D p  (oT), and further output WR2. The renewal signal RNW is &#34;0&#34;. So, the selector 20 selects address datum and WR2. The new difference address datum D p  (oT) are written in the memory of the difference address buffer register 22. When the difference address datum D p  (nT) should be changed for all time slots (p=0, 1, 2, . . . , 71), the microcomputer writes new D p  (oT) (p=0, 1, 2, . . . , 71) to all of the memories in the buffer register 22 corresponding to the slot number p. After that, the microcomputer 200 puts out a SET signal to a renewal controller 24. The slot counter 3 generates a signal SLOTO when the slot number p=0. The first signal SLOTO, after the SET signal is generated, will output the RNW signal &#34;1&#34;. The second SLOTO will change the RNW signal to &#34;0&#34; again. Therefore, the RNW signal stays &#34;1&#34; for 72 time slots. When the RNW signal is &#34;1&#34;, the difference address buffer register 22 is accessed by the slot counter 3 and the contents of the register 22, i.e. D p  (oT)s, are read and put out from output terminals DO at φ 1  (RD1=1). The read out data D p  (oT)s are written into the 72 memories of the difference address register 2. After that, the RNW signal becomes &#34;0&#34;. New difference address data D p  (oT)s are read out, at φ 1 , from the difference address register 2 and the sample signal of new frequency are calculated. 
     FIG. 7 shows a time chart of the signals φ 0 , φ 1 , φ 2 , SET, SLOTO and RNW. FIG. 8(a) shows an example of the renewal controller 24. The renewal controller 24 is composed of 4  D-flipflops and 4 AND gates. FIG. 8(b) is a time chart of the renewal controller 24. 
     The embodiment of FIG. 6 does not rewrite the wave address data WA p  (nT) to new WA p  (oT), so the phase of the new sinusoidal signal is decided by the last phase of the old sinusoidal signal. The old signal is smoothly connected to the new signal. This is convenient for frequency change of vibrato and portamento effects. 
     When the new frequency signal should start at a predetermined phase, a new wave address data WA p  (oT) must be loaded to the wave address data register 1 as well as D p  (oT) to the difference address data register 2. FIG. 9 shows an embodiment which can load both WA p  (oT) and D p  (oT). Referring to FIG. 9, 30 is a slot number latch, 32 is a wave address latch and 34 is a difference address latch. The data buss and WR signal of the microcomputer 200 are connected to each of the latches 30, 32 and 34. The address signal AD of the microcomputer 200 is decoded in the address decoder 31, 33, 35 and selects one of the latches 30, 32, 34. The microcomputer 200 can select one of the latches 30, 32, 34 and can write the slot number p, the wave address data WA p  (oT), the difference address data D p  (oT) to the respective latches 30, 32, 34 by WR signal. 36 is a comparator which outputs a coincidence signal CI &#34;1&#34; when the output of the slot counter 3 is equal to the slot number in the slot number latch 30. 37 is a renewal controller which generates RNW signal in accordance with the coincidence signal CI and a SET signal from the microcomputer 200. 38 is a data selector selecting one of the data from the full adder 4 and the wave address latch 32. The data selector 38 selects the wave address latch 32 when the RNW is &#34;1&#34;. 
     When the SET signal is &#34;0&#34;, the RNW is &#34;0&#34;. So, the sinusoidal wave is generated regularly the same as described in FIG. 6. If the frequency of the wave in slot number p is to be changed, a slot number p, a wave address datum WA p  (oT) and a difference address datum D p  (oT) are latched in the latches 30, 32, 34. After that, the microcomputer 200 puts out SET signal &#34;1&#34;. As shown in FIG. 11, the first coincidence signal CI, after the SET signal is generated, is output as RNW signal. At the time slot when this RNW appears, the new WA p  (oT) is loaded to the wave address register 1 and the new D p  (oT) is loaded to the difference address register 2. When the slot number p is incremented to p+1, the renewal controller 37 generates a signal END and changes the RNW signal to &#34;0&#34;. Therefore, at time slot p+1, the wave sample of address WA p+1  (nT) is generated. The frequency is not changed in this time slot p+1. The time slot is increased as p+1, p+2, . . . , 71, 0, 1, . . . and when it becomes p again, then, the wave sample of slot p is generated in accordance with WA p  (oT) and D p  (oT). This wave sample has new frequency of D p  (oT)=J&#39;. 
     The waves start from new wave address, therefore, phase of the wave can be set at will, in the embodiment of FIG. 9. The microcomputer 200 must not load new slot number p&#39;, wave address data WA p&#39;  (oT) and difference address data D p&#39;  (oT) until the END signal generates. The END signal is used as an interrupt signal, for the microcomputer, which informs that data transfer is completed and new data can be loaded to the latches 30, 32, 34. 
     FIG. 10 shows an example of the renewal controller 37 of FIG. 9. FIG. 11 is a time chart of the renewal controller 37. 
     The ROM1, ROM2, ROM3 of FIG. 2 and FIG. 3 can be random access memories (RAM). By rewriting the content of these memories, waveforms other than sinusoidal waves can be generated and plural kinds of wave shapes can be generated. The slot number p is 72 in the above description. So, 72 kinds of independent frequency signals can be generated in time-multiplexed way. The number p is not restricted to 72. 
     When the wave form is sinusoidal, the size of memory can be reduced. FIG. 12 shows samples of sinusoidal wave, wherein i=0-(L/4. ROM2 stores digitized data of 
     
         A sin (2π/N) Mi i=0, 1, 2, . . . ,(L/4) 
    
     as shown by black dots in FIG. 12. ROM1 stores digitized data represented by ##EQU8## This is shown, in FIG. 12, by white dots. 
     The circuit shown in FIG. 13 can generate a whole sinusoidal wave from a quarter sinusoidal wave of FIG. 12. Referring to FIG. 13, 4 is a full adder summing WA p  (nT) and D p  (nT). A summed datum WA p  (nT+T) is applied to the wave address register 1. WA p  (nT+T) is composed of 18 bits D 0  -D 17 . D 0  -D 6  is partial address datum. D 7  -D 17  is wave memory address. D 17  is a sign bit of the sinusoidal wave. D 16  represents difference of phase area ##EQU9## D 7  -D 15  respresents ##EQU10## D 0  -D 15  is applied to the selector 41. D 6  -D 15  is applied to a complement generator 40. 2&#39;s complement of D 0  -D 15  is applied to the selector 41. The selector 41 selects D 0  -D 15  when D 16  is &#34;0&#34;, i.e. phase is 0-(π/2) and π-(3π/2). When D 16  is &#34;1&#34;, 2&#39;s complement of D 0  -D 15  is selected. Accordingly, selector 41 generates number i increasing and decreasing cyclically between 0 and (L/4)-1. D 16  is applied to the most significant bit of address of ROM1 and ROM2 for reading out f(x ij ), wherein i=(L/4), J=0. D 17  is used as the sign bit. ROM1 stores positive differential data, so the sign bit is not necessary. Input data of the full adder 47 are only positive numbers. Therefore, the full adder 47 need not be a full adder/subtractor. Wave address N becomes about N/4, so memory size can be reduced to about a quarter of the embodiment in FIG. 2 or FIG. 3. 
     In the above description, calculation of interpolation is linear. Other interpolations such as 2nd order function or other functions can be applied in the wave calculator. Waveforms other than sinusoids can be generated by storing other data in ROM1, ROM2 and ROM3. 
     The present invention utilizes an interpolation calculation, therefore, the wave data memory ROM2 (6) is only needed for storing the L sample data of the sinusoidal wave instead of N=L×M samples. Hence, the amount of data is reduced to one M-th of the former art&#39;s amount of data. L, M, N are powers of 2. So the wave memory address is easily separated from the partial address data. Even if L is not so large, N can be very large, so frequency of a wave can be resolved precisely. The interpolation calculation produces rather accurate wave sample data of original wave shape, so digitized noise contained in the output wave signal is very small and good tone quality is obtainable, compared with the method of rounding or truncating the wave address. 
     72 time slots are installed and 72 wave address memories and 72 difference address memories are prepared. Therefore, 72 different frequency signals of the same wave can be generated in time-multiplexed way. These 72 signals can be used as fundamental and harmonics of a musical wave signal. These 72 signals are multiplied by envelope signals of every component of the musical wave signal. Therefore, very natural sounds can be synthesized. 
     While particular embodiments of the invention have been shown and described, it will be apparent to those skilled in the art that numerous modifications and variations can be made in the form and construction thereof without departing from the fundamental principles of the invention. It is, therefore, desired by the following claims, to include within the scope of the present invention all similar and modified forms of the apparatus disclosed, and by which the results of the invention can be obtained.