1. Field of the Invention
The present invention relates to a filter device and an electronic musical instrument equipped with the filter device.
2. Description of the Related Art
Tone color of an acoustic musical instrument is changed according to change of the amplitude ratio of a harmonic tone in relation to a fundamental tone. In particular, when tone color is changed according to strong and weak of performance, as a musical instrument is performed strongly (for example, a piano key is touched strongly), the amplitude ratio of a high order harmonic tone becomes higher. Meanwhile, as the musical instrument is performed weakly (for example, the piano key is touched weakly), the amplitude ratio of the high order harmonic tone becomes smaller.
The existing filter transfer function is shown in the following Formula 1.
where ω0=2pfc/fs (0<ω0<1)
where fc represents a cutoff frequency, fs represents a sampling frequency, ω0 represents a cutoff angle frequency, and Q represents selectivity.
In the existing filter circuit, the filter characteristics are changed according to ω0 (or fc) and Q. Therefore, the filter circuit uses ω0 (or fc) and Q as parameters, and the characteristics are changed based on these parameters.
Further, currently, many electronic musical instruments employ the PCM method. In the PCM method, an attack-time waveform when musical sound is generated (attack time) and waveform data of the subsequent repetition waveform are stored in the waveform memory. On and after the attack time, the waveform data of the repetition waveform is repeatedly read, and thereby the capacity of the waveform memory is decreased. However, when only the same waveform is repeated, the color tones are fixed and monotonized. Therefore, the tone colors are changed as time goes on by the filter circuit. In particular, in an acoustic piano, the higher order harmonic tone is more fastly attenuated as time goes on. It has not been possible to realize such a change by the existing filter circuit.
For example, in Japanese Laid-Open (Kokai) Patent Publication No. 4-78213, a filter using a specific frequency f0 in which the transfer characteristics start to change and the change ratio thereof as a parameter instead of the cutoff frequency fc is suggested. However, even when the filter disclosed in the foregoing patent document is used, it has been particularly difficult to realize change equal to the tone color change of an acoustic piano. In particular, there has been the following problem. That is, the frequency in which the maximum attenuation level or the maximum enhancement level of a given frequency is changed to a given ratio thereof (hereinafter referred to as “turnover frequency” in the specification) is moved according to change of the parameter.
In view of the existing problems, it is an object of the present invention to provide a filter device capable of realizing tone color change equal to tone color change of an acoustic musical instrument, in particular an acoustic piano, and an electronic musical instrument.
In accordance with an aspect of the present invention, there is provided a filter device comprising: a filter coefficient outputting means for outputting a set of filter coefficients; and a filter means for providing filter processing based on filter characteristics determined by the set of filter coefficients outputted from the filter coefficient outputting means for a musical sound signal having a given frequency supplied from the outside; wherein the filter coefficient outputting means comprises: a parameter table having a first memory storing a plurality of sets of filter coefficients in the filter means that are associated with a first parameter based on each of a plurality of frequencies and a second parameter based on each of a plurality of levels representing a degree of attenuation or enhancement of a gain of a filter in the filter characteristics; and a filter coefficient generating means for extracting a relevant set of filter coefficients from the first memory of the parameter table with the use of the first parameter and the second parameter determined according to the frequency and a strength of the supplied musical sound signal, and outputting the extracted set of filter coefficients to the filter means.
The above and further novel features of the present invention will more fully appear from the following detailed description when the same is read in conjunction with the accompanying drawings. It is to be expressly understood, however, that the drawings are for the purpose of illustration only and are not intended as a definition of the limits of the invention.
The present invention will hereinafter be described in detail with reference to a first embodiment shown in the accompanying drawings.
The microcomputer 1 controls the entire electronic musical instrument, reads a program and data from the ROM 2 storing programs and data, and executes the program. Data and the like generated by executing a program are stored in the RAM 3 as a work area. The switches 4 are arranged on the console panel of the electronic musical instrument. The microcomputer 1 detects a performer's operation on the switches 4. The touch detection circuit 5 transmits a scanning signal to the keyboard 6 at a given timing. The touch detection circuit 5 generates performance operation data (sound pitch and touch response data) in response to turning on 2 switches arranged on each key of the keyboard 6, and outputs the generated performance operation data to the microcomputer 1. In this embodiment, the keyboard 6 has 88 keys. Each key is arranged with 2 switches in the longitudinal direction. When a key is touched, the first switch is turned on. Then, when the key is further touched, the second switch is turned on.
The microcomputer 1 controls the musical sound generation circuit 7 to generate a given musical sound based on the tone color designated by operating the switches 4 and the performance operation data including the touch response data and the sound pitch outputted from the touch detection circuit 5. The musical sound generation circuit 7 reads the waveform data of the tone color designated by the waveform ROM 8, generates a musical sound with the sound pitch and the sound volume (velocity) according to the performance operation data, and outputs the musical sound to the DAC 9. The DAC 9 converts the digital data outputted from the musical sound generation circuit 7 to an analog signal. The analog signal is emitted from the speakers 11, 12 via the amplification circuit 10.
The interface 20 is connected to the data bus 13 shown in
The filter coefficient circuit 26 calculates a filter coefficient according to a parameter based on a performance operation signal given from the microcomputer 1 via the interface 20 and a first envelope signal that is outputted from the first envelope generation circuit 25 and is changed as time goes on. The frequency characteristics are changed according to the first envelope signal, and thus the filter coefficient is changed as time goes on. The filter circuit 22 provides filter processing for musical sound waveform data according to the filter coefficient.
The multiplier 23 multiplies the musical sound waveform data by a second envelope signal that is outputted from the second envelope generation circuit 27 and is changed as time goes on. Thereby, rise and decay of musical sounds corresponding to turning on/off the keys of the keyboard 6 and the sound volume corresponding to the touch response data are controlled. The waveform generation circuit 21, the filter circuit 22, the first envelope generation circuit 25, the filter coefficient calculation circuit 26, the multiplier 23, and the second envelope generation circuit 27 can process the maximum simultaneous sound number in a manner of time division, and thereby can generate the sufficient number of channels of musical sounds for keyboard performance. The mixer 24 accumulates the generated musical sounds of the channels of the maximum simultaneous sound number with the use of a given weighting, and finally allocates the result as 2 right and left channel musical sounds. The output from the mixer 24 is outputted to the DAC 9.
A description will hereinafter be given of outlines of the filter circuit 22 and the filter coefficient calculation circuit 26 according to the present invention.
As shown in
Hereinafter the point (frequency) on which attenuation or expansion is started linearly based on the fundamental wave is referred to as reference frequency; the attenuation amount (dB) in the frequency one half of sampling frequency fs is referred to as gain; and the frequency in which the gain is changed to a given ratio thereof (in this embodiment, the frequency in which the attenuation amount in fs/2 is changed to one half thereof) is referred to as turnover frequency. The degree of linear attenuation or linear expansion from the reference frequency is referred to as slope. For the slope, the frequency axis is indicated as the x axis, and the attenuation amount is indicated as the y axis. Therefore, the larger the negative attenuation amount is, the smaller the slope in the frequency characteristics is. As the negative attenuation amount becomes closer to 0, the slope becomes larger and gets closer to 0. The larger the positive attenuation amount is, the larger the slope in the frequency characteristics is.
Further, in this embodiment, as the fundamental wave is changed, the reference frequency is changed. As the reference frequency is changed, the turnover frequency is changed according to a constant rule.
In this embodiment, as described later, the filter circuit is controlled by the turnover frequency changed based on the fundamental wave and the gain representing the filter depth. Thereby, the higher harmonic wave element in relation to the fundamental wave controlled almost similarly to the actual tone color change of an acoustic piano is realized.
In this embodiment, consideration is made for not only attenuating the higher harmonic wave element but also expanding the higher harmonic wave element. Thereby, the tone color from the PCM data of the waveform ROM 8 can be changed more extensively. To realize such characteristics, the FIR (Finite Impulse Response) filter is suitably used. However, the FIR filter includes a large computing amount, thereby necessitates a large scale of hardware. Therefore, in this embodiment, the characteristics approximate to the ideal filter characteristics shown in
To obtain the filter having the foregoing filter characteristics, various methods are supposable. To minimize the, computing amount, approximation in the primary IIR filter was tried, which was extended and thereby frequency characteristics close to the ideal characteristics were obtained. First, the transfer function of the primary IIR filter is expressed as Formula 2.
In Formula 2, where the maximum gain is expressed as A (that is, the maximum gain in the frequency one half of sampling frequency fs is expressed as A), A can be expressed as Formula 3.
Where the maximum gain is changed to one half thereof in turnover frequency f0, Formula 4 can be derived.
When the foregoing formulas 3 and 4 are resolved, coefficients b and c can be expressed as shown in Formulas 5 and 6.
Therefore, coefficients b and c of the primary IIR filter shown in Formula 2 can be obtained as shown in Formulas 5 and 6, with the use of maximum gain A and turnover frequency f0. Though 2 sets of the filter coefficients can be obtained with the use of the foregoing Formula 5, one thereof that is easily controlled based on the coefficient range can be selected.
The attenuation characteristics of the primary IIR filter are excessively moderate. Therefore, in this embodiment, 2 primary IIR filters with the turnover frequency different from each other are connected in series to obtain a secondary IIR filter, and thereby filter characteristics more approximate to the ideal filter are obtained. Formula 7 shows the transfer function of the secondary IIF filter in which the primary IIR filters are connected in series.
The filter coefficients for the positive gain can be calculated by exchanging the denominator and the numerator in the foregoing Formula 7 (refer to Formula 8).
Therefore, by respectively exchanging negative gain coefficients b to f as b:e/d, c:f/d, d:l/d, e:b/d, and f:c/d, the filter coefficients for the positive gain characteristics can be obtained.
In this embodiment, the filter coefficients are not calculated by computing. Appropriate filter coefficients are calculated by providing a table (parameter table) with the address of the turnover frequency and the gain level for the filter coefficient calculation circuit 26, extracting a data value from the table, and interpolating the data value.
For example, in
When the set of filter coefficients for each gain is retained for every turnover frequency, an extremely large table (the set number of turnover frequencies×the set number of gains×types of filter coefficients (5)) should be prepared. Thus, the set number of turnover frequencies and the set number of gains are limited, only a table storing a series of filter coefficients corresponding to the combinations thereof is prepared, and interpolation (two-dimensional interpolation) is realized for both the turnover frequency and the gain, and thereby the table size is decreased and the filter coefficients are set appropriately.
Formula 9
H(z)=f2/(1+(−2+f2+f/Q)z−1+(1−f/Q)z−2) (9)
Therefore, filter coefficients e and f are fixed as e=0 and f=0.
A description will be given in more detail of structures of the filter coefficient calculation circuit 26 and the filter circuit 22 according to this embodiment.
The interface 31 is connected to the internal bus 28 of the musical sound generation circuit 7. The interface 31 receives and retains 2 types of parameters that are transmitted via the interface 20 from the microcomputer 1, that is, turnover frequency data F [15:0] and gain data G [15:0], and outputs such data into the filter calculation circuit 26. Turnover frequency data F corresponds to the foregoing turnover frequency. Gain data G corresponds to the foregoing gain. Gain data G [15:0] is given to the adder 32. As the other input, the first envelope signal changed as time goes on is given from the first envelope generation circuit 25 to the adder 32. Therefore, the value of the gain data G [15:0] outputted from the adder is changed as time goes on based on the first envelope signal.
Out of gain data G [15:0], G [15:12] is given to the adder 33. Further, out of turnover frequency data F [15:0], F [15:13] is given to the adder 45. In the adders 33, 34, if necessary, increment signal “1” is added at a given time, and the result is outputted as an address of the parameter table 35. In the adder 33, by adding increment signal X1 at the next timing subsequently to outputting G[15:12], continuing address (G[15:12]+1) can be outputted. In the adder 34, by adding increment signal Y1 at the next timing subsequently to outputting F [15:13], continuing address (F [15:13]+1) can be outputted.
A signal is given from the adder 33 to lower address A [4:0] of the parameter table 35. A signal is given from the adder 34 to upper address A [8:5]. Selection signal SEL is given from the control circuit (not shown) to the uppermost address A [11:9].
In this embodiment, the parameter table 35 stores 9 types of turnover frequencies×(hereinafter, “×” indicates “multiplied by”)17 types of gains (8 types of negative gains, gain “0” and 9 types of positive gains)×5 types of filter coefficients. Therefore, the parameter table 35 stores 9×17×5=765 word filter number.
For the turnover frequency, to interpolate the upper 3 bit (8 types) values with lower 13 bits, 9 types of addresses are prepared. For the gain, to interpolate the upper 4 bit (16 types) values with lower 12 bits, 17 types of addresses are prepared. The selection signal SEL is used for selecting one of 5 types of coefficients b to f.
Output from the parameter table 35, that is, the set of the filter coefficients before interpolation is given to the interpolation circuit 36. Lower data F [12:0] of the turnover frequency data and lower data G [11:0] of the gain data are given to the interpolation circuit 36. In the interpolation circuit 36, 5 types of interpolated filter coefficients b to f are calculated and outputted. The registers 37 to 41 respectively retain interpolated filter coefficients b to f that are sequentially outputted.
The subtracter 55 calculates a difference value obtained by subtracting output of the register 51 from output of the register 52. The difference value is multiplied by lower data G [11:0] of the gain data in the multiplier 56. The resultant multiplication value is outputted to the adder 57. The adder 57 adds the multiplication value to the output from the register 51. The resultant additional value is stored in the register 58.
In the same manner, the subtracter 65 calculates a difference value obtained by subtracting output of the register 54 from output of the register 53. The difference value is multiplied by lower data G [11:0] of the gain data in the multiplier 66. The resultant multiplication value is outputted to the adder 67. The adder 67 adds the multiplication value to the output from the register 53. The resultant additional value is stored in the register 68.
Further, the subtracter 70 calculates a difference value obtained by subtracting output of the register 58 from output of the register 68. The difference value is multiplied by lower data F [12:0] of the turnover frequency data in the multiplier 71. The resultant multiplication value is outputted to the adder 72. The adder 72 adds the multiplication value to the output from the register 58. Output from the adder 72 becomes an interpolated filter coefficient.
A description will be hereinafter given of two-dimensional interpolation according to this embodiment.
Register 51: o [x, y] (o [x, y] represents output of the parameter table 35 where address is xy.)
Register 52: o [x+1, y]
Register 53: o [x, y+1]
Register 54: o [x+1, y+1]
The subtracter 55 subtracts output o [x, y] of the register 51 from output o [x+1, y] of the register 52. The multiplier 56 multiplies the subtraction value by dx. After that, the adder 57 adds the multiplication value to o [x, y]. The resultant additional value is stored in the register 58. Therefore, in the register 58, the following value is stored.
Register 58: o [x, y]+(o [x+1, y]−o [x, y])×dx=o [x+dx, y]
As shown in
The subtracter 65 subtracts output o [x, y+1] of the register 53 from output o [x+1, y+1] of the register 54. The multiplier 66 multiplies the subtraction value by dx. After that, the adder 67 adds the multiplication value to o [x, y+1]. The resultant additional value is stored in the register 58. Therefore, in the register 68, the following value is stored.
Register 68: o [x, y+1]+(o [x+1, y+1]−o [x, y+1])×dx=o [x+dx, y+1]
As shown in
Further, the subtracter 70 subtracts output o [x+dx, y] of the register 58 from output o [x+dx, y+1] of the register 68. The multiplier 71 multiplies the subtraction value by dy. After that, the adder 72 adds the multiplication value to o [x+dx, y]. The resultant additional value is outputted. Therefore, the output value is as follows.
Output value: o [x+dx, y]+(o [x+dx, y+1]−o [x+dx, y])×dy=o [x+dx, y+dy]
As shown in
In this embodiment, selection signal SEL is sequentially changed, the values of filter coefficients b, c, d, e, and f before interpolation are outputted from the parameter table 35, and thereby the interpolation values of b, c, d, e, and f are generated and outputted in the interpolation circuit 36.
In
Based on o [x, y] and o [x+1, y] respectively stored in R0 and R1, o [x+dx, y] is calculated, and the result is stored in R4. Based on o [x, y+1] and o [x+1, y+1] respectively stored in R2 and R3, o [x+dx, y+1] is calculated, and the result is stored in R5. Based on o [x+dx, y] and o [x+dx, y+1] stored in R4 and R5, value b [x+dx, y+dy] after interpolation of filter coefficient b is calculated, and the result is stored in B.
In the same manner, when selection signal SEL indicates “c”, “d”, “e”, and “f” respective values of filter coefficients c to f after interpolation, c[x+dx, y+dy], d[x+dx, y+dy], e[x+dx, y+dy], and f[x+dx, y+dy] are calculated finally. The calculated values are respectively stored in C to F.
According to this embodiment, the parameter table that outputs the filter coefficients based on the turnover frequency and the gain is provided, and the filter circuit is controlled by the filter coefficients using the parameter table. The turnover frequency is based on the frequency of the fundamental wave of the musical sound to be sounded. The gain represents the attenuation degree (or enhancement degree). Therefore, it is possible to realize the digital filter having the filter characteristics significantly approximate to the filter characteristics of an acoustic musical instrument, in particular an acoustic piano by intuitively understandable parameters without performing complicated computing.
Further, according to this embodiment, the first envelope generation circuit outputs the envelope data that is changed as time goes on. The envelope data is added to the gain data in the filter coefficient calculation circuit. Therefore, it is possible to realize change overtime of gain attenuation (or enhancement) by the filter and realize desired tone color change with the use of the simple circuit structure.
Furthermore, according to this embodiment, with the use of the address composed of the upper bit of the turnover frequency data and the upper bit of the gain data, the parameter table outputs a rough filter coefficient. The rough filter coefficient is two-dimensionally corrected by the lower bit of the turnover frequency data and the lower bit of the gain data, and thereby the corrected filter coefficient is obtained. Thereby, it is possible to obtain the precise and appropriate filter coefficient, without increasing the number of data (coefficients) stored in the parameter table so much.
Next, a description will be given of a second embodiment of the invention.
In an electronic musical instrument, not only a sound of an acoustic musical instrument such as a piano, but also a tone color peculiar to a synthesizer incapable of being generated by an acoustic musical instrument should be generated. Accordingly, if the digital filter of the electronic musical instrument includes only the frequency characteristics suitable for tone color change of an acoustic musical instrument sound, it results in a problem that the electronic musical instrument is not able to address various musical categories.
This embodiment provides a filter device and an electronic musical instrument that can realize not only tone color change equal to tone color change of an acoustic musical instrument, but also tone color change peculiar to a synthesizer.
The interface 31a is connected to the internal bus 28 of the musical sound generation circuit 7. The interface 31a receives and retains 2 types of parameters that are transmitted via the interface 20 from the microcomputer 1, and outputs the parameters to the filter calculation circuit 26. In this embodiment, a set of turnover frequency data F [15:0] as the first parameter of the acoustic musical instrument filter characteristics and gain data G [15:0] as the second parameter thereof, and a set of band width data Q [15:0] as the first parameter of the synthesizer filter characteristics and cutoff data fc [15:0] as the second parameter thereof are given from the microcomputer 1 to the interface.
In this embodiment, the interface 31a receives filter mode selection signal A/S that selects one of the acoustic musical instrument filter characteristics and synthesizer filter characteristics from the microcomputer 1, and outputs filter mode selection signal A/S to the parameter table 35a. In this embodiment, when filter mode selection signal A/S is “0”, the filter coefficient calculation circuit 26 operates based on the acoustic musical instrument filter characteristics. Therefore, turnover frequency data F as the first parameter P1 and gain data G as the second parameter P2 are given from the microcomputer 1 to the interface 31a.
Meanwhile, when filter mode selection signal A/S is “1”, the filter coefficient calculation circuit 26 operates based on the synthesizer filter characteristics. Therefore, bandwidth data Q as the first parameter P1 and cutoff data fc as the second parameter P2 are given from the microcomputer 1 to the interface 31a.
Further, in this embodiment, the interface 31a receives data for rewriting the parameter table 35a, an address, and various control signals from the microcomputer 1, and outputs them to the parameter table 35a. In
As shown in
Out of the second parameter P2 [15:0], P2 [15:12] is given to the adder 33. Out of the first parameter P1 [15:0], P1 [15:13] is given to the adder 34. In the adders 33 and 34, if necessary, increment signal “1” is added at a given time, and the resultant is outputted as an address of the parameter table 35a. In the adder 33, by adding increment signal X1 at the next timing subsequently to outputting P2 [15:12], a continuing address (P2 [15:12]+1) can be outputted. In the adder 34, by adding increment signal Y1 at the next timing subsequently to outputting P1 [15:13], a continuing address (P1 [15:13]+1) can be outputted.
A signal is given from the adder 33 to lower address A [4:0] of the parameter table 35a. A signal is given from the adder 34 to upper address A [8:5]. Selection signal SEL is given from the control circuit (not shown) to the uppermost address A [11:9].
In this embodiment, for example, the memory 105 stores 9 types of turnover frequencies×17 types of gains (8 types of negative gains, gain “0”, and 8 types of positive gains)×5 types of filter coefficients. Therefore, the memory 105 stores 9×17×5=765 word filter number.
In the same manner, the memory 106 stores 5 types of filter coefficients for each of 9 types of bandwidth×8 types of cutoff.
For example, for the turnover frequency, to interpolate the upper 3 bit (8 types) values with lower 13 bits, 9 types of addresses are prepared. For the gain, to interpolate the upper 4 bit (16 types) values with lower 12 bits, 17 types of addresses are prepared. Selection signal SEL is used for selecting one of the 5 types of coefficients b to f.
As shown in
The selector 101 selects writing address AD [11:0] given from the interface 31a when S signal is “0”, and selects parameter A [11:0] given from the interface 31a when S signal is “1”.
When data is written in the memories 105 and 106, the microcomputer 1 outputs given control signals (WRB signal, A/S signal, and S signal) to the interface 31a and outputs address AD and data D thereto.
By receiving WRB signal “0”, A/S signal “0”, and S signal “0” from the microcomputer 1 via the interface 31a, in the memory 105, writing address AD [11:0] given from the microcomputer 1 via the interface 31a is written with data D [19:0] as a filter coefficient based on the acoustic filter characteristics.
By receiving WRB signal “0”, A/S signal “1”, and S signal “0” from the microcomputer 1 via the interface 31a, in the memory 106, writing address AD [11:0] given from the microcomputer 1 via the interface 31a is written with data D [19:0] as a filter coefficient based on the synthesizer filter characteristics.
Meanwhile, when WRB signal is “1”, the memories 105 and 106 become read memories. The microcomputer 1 outputs a control signal and a parameter to the parameter table 35a, so that a filter coefficient is read from the memory 105 in the case that a tone color designated in the switch 4 belongs to tone color of an acoustic musical instrument, or so that a filter coefficient is read from the memory 106 in the case that the tone color designated in the switch belongs to a so-called synthesizer tone color.
When receiving WRB signal “1”, A/S signal “0”, and S signal “1” from the microcomputer 1 via the interface 31a, in the memory 105, data is read under the condition that SEL signal is A [11:9], given upper address of the first parameter P1 [15:13] is A [8:5], and given upper address of the second parameter P2 [15:12] is A [4:0]. Since A/S signal “0” is given to the selector 107 as well, output from the memory 105 is selected. Therefore, from the parameter table 35a, a filter coefficient before interpolation based on the turnover frequency and the gain is outputted.
When receiving WRB signal “1”, A/S signal “1”, and S signal “1” from the microcomputer 1 via the interface 31a, in the memory 106, data is read under the condition that SEL signal is A [11:9], given upper address of the first parameter P1 [15:13] is A [8:5], and given upper address of the second parameter P2 [15:12] is A [4:0]. Since A/S signal “1” is given to the selector 107 as well, output from the memory 106 is selected. Therefore, from the parameter table 35a, a filter coefficient before interpolation based on the bandwidth and the cutoff is outputted.
The output of the parameter table 35a, that is, a set of filter coefficients before interpolation is given to the interpolation circuit 36. In addition, lower data of the turnover frequency data F [12:0] (P1: [12:0]) and lower data of the gain data G [11:0] (P2 [12:0]) are also given to the interpolation circuit 36. In the interpolation circuit 36, 5 types of filter coefficients b to f after interpolation are calculated and outputted. The registers 37 to 41 respectively retain filter coefficients b to f after interpolation sequentially outputted.
According to the second embodiment, the first memory outputting the filter coefficient based on the turnover frequency and the gain and the second memory outputting the filter coefficient based on the bandwidth and the cutoff are provided. According to the designated tone color, the filter coefficient is outputted from one of these memories.
The turnover frequency is based on the frequency of the fundamental wave of a musical sound to be sounded. The gain represents the attenuation degree (or enhancement degree). Therefore, it is possible to realize the digital filter having the filter characteristics significantly approximate to the filter characteristics of an acoustic musical instrument, in particular an acoustic piano by intuitively understandable parameters without performing complicated computing, and thus to output a musical sound with a tone color almost equal to that of the acoustic musical instrument.
Meanwhile, as before, the filter coefficient based on the bandwidth and the cutoff is outputted by using the second memory. Thereby, the digital filter having the existing filter characteristics can be realized, and a musical sound with a tone color peculiar to a synthesizer can be outputted.
Next a description will be given of a modified example of the second embodiment.
In this embodiment, 2 memories (RAMA and RAMB) are included. One memory (RAMA) stores a filter coefficient based on the acoustic musical instrument filter characteristics, and outputs the filter coefficient with the use of turnover frequency data and gain data as the address. The other memory (RAMB) stores a filter coefficient based on the synthesizer filter characteristics, and outputs the filter coefficient with the use of bandwidth data and cutoff data as the address.
It is needless to say that 2 memories are not necessarily required physically. The foregoing method may be embodied by segmenting an address space of a single memory into 2 sections. One section stores the filter coefficient based on the acoustic musical instrument filter characteristics as a RAMA. The other section stores the filter coefficient based on the synthesizer filter characteristics as a RAMB.
Meanwhile, in this modified example, with the use of a rewritable single memory, one of the filter coefficients based on the acoustic musical instrument filter characteristics and the filter coefficient based on the synthesizer filter characteristics is stored according to control by the microcomputer 1.
As shown in
When data is written into the memory 112, the microcomputer 1 outputs given control signals (WRB signal and S signal) to the interface 31a, and outputs addresses AD and D to the interface 31a.
When receiving WRB signal “0” and S signal “0” from the microcomputer 1 via the interface 31a, in the memory 112, data D [19:0] corresponding to the filter coefficient is written into writing address AD [11:0] given from the microcomputer 1 via the interface 31a.
For example, when the tone color designated in the switch 4 belongs to a tone color of an acoustic musical instrument, a filter coefficient based on the acoustic musical instrument filter characteristics is written into the memory 112 as data D. After that, the memory 112 receives WRB signal “1” and S signal “1” from the microcomputer 1 via the interface 31a, and thereby the memory 112 outputs the filter coefficient corresponding to address A [11:0] based on the turnover frequency data and gain data.
When the tone color designated in the switch 4 belongs to a tone color peculiar to a synthesizer, a filter coefficient based on the synthesizer filter characteristics is written into the memory 112 as data D. After that, the memory 112 receives WRB signal “1” and S signal “1” from the microcomputer 1 via the interface 31a, and thereby the memory 112 outputs the filter coefficient corresponding to address A [11:0] based on the bandwidth data and cutoff data.
Next, a description will be given of a third embodiment of the invention.
Currently, many electronic musical instruments employ PCM method. In the PCM method, to decrease the capacity of the waveform memory (waveform ROM), only original waveform data of a plurality of frequencies is retained at given intervals (for example, for every octave) instead of waveform data of each frequency corresponding to the sound pitch of each of all keys is retained. Therefore, when waveform data of a frequency of original waveform data is generated, the original waveform data of the frequency close to the foregoing frequency is read and the pitch is changed.
However, in the PCM method, there is the following problem. That is, when the pitch is changed from the original waveform data, the ratio of a higher harmonic wave in relation to the fundamental wave is changed.
An acoustic musical instrument primitively has a formant depending on the material and the shape of the musical instrument. Such a formant determines the ratio of the high order harmonic tone in relation to the fundamental wave. Therefore, the spectrum change associated with change of the pitch (frequency), in particular the change of the ratio of the high order harmonic tone as described above has the following problem. That is, it results in unnatural tone color change unlikely as an acoustic musical instrument.
According to this embodiment, a filter device capable of realizing tone color change equal to the tone color change of an acoustic musical instrument is provided.
In this embodiment, the microcomputer 1 detects key-on based on performance operation data from the touch detection circuit 5 when the key is touched, executes note-on processing, and controls the musical sound generation circuit 7 to generate a musical sound. The touch detection circuit 5 outputs released-key data including the sound pitch of the released key based on the event that the switch of the key is turned off to the microcomputer 1. When receiving the released-key data, the microcomputer 1 executes note-off processing, and controls the musical sound generation circuit 7 to attenuate the current musical sound.
As shown in
Next, the microcomputer 1 calculates the key range to which the sound pitch corresponding to note-on (note number) belongs (Step 204). In this embodiment, as shown in
The microcomputer 1 transmits the address in the waveform ROM 8 of the original waveform data of the key range calculated in Step 204 and various parameters such as panning information indicating weight to the right and left channels in the mixer 24 described later to the musical sound generation circuit 7 (Step 205). Next, the microcomputer 1 executes pitch processing (Step 206). In the pitch processing, the microcomputer 1 calculates the difference between the note number of the musical sound to be sounded and the note number of the original waveform data, and transmits the difference value as frequency change data to the musical sound generation circuit 7.
Further, the microcomputer 1 executes filter correction processing (Step 207). Schematically speaking, in the filter correction processing, the microcomputer 1 calculates the after-mentioned turnover frequency based on the note number of the musical sound to be sounded, and calculates the after-mentioned gain envelope (first envelope) based on the velocity data. Furthermore, the microcomputer 1 corrects the gain envelope based on the difference value between the note number of the musical sound to be sounded and the note number of the original waveform data, and transmits the corrected gain envelope to the musical sound generation circuit 7.
In this embodiment, the microcomputer 1 gives the target value of the gain envelope and the rate corresponding to the speed (slope) of the envelope to the musical sound generation circuit 7. The target value and the rate are repeatedly given as appropriate from the microcomputer 1 to the musical sound generation circuit 7.
Further, the microcomputer 1 executes amplification correction processing (Step 208). Schematically speaking, in the amplification correction processing, the microcomputer 1 calculates, amplification envelope (second envelope) based on the velocity data. Furthermore, the microcomputer 1 corrects the amplification envelope based on the difference value between the note number of the musical sound to be sounded and the note number of the original waveform data, and transmits the corrected amplification envelope to the musical sound generation circuit 7.
In the same manner as in the gain envelope, the microcomputer 1 gives the target value of the amplification envelope and the rate corresponding to the speed (slope) of the envelope to the musical sound generation circuit 7.
When detecting note-off (Y in Step 301), the microcomputer 1 searches for the sounding channel for sounding with the same note number as the note number corresponding to the note-off (Step 302). Next, the microcomputer 1 executes filter processing for key-off (Step 303). In this case, the microcomputer 1 calculates the gain envelope for key-off, corrects the gain envelope for key-off based on the difference value between the note number corresponding to the note-off and the note number of the original waveform data, and transmits the corrected gain envelope for key-off to the musical sound generation circuit 7.
The microcomputer 1 executes amplification correction processing for key-off (Step 304). In the amplification correction processing for key-off, the microcomputer 1 calculates the amplification envelope for key-off, corrects the amplification envelope for key-off based on the difference value between the note number corresponding to note-off and the note number of the original waveform data, and transmits the corrected amplification envelope to the musical sound generation circuit 7.
The interface 20 is connected to the data bus 13 shown in
The waveform generation circuit 21 is connected to the waveform ROM 8. The waveform generation circuit 21 receives frequency change data generated in the microcomputer 1, reads PCM waveform data (original waveform data) from a given address of the waveform ROM 8, changes the pitch based on the frequency change data, and generates musical sound waveform data of the sound pitch (note number) of the musical sound to be sounded.
The filter coefficient circuit 26 calculates a filter coefficient according to a parameter based on a performance operation signal given from the microcomputer 1 via the interface 20 and the corrected gain envelope (first envelope) changed over time that is given from the microcomputer 1.
Unless the gain envelope reaches the target value, the current gain envelope can be obtained by adding the rate given from the microcomputer 1 to the gain envelope of the previous processing.
The frequency characteristics are changed by the first envelope. Thus, the filter coefficient is changed as time goes on. The filter circuit 22 provides filter processing for the musical sound waveform data according to the filter coefficient.
The multiplier 23 multiplies the musical sound waveform data by the corrected amplification envelope (second envelope) changed over time that is given from the microcomputer 1.
In the same manner as the gain envelope, unless the amplification envelope reaches the target value, the amplification envelope can be obtained by adding the rate given from the microcomputer 1 to the amplification envelope of the previous processing.
Thereby, rise and decay of the musical sound corresponding to turning on/off the keys of the keyboard 6 and the sound volume corresponding to the touch response data are controlled. The waveform generation circuit 21, the filter circuit 22, the filter coefficient calculation circuit 26, and the multiplier 23 can process the maximum simultaneous sounding number in a manner of time division, and thereby can generate the number of channels (N channel) of musical sounds sufficient for keyboard performance.
The mixer 24 accumulates each of the generated maximum simultaneous sounding number of channels of musical sounds with the use of a given weighting accordingly to the panning information, and finally allocates the result as 2 right and left channel musical sounds. The output from the mixer 24 is outputted to the DAC 9.
Next, a description will be given in more detail of the filter correction processing (Step 207) and the amplification correction processing (Step 208) described with reference to
Where the target value of the corrected gain envelope is GainEnvelopeTarget′, the target value of the gain envelope based on the velocity data is GainEnvelopeTarget, and the note number of the original waveform data is Originalkey, and the note number corresponding to note-on is NoteNo, GainEnvelopeTarget′ is expressed as follows.
GainEnvelopeTarget′=GainEnvelopeTarget−Gsense×(NoteNo−OriginalKey)
where Gsense represents correction sensitivity data, shows the change degree of the envelope, and is set to an appropriate value.
According to the foregoing correction formula, when the note number of the musical sound to be sounded is higher than the note number of the original waveform data, the level of the gain envelope is decreased by correction. That is, the value on and after Gsense is positive, and thus GainEnvelopeTarget is subtracted. Meanwhile, when the note number of the musical sound to be sounded is lower than the note number of the original waveform data, the level of the gain envelope is increased. That is, the value on and after Gsense is negative, and thus GainEnvelopeTarget is added.
As described above, in this embodiment, when the note number of the musical sound to be sounded is higher than the note number of the original waveform, that is, when the spectrum becomes as shown in
As the gain envelope changes as time goes on, the corrected gain envelope data is time-series data that changes as time goes on.
In this embodiment, by adjusting the gain envelope, the gain as one of the filter parameters is adjusted to correct a tone color (filter correction processing). Meanwhile, sound volume change associated with pitch change is adjusted by correcting the amplification envelope (amplification correction processing).
Where the target value of the corrected amplification envelope is AmpEnvelopeTarget′, the target value of the amplification envelope based on the velocity data is AmpEnvelopeTarget, the note number of the original waveform data is OriginalKey, and the note number corresponding to note-on is NoteNo, AmpEnvelopeTarget′ is expressed as follows.
AmpEnvelopeTarget′=AmpEnvelopeTarget−Asense×(NoteNo−OriginalKey)
where Asense represents correction sensitivity data as Gsense does, shows the change degree of the envelope, and is set to an appropriate value.
As described above, again, in correcting the amplification envelope, when the note number of the musical sound to be sounded is higher than the note number of the original waveform data, correction is made so that the amplification envelope level is decreased and the sound volume becomes smaller. Meanwhile, when the note number of the musical sound to be sounded is lower than the note number of the original waveform data, correction is made so that the amplification envelope level is increased and the sound volume becomes larger.
The same is applied to the filter correction processing (Step 303) and amplification correction processing (Step 304) in the case of note-off. In filter correction processing, key-off gain envelope may be used as GainEnvelopeTarget. In amplification processing, key-off amplification envelope may be used as AmpEnvelopeTarget.
According to the third embodiment, the parameter table that outputs the filter coefficients based on the turnover frequency and gain is provided, and the filter circuit is controlled by the filter coefficients using the parameter table. The turnover frequency is based on the frequency of the fundamental wave of the musical sound to be sounded. The gain represents the attenuation degree (or enhancement degree). Therefore, it is possible to realize the digital filter having the filter characteristics significantly approximate to the filter characteristics of an acoustic musical instrument, in particular an acoustic piano by intuitively understandable parameters without performing complicated computing.
Further, according to this embodiment, the high order harmonic tone level in relation to the fundamental wave is adjusted by increasing or decreasing the gain based on the difference between the sound pitch (note number) of the musical sound to be sounded and the sound pitch (note number) of the original waveform data read from the waveform ROM. According to this embodiment, the formant is corrected when the pitch of the original waveform data is changed, and thus the formant can be consistent even when the pitch is changed.
In the third embodiment, to calculate the corrected gain envelope, the difference value between the note number of the musical sound to be sounded and the note number of the original waveform data is added to (or is subtracted from) the original gain envelope. However, the calculation is not limited to such computing. It is possible that the ratio between the note number of the musical sound to be sounded and the note number of the original waveform data or the ratio based on the difference value is calculated; and the gain envelope is changed (for example, by multiplication) based on the ratio. The same can be applied to correcting the amplification envelope.
Further, in the embodiment, the target value and the rate of the gain envelope (first envelope) and the target value and the rate of the amplification envelope (second envelope) are given from the microcomputer to the musical sound generation circuit. Therefore, in the musical sound generation circuit 7, each envelope is interpolated according to the rate until the envelope reaches the target value. However, the method is not limited thereto.
Next, a description will be given of a fourth embodiment of the present invention. As shown in
Next, the microcomputer 1 corrects the gain envelope (first envelope) based on the previously calculated pitch change amount, and transmits the corrected gain envelope with the rate to the musical sound generation circuit 7 (Step 1604).
Where the target value of the corrected gain envelope is GainEnvelopeTarget′, the target value of the gain envelope based on the velocity data is GainEnvelopeTarget, and the pitch change amount is PitchChange, GainEnvelopeTarget′ is expressed as follows.
GainEnvelopeTarget′=GainEnvelopeTarget−Gsense×PitchChange
where Gsense represents correction sensitivity data, shows the change degree of the envelope, and is set to an appropriate value according to the pitch change amount. The pitch change amount is the difference value obtained by subtracting the frequency of the current musical sound from a new frequency after pitch change (new pitch data frequency). The pitch change amount becomes positive when the new frequency is higher than the frequency of the current musical sound. Therefore, in this case, the corrected gain envelope becomes lower than the original envelope. Meanwhile, the pitch change amount becomes negative when the new frequency is lower than the frequency of the current musical sound. Therefore, in this case, the corrected gain envelope becomes higher than the original envelope.
The microcomputer 1 corrects the amplification envelope (second envelope) based on the pitch change amount, and transmits the corrected amplification envelope with the rate to the musical sound generation circuit 7 (Step 1605).
Where the target value of the corrected amplification envelope is AmpEnvelopeTarget′, the target value of the amplification envelope based on the velocity data is AmpEnvelopeTarget, and the pitch change amount is PitchChange, AmpEnvelopeTarget′ is expressed as follows.
AmpEnvelopeTarget′=AmpEnvelopeTarget−Asense×PitchChange
where Asense represents correction sensitivity data as Gsense does, shows the change degree of the envelope, and is set to an appropriate value according to the pitch change amount.
As described above, when the pitch of the current musical sound is changed associated with operating the bender volume, the gain envelope and the amplification envelope are corrected based on the pitch change amount. Therefore, even when the pitch of the current musical sound is changed, the formant can be consistent, and the tone color or the like can be prevented from being changed unnaturally.
While the present invention has been described with reference to the preferred embodiments, it is intended that the invention be not limited by any of the details of the description therein but includes all the embodiments which fall within the scope of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2006-252184 | Sep 2006 | JP | national |
2006-252185 | Sep 2006 | JP | national |
2006-292200 | Oct 2006 | JP | national |
The present application is a Divisional Application of U.S. application Ser. No. 11/901,472 filed Sep. 17, 2007 now U.S. Pat. No. 7,622,665, which is based upon and claims the benefit of priority from the prior Japanese Patent Applications No. 2006-252184, filed Sep. 19, 2006; No. 2006-252185, filed Sep. 19, 2006; and No. 2006-292200, filed Oct. 27, 2006, the entire contents of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5270954 | Sakata | Dec 1993 | A |
5450350 | Sakata | Sep 1995 | A |
5502277 | Sakata | Mar 1996 | A |
5744742 | Lindemann et al. | Apr 1998 | A |
6002080 | Tanaka | Dec 1999 | A |
6673995 | Ogawa et al. | Jan 2004 | B2 |
7622665 | Kaneko | Nov 2009 | B2 |
20060130637 | Crebouw | Jun 2006 | A1 |
20080066612 | Kaneko | Mar 2008 | A1 |
Number | Date | Country |
---|---|---|
0 360 306 | Mar 1990 | EP |
63-239494 | Oct 1988 | JP |
4-78213 | Mar 1992 | JP |
08-234759 | Sep 1996 | JP |
Number | Date | Country | |
---|---|---|---|
20100077910 A1 | Apr 2010 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11901472 | Sep 2007 | US |
Child | 12571181 | US |