The present application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2017-049459, filed Mar. 15, 2017, the entire contents of which are incorporated herein by reference.
The present invention relates to a signal processing apparatus which processes a signal by using a finite impulse response (FIR) filter, a method of implementing a filter algorithm, and an effect applying apparatus using the filter algorithm.
In reverberation effect applying apparatuses which apply reverberation and/or resonance effect on an original tone of an audio signal by convoluting the original tone of an audio signal with an impulse response, a technology using an FIR filter to implement convolution in a time domain is known as a technique for convoluting the original tone of an audio signal with such effects (Refer to Japanese Unexamined Patent Publication No. 2003-280675), and a technology using a Fast Fourier Transform (FFT)/inverse Fast Fourier Transform (iFFT) is known as a technique of implementing convolution in a frequency domain. (Refer to Japanese Unexamined Patent Publication No. 2005-215058)
A hybrid method using both FIR and FFT is known to use FIR algorithm to convolute the audio sound with first reflection sound and to use FFT algorithm to convolute the audio sound with reverberation sound. (Refer to William G. Gardner “Efficient Convolution without Input-Output Delay”, J. Audio Eng. Soc., Vol. 43 No. 3, p. 127, 1995 March.)
According to one aspect of the present invention, there is provided a signal processing apparatus which comprises a first memory in which plural pieces of coefficient data used for implementing a filter algorithm are stored, and a processor which receives plural pieces of input data to be subjected to the filter algorithm, executes the filter algorithm using the plural pieces of coefficient data stored in the first memory and the plural pieces of received input data as many times as the number corresponding to a designated filter order, and outputs an execution result of the filter algorithm, in which filter algorithm each piece of coefficient data and each piece of input data are multiplied together and resultant products are summed up.
According to another aspect of the present invention, there is provided a method for implementing filter algorithm comprising the steps of: reading coefficient data successively from a first memory which stores plural pieces of coefficient data to be used in the filter algorithm; successively receiving plural pieces of input data to be subjected to the filter algorithm; designating a filter order of the filter algorithm; implementing the filter algorithm repeatedly on the coefficient data read successively from the coefficient storing unit and the successively received input data as many times as the number corresponding to the designated filter order, in which algorithm each piece of coefficient data and each piece of input data are multiplied together and resultant products are summed up; and outputting a result of implementing the filter algorithm.
Now, embodiments of the present invention will be described with reference to the accompanying drawings in detail. In a signal processing apparatus employed in an effect applying unit of an electronic musical instrument according to the present embodiment of the invention, an FIR (finite impulse response) filter algorithm can be implemented, the filter order of which is changed flexibly, and also plural FIR filter algorithms having different filter order and different impulse response are combined flexibly and can be implemented simultaneously. In the effect applying unit of the electronic musical instrument according to the present embodiment of the invention, convolution in the time domain implemented by FIR filter algorithm and the convolution in the frequency domain using Fast Fourier Transform (FFT) are implemented in combination. In this case, since FFT point numbers in the convolution in the frequency domain can be determined flexibly together with the filter order of the FIR filter, it will be possible for the effect applying unit to add reverberation effect and resonance effect of an enhanced reproducibility to musical tones of the electronic musical instrument without sacrificing responsiveness of the electronic musical instrument.
The electronic musical instrument 100 comprises CPU (Central Processing Unit) 101, ROM (Read Only Memory) 102, RAM (Random Access Memory) 103, TG (a tone generator) 104, the effect applying unit 105, a keyboard 106, a pedal 107, and an operator 108. These elements are connected to each other through a system bus 109. An output of the tone generator TG 104 is supplied to a sound system 110.
The CPU 101 executes a control program read on the RAM 103 from the ROM 102 and gives an instruction (tone generation instruction) to the tone generator TG 104 to generate a tone based on performance information sent from the keyboard 106 and the operator 108.
The tone generator TG 104 reads waveform data from the ROM 102 and/or the RAM 103 in accordance with the tone generation instruction to produce musical tone data. The musical tone data is supplied to the sound system. 110 through the effect applying unit 105. For instance, when the pedal 107 is pressed, the effect applying unit 105 adds effects such as reverberation effect and resonance effect such as piano string vibration to the musical data. Finally, the musical tone data supplied from the effect applying unit 105 to the sound system 110 is converted into an analog musical tone signal by an analog/digital convertor. The converted analog signal is amplified in an amplifier and is output from a speaker.
The tone generator TG 104 is provided with musical tone generating units 201 (CH1) to 201 (CHn), which generate “n” pieces of musical tone data respectively for “n” musical tone channels CH1 to CHn. Each musical tone generating unit 201 produces musical tone data independently of other musical tone data produced by other musical tone generating unit 201, in accordance with the tone generation instruction which is generated in response to pressing operation on the keyboard 106 and supplied from the CPU 101 (
The musical tone generating unit 201 (CHi) (1≤i≤n) corresponding to the musical tone channel Chi is provided with a waveform generation unit WG.CHi for generating waveform data, a filtering unit TVF.Chi for processing a timbre of the generated waveform data, and an amplitude envelope processing unit TVA.CHi for processing an amplitude envelope of the generated waveform data.
Four mixers 203, 204, 205 and 206 in a mixing unit 202 multiply the respective pieces of musical tone data output from the musical tone generating units 201 (CHi) (1≤i≤n) by prescribed levels and accumulate the resultant products, thereby outputting an Lch (left channel) direct tone output data 207, a Rch (right channel) direct tone output data 208, an Lch (left channel) effect tone input data 209, and a Rch (right channel) effect tone input data 210 to the effect applying unit 105. The symbol “·Σ” in the mixers 203, 204, 205 and 206 shown in
The Lch effect tone input data 209 and the Rch effect tone input data 210 are given reverberation and resonance effects respectively in a reverberation/resonance effect apparatus 211 of the effect applying unit 105 and are output as Lch effect tone output data 211 and Rch effect tone output data 212, respectively. The Lch effect tone output data 211 is added to the Lch direct tone output data 207 in the effect applying unit 105 and is output as Lch musical tone output data 213 to the sound system 110 shown in
The Lch effect tone input data 209 or the Rch effect tone input data 210 received by the reverberation/resonance effect apparatus 211 is supplied to an FIR filter algorithm implementing unit 303 and a CONV algorithm implementing unit 304 in parallel.
The FIR filter algorithm implementing unit 303 is a time domain convolution implementing unit which implements convolution in the time domain in unit of sampling period to convolute the Lch effect tone input data (original tone) 209 or the Rch effect tone input data (original tone) 210 with a first half of the impulse response data of a reverberation/resonance tone.
The CONV algorithm implementing unit 304 is a frequency domain convolution implementing unit which implements convolution in the frequency domain using a Fast Fourier Transform (FFT) with unit of block to convolute the Lch effect tone input data (original tone) 209 or the Rch effect tone input data (original tone) 210 with a second half of the impulse response data of the reverberation/resonance tone. The FIR filter algorithm implementing unit 303 and the CONV algorithm implementing unit 304 use RAM 306 installed in the effect applying unit 105 (shown in
The outputs from the FIR filter algorithm implementing unit 303 and the CONV algorithm implementing unit 304 are added together in an adding unit 305, and are output as the Lch effect tone output data 211 or the Rch effect tone output data 212, respectively.
Hereinafter, the Lch effect tone input data 209 and the Rch effect tone input data 210 will be collectively referred to as the “effect tone input data (sig)”.
In this case, prior to implementing the FFT algorithms 403, 404 of 2N points, the impulse response data (coef) of N points (in bold line in
The data 405, 406 of 2N points in the frequency domain are subjected to complex multiplication on each frequency point, as indicated by 407, whereby complex multiplication data 408 of 2N points is produced.
Further, when iFFT algorithm is implemented on the complex multiplication data 408 of 2N points, as indicated by 409, data 410 of 2N points in the time domain, which has been subjected to convolution, is produced.
The first half data (bold line) of N points out of the time domain data 410 of 2N points results from a linear convolution by the over-lap method of a block size of N points and data of the block size of N points produced successively in this way are output as the Lch effect tone output data 211 or the Rch effect tone output data 212 shown in
As shown in the example of
In the similar manner to the convolution implemented, as illustrated in
The frequency data group 509 (N1, N2, N3, N4) and the frequency data group 510 t(N), t(N−1), t(N−2), t(N−3) are subjected to complex multiplication at each frequency point of 2N points to produce complex multiplication data of 2N points N1t(N), N2t(N−1), N3t(N−2), N4t(N−3). Further, iFFT algorithm is implemented on the complex multiplication data N1t(N), N2t(N−1), N3t(N−2), N4t(N−3) to produce time domain data group 513 of 2N points.
The first half data (bold line) of N points of each piece of time domain data 513 of 2N points is output as the Lch effect tone output data 211 or the Rch effect tone output data 212, shown in
For instance, when
conv(coef=[2 3 4 5 6 7 8 9]
sig=[1 2 3 4 5 6 7 8 9 10])
is calculated with a block size of N=2, 9th convolution result=200 and 10th convolution result=244 are obtained. These convolution results can be calculated by summing up the first halves of the calculation results of
ifft(fft([0023])fft([78910]))
ifft(fft([0045])fft([5678]))
ifft(fft([0067])fft([3456])) and
ifft(fft([0089])fft([1234])), where
“fft ( )” means to implement the FFT algorithm on data group in parentheses and “ifft( )” means to implement the iFFT algorithm on data group in parentheses.
As shown in the above example, the linear convolution using the FFT algorithm can be implemented, but since the FFT algorithm is performed in unit of block, implementation is delayed at the beginning of the block.
For example as illustrated in
As will be understood from the “timing” illustrated in
More specifically, the effect tone input data (the Lch effect tone input data 209 or the Rch effect tone input data 210 in
The output of the 0-th delay processing unit 803(#0) is multiplied by the first order FIR coefficient data in the first order multiplication unit 801(#1), and the calculated multiplication data is accumulated on the data accumulated at the prior stage, that is, at the 0-th order accumulation unit 802(#0) in the first order accumulation unit 802(#1). Meanwhile, the data output from the 0-th delay processing unit 803(#0) is delayed by one sampling period in the first order delay processing unit 803(#1).
Thereafter, the FIR algorithms are similarly implemented at the stages from the 0-th order to the (2N−1)-th order. In general, the output (when i=0, the effect tone input data) of the i-th (0≤i≤2N−1) order FIR algorithm delay processing unit 803(#i−1) is multiplied by the i-th order FIR coefficient data in the i-th order multiplication unit 801(#i), and the calculated multiplication data is accumulated on the data (when i=0, data of “0”) accumulated at the prior stage, that is, at the (i−1)-th order accumulation unit 802(#i−1) in the i-th order accumulation unit 802(#i). Meanwhile, the data (when i=0, the effect tone input data) output from the (i−1)-th delay processing unit 803(#0) is delayed by one sampling period in the first delay processing unit 803(#i).
The accumulated data at the final stage, that is, at the (2N−1)-th order accumulation unit 802(#2N−1) is output as convolved data. The (2N−1)-th order delay processing unit 803(#2N−1) is not required.
In the FIR filter algorithm implementing unit 303 having the configuration of functions as shown in
The effect tone input data is processed in unit of sampling period by the mixer 205 or 206 in the mixing unit 202 of the tone generator TG 104 (
The multiplication unit 801 and the accumulation unit 802 implement the FIR algorithm in synchronism with a clock of a cycle subdividing the sampling period. The calculation of the FIR algorisms at all the orders will finish within the sampling period and the convolved data will be output from the final stage, that is, from the (2N−1)-th order accumulation unit 802(#2N−1) within the sampling period, too. Therefore, there is no delay occurred in the convolution implemented by the FIR filter algorithm implementing unit 303 shown in
If the filter order of the FIR filter algorithm implementing unit 303 is equivalent to an FFT size (twice of the block size N) of the CONV algorithm implementing unit 304, a time lag (refer to
Now, it is assumed that the first 2N samples of the effect tone input data is input to the FIR filter algorithm implementing unit 303 and at the same time 2N samples of the effect tone input data shifted by N samples are successively input to the CONV algorithm implementing unit 304.
Although the FIR filter algorithm implementing unit 303 implements operation every sampling period, many electronic musical instruments have plural types of reverberation effect and when convolution is implemented with these types of reverberation effect, the impulse response will be of various durations. The reverberation or body response effect of the musical instrument will vary depending on the size of the musical instrument. Therefore, it is not preferable to fix a block size in the configuration generating little delay in operation, that is, for instance it is not preferable to fix the block size based on the impulse response having the longest duration.
In the present embodiment, since the reverberation/resonance effect units 211 are prepared respectively for the Lch (left channel) effect tone input data 209 and the Rch (right channel) effect tone input data 210, it is required to prepare at least two reverberation/resonance effect units 211 in the FIR filter algorithm implementing unit 303.
The FIR filter algorithm implementing unit 303 having a configuration to be explained hereinafter can calculate the FIR filter algorithm of the filter order which is changed flexibly, and further can combine and implement plural FIR algorithms flexibly at the same time.
An FIR coefficient memory 1101 stores plural FIR coefficient data sets corresponding to the order of filter order, for each of the FIR filter algorithm implementing units of variable filter order FIR(1), FIR(2), . . . , FIR(X−1), and FIR(X).
In the FIR coefficient memory 1101 shown in
More specifically, for example, it is assumed that the FIR filter algorithm implementing units FIR (1) and FIR (2) are the FIR filter algorithm implementing units 303 in the reverberation/resonance effect unit 211 (Lch) for processing the Lch effect tone input data 209 and the FIR filter algorithm implementing units 303 in the reverberation/resonance effect unit 211 (Rch) for processing the Rch effect tone input data 210, respectively. The FIR coefficient data set “b1” stored in the FIR coefficient memory 1101 is the first 2N data set of impulse response data of the Lch reverberation/resonance tone. Similarly, the FIR coefficient data set “b2” stored in the FIR coefficient memory 1101 is the first 2N data set of impulse response data of the Rch reverberation/resonance tone.
In a data memory 1102 (a storing unit for storing input data) shown in
In the data memory (input data storing unit) 1102 shown in
For instance, assuming that the FIR(1) is the Lch FIR filter algorithm implementing unit 303 in the reverberation/resonance effect unit 211 (Lch), the input data 1111 to the FIR(1) is the Lch effect tone input data 209. Further, assuming that a sample value of the Lch effect tone input data 209 in the current sample period is b1in, the Lch effect tone input data 209 from a sample value b1wm (1) in the last sampling period to a sample value b1wm(2N−1) in the period before (2N−1) sampling period is stored as delay-data set b1wm in the storing area of data memory 1102 corresponding to the FIR(1).
Similarly, assuming that the FIR(2) is the Rch FIR filter algorithm implementing unit 303 in the reverberation/resonance effect unit 211 (Rch), the input data 1111 to the FIR(2) is the Rch effect tone input data 210. Further, assuming that a sample value of the Rch effect tone input data 210 in the current sample period is b2in, the Rch effect tone input data 210 from a sample value b2wm(1) in the last sampling period to a sample value b2wm(2N−1) in the period before (2N−1) sampling period is stored as delay-data set b2wm in the storing area of data memory 1102 corresponding to the FIR(2).
Further in
In the filter algorithm implementing unit 1100, the first register (m0r) 1103 retains FIR coefficient data which the FIR coefficient memory 1101 outputs in synchronism with the clock of cycle subdividing the sampling period.
Further in the filter algorithm implementing unit 1100, the first selector (SEL1) 1110 selects either one of the input data 1111 in the sampling period and the delay-data output from the data memory 1102.
In the filter algorithm implementing unit 1100, the second register (mlr) 1104 retains data which the first selector (SEL1) 1110 outputs in synchronism with the clock.
In the filter algorithm implementing unit 1100, the multiplier 1105 multiplies FIR coefficient data output from the first register (m0r) 1103 and data output from the second register (mlr) 1104.
In the filter algorithm implementing unit 1100, the third register (mr) 1106 retains product data which the multiplier 1105 outputs in synchronism with the clock.
In the filter algorithm implementing unit 1100, the adder 1107 adds the product data output from the third register (mr) 1106 to the data output from the second selector (SEL2) 1109 together to be described in detail later.
In the filter algorithm implementing unit 1100, the fourth register (ar) 1108 retains the product data which the adder 1107 outputs in synchronism with the clock.
In the filter algorithm implementing unit 1100, the second selector (SEL2) 1109 selects either one of data of a value “0” and the product data output from the fourth register (ar) 1108 and feeds back the selected data as accumulated data to adder 1107.
In operation implemented by each of the FIR filter algorithm implementing units FIR(i)(1≤i≤X) having the hardware configuration shown in
In the continuous time duration within the sampling period, which is assigned to each of the FIR filter algorithm implementing units FIR(i)(1≤i≤X) (Refer to
For simplicity of explanation, taking a case in which the block size is N=2 as an example, a process in which the FIR filter algorithm implementing units FIR(1) outputs the convolved data in the sampling period, and a part of a process which the following FIR filter algorithm implementing units FIR(2) will implement will be described. In the real FFT algorithm implementing unit, for example, N=128 and/or N=256 but the operation principle is the same.
In this case, the FIR(1) is the Lch FIR filter algorithm implementing unit 303 in the reverberation/resonance effect unit 211 (Lch) shown in
In the FIR coefficient memory 1101 shown in
The input data 1111 corresponding to the FIR(1) is the Lch effect tone input data 209 shown in
Similarly, the input data 1111 corresponding to the FIR(2) is the Lch effect tone input data 210 shown in
In
In
At the clock timing L0(m) in
At the clock timing L1(0) in
Meanwhile, when the first selector (SEL1) 1110 of
Further, the first FIR coefficient data “b1(0)” which is output from the FIR coefficient memory 1101 at the clock timing L1(0) is latched to the first register (m0r) 1103 at the rising edge of the clock timing L1(0) and the data “b1(0)” will be output from the first register (m0r) 1103 (
In the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L1(0), the second FIR coefficient data “b1(1)” in the FIR coefficient data set “b1” is output from the FIR coefficient memory 1101 (
Further, in the data memory 1102, when the reading address pointer is incremented at the rising edge of the clock timing L1(0), the first delay-data “b1wm1” (in the last sampling period) in the delay-data set “b1wm” is output from the data memory 1102 (
At the clock timing L1(0), the output “blin” of the second register (mlr) 1104 and the output “b1(0)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “blinb1(0)” will be obtained (
At the clock timing L1(1) in
Further, the second FIR coefficient data “b1(1)”, which was output from the FIR coefficient memory 1101 at the clock timing L1(0), is latched to the first register (m0r) 1103 at the rising edge of the clock timing L1(1) and the data “b1(1)” will be output from the first register (m0r) 1103 (
In the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L1(1), the third FIR coefficient data “b1(2)” in the FIR coefficient data set “b1” is output from the FIR coefficient memory 1101 (
Further, in the data memory 1102, when the reading address pointer is incremented at the rising edge of the clock timing L1(1), the second delay-data “b1wm2” (in the sampling period before the last sampling period) in the delay-data set “b1wm” is output from the data memory 1102 (
At the rising edge of the clock timing L1(1), the product data “blinb1(0)”, which was output from the multiplier 1105 at the clock timing L1(0), is latched to the third register (mr) 1106 and the product data appears at the output “a0” (
At the clock timing L1(1), the output “b1wm1” of the second register (mlr) 1104 and the output “b1(1)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “blwm1b1(1)” will be obtained (
In addition, at the clock timing L1(1), the second selector (SEL2) 1109 selects data of a value “0” and the value of “0” appears at the output “a1” (
At the clock timing L1(1) the output “a1” of the second selector (SEL2) 1109 and the output “a0” of the third register (mr) 1106 are entered in the adder 1107 and the sum of “0+b1inb1(0)” will be obtained (
At the clock timing L1(2) in
Meanwhile, when the first selector (SEL1) 1110 of
Further, the third FIR coefficient data “b1(2)”, which was output from the FIR coefficient memory 1101 at the clock timing L1(1), is latched to the first register (m0r) 1103 at the rising edge of the clock timing L1(2) and the data “b1(2)” will be output from the first register (m0r) 1103 (
In the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L1(2), the fourth FIR coefficient data “b1(3)” in the FIR coefficient data set “b1” is output from the FIR coefficient memory 1101 (
Further, in the data memory 1102, when the reading address pointer is incremented at the rising edge of the clock timing L1(2), the third delay-data “b1wm3” (in the sampling period before three sampling periods) in the delay-data set “b1wm” is output from the data memory 1102 (
At the rising edge of the clock timing L1(2), the product data “b1wm1b1(1)”, which was output from the multiplier 1105 at the clock timing L1(1), is latched to the third register (mr) 1106 and the value of the product data appears at the output “a0” (
At the clock timing L1(2), the output “blwm2” of the second register (mlr) 1104 and the output “b1(2)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “blwm2b1(2)” will be obtained (
In addition, at the rising edge of the clock timing L1(2) the sum data “0+blinb1(0)”, which was output from the adder 1107 at the clock timing L1(1), is latched to the fourth register (ar) 1108 and the value of sum data appears at the output “ar” (
At the clock timing L1(2), the second selector (SEL2) 1109 selects the output “ar” of the fourth register (ar) 1108, and the value appears at the output “a1” (
As a result, at the clock timing L1(2) the output “a1” of the second selector (SEL2) 1109 and the output “a0” of the third register (mr) 1106 are entered in the adder 1107 and the sum of “0+b1inb1(0)+b1wm1 b1(1)” will be obtained (
At the clock timing L1(3) in
Further, the fourth FIR coefficient data “b1(3)”, which was output from the FIR coefficient memory 1101 at the clock timing L1(2), is latched to the first register (m0r) 1103 at the rising edge of the clock timing L1(3) and the data “b1(3)” will be output from the first register (m0r) 1103 (
At the rising edge of the clock timing L1(3), the product data “blwm2b1(2)”, which was output from the multiplier 1105 at the clock timing L1(2), is latched to the third register (mr) 1106 and the product data appears at the output “a0” (
At the clock timing L1(3), the output “blwm3” of the second register (mlr) 1104 and the output “b1(3)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “blwm3b1(3)” will be obtained (FIG. 12 (e), (g)→(h)). The above operation performed at the clock timing L1(3) corresponds to the operation of the multiplication unit 801(#3) of
In addition, at the rising edge of the clock timing L1(3) the sum data “0+blinb1(0)+blwm1b1(1)”, which was output from the adder 1107 at the clock timing L1(2), is latched to the fourth register (ar) 1108 and the value of sum data appears at the output “ar” (
At the clock timing L1(3) the second selector (SEL2) 1109 selects the output “ar” of the fourth register (ar) 1108, and the value appears at the output “a1” (
As a result, at the clock timing L1(3) the output “a1” of the second selector (SEL2) 1109 and the output “a0” of the third register (mr) 1106 are entered in the adder 1107 and the sum of “0+b1inb1(0)+b1wm1b1(1)+blwm2b1(2)” will be obtained (
Meanwhile, in the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L1(3), the first FIR coefficient data “b1(0)” in the FIR coefficient data set “b2” is output for the following FIR filter algorithm implementing unit FIR(2) (
Further, at the clock timing L1(3), a value of Rch effect tone input data 210 output from the mixer 206 of
At the clock timing L2(0) in
Meanwhile, when the first selector (SEL1) 1110 of
Further, the first FIR coefficient data “b2(0)”, which was output from the FIR coefficient memory 1101 at the clock timing L1(3), is latched to the first register (m0r) 1103 at the rising edge of the clock timing L2(0) and the data “b2(0)” will be output from the first register (m0r) 1103 (
In the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L2(0), the second FIR coefficient data “b2(1)” in the FIR coefficient data set “b2” is output from the FIR coefficient memory 1101 (
Further, in the data memory 1102, when the reading address pointer is incremented at the rising edge of the clock timing L2(0), the first delay-data “b2wm1” (in the last sampling period) in the delay-data set “b2wm” is output from the data memory 1102 (
At the rising edge of the clock timing L2(0), the product data “blwm3b1(3)”, which was output from the multiplier 1105 at the clock timing L1(3), is latched to the third register (mr) 1106 and the product data appears at the output “a0” (
At the clock timing L2(0), the output “b2in” of the second register (mlr) 1104 and the output “b2(0)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “b2inb2(0)” will be obtained (
In addition, at the rising edge of the clock timing L2(0) the sum data “0+blinb1(0)+blwm1b1(1)+blwm2b1(2)”, which was output from the adder 1107 at the clock timing L1(3), is latched to the fourth register (ar) 1108 and the value of sum data appears at the output “ar” (
At the clock timing L2(0) the second selector (SEL2) 1109 selects the output “ar” of the fourth register (ar) 1108, and the value appears at the output “a1” (
As a result, at the clock timing L2(0) the output “a1” of the second selector (SEL2) 1109 and the output “a0” of the third register (mr) 1106 are entered in the adder 1107 and the sum data of “0+b1inb1(0)+b1wm1b1(1)+blwm2b1(2)+blwm3b1(3)” will be obtained (
At the clock timing L2(1) in
Meanwhile, when the first selector (SEL1) 1110 of
Further, the second FIR coefficient data “b2(1)”, which was output from the FIR coefficient memory 1101 at the clock timing L2(0), is latched to the first register (m0r) 1103 at the rising edge of the clock timing L2(1) and the data “b2(1)” will be output from the first register (m0r) 1103 (
In the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L2(1), the third FIR coefficient data “b2(2)” in the FIR coefficient data set “b2” is output from the FIR coefficient memory 1101 (
Further, in the data memory 1102, when the reading address pointer is incremented at the rising edge of the clock timing L2(1), the second delay-data “b2wm2” (in the sampling period before the last sampling period) in the delay-data set “b2wm” is output from the data memory 1102 (
At the rising edge of the clock timing L2(1), the product data “b2inb2(0)”, which was output from the multiplier 1105 at the clock timing L2(0), is latched to the third register (mr) 1106 and the product data appears at the output “a0” (
At the clock timing L2(1), the output “b2wm1” of the second register (mlr) 1104 and the output “b2(1)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “b2wm1b2(1)” will be obtained (
In addition, at the clock timing L2(1) the second selector (SEL2) 1109 selects the data of a value “0” and the value appears at the output “a1” (
At the clock timing L2(1) the output “a1” of the second selector (SEL2) 1109 and the output “a0” of the third register (mr) 1106 are entered in the adder 1107 and the sum data of “0+b2inb2(0)” will be obtained (
Further, at the rising edge of the clock timing L2(1) the sum data “0+blinb1(0)+b1wm1b1(1)+b1wm2 b1(2)+b1wm3b1(3)”, which was output from the adder 1107 at the clock timing L2(0), is latched to the fourth register (ar) 1108 and the value of sum data appears at the output “ar” (
The output data of “0+b1inb1(0)+b1wm1b1(1)+blwm2b1(2)+b1wm3b1(3)” appears at the fourth register “ar” 1108 at the clock timing L2(1) after two clocks from the last clock timing L1(3) in the continuous time duration corresponding to the FIR(1). This output data is output as data convolved in the FIR(1) (Lch effect tone output data 211 in
At the clock timing L2(2) in
Meanwhile, when the first selector (SEL1) 1110 of
Further, the third FIR coefficient data “b2(2)”, which was output from the FIR coefficient memory 1101 at the clock timing L2(1), is latched to the first register (m0r) 1103 at the rising edge of the clock timing L2(2) and the data “b2(2)” will be output from the first register (m0r) 1103 (
In the FIR coefficient memory 1101, when the reading address pointer is incremented at the rising edge of the clock timing L2(2), the fourth FIR coefficient data “b2(3)” in the FIR coefficient data set “b2” is output from the FIR coefficient memory 1101 (
Further, in the data memory 1102, when the reading address pointer is incremented at the rising edge of the clock timing L2(2), the third delay-data “b2wm3” (in the sampling period before three sampling periods) in the delay-data set “b2wm” is output from the data memory 1102 (
At the rising edge of the clock timing L2(2), the product data “b2wm1b2(1)”, which was output from the multiplier 1105 at the clock timing L2(1), is latched to the third register (mr) 1106 and the product data appears at the output “a0” (
At the clock timing L2(2), the output “b2wm2” of the second register (mlr) 1104 and the output “b2(2)” of the first register (m0r) 1103 are entered in the multiplier 1105, whereby product data “b2wm2b2(2)” will be obtained (
In addition, at the rising edge of the clock timing L2(2) the sum data “0+b2inb2(0)”, which was output from the adder 1107 at the clock timing L2(1), is latched to the fourth register (ar) 1108 and the value of sum data appears at the output “ar” (
At the clock timing L2(2) the second selector (SEL2) 1109 selects the output “ar” of the fourth register (ar) 1108 and the value of output “ar” appears at the output “a1” (
As a result, at the clock timing L2(2) the output “a1” of the second selector (SEL2) 1109 and the output “a0” of the third register (mr) 1106 are entered in the adder 1107 and the sum data of “0+b2inb2(0)+b2wm1b2(1)” will be obtained (
As described above, it is possible without causing inconsistency in data to implement the arithmetic processing and outputting operation of the FIR filter algorithm implementing unit FIR(1) and further the arithmetic processing and outputting operation of the FIR filter algorithm implementing unit FIR(2) by means of the time division process performed in synchronism with the clock having a cycle subdividing the sampling period, and plural FIR filter algorithms of the filter orders set separately can be implemented without delay every sampling period. Therefore, for instance, in a case where impulse response data is short, FIR resource with block size reduced can be used in another filter processing. Meanwhile, in a case where the impulse response data is long, since the coefficient data size for convolution used by the CONV algorithm implementing unit 304 of
In the present embodiment of the invention, the filter orders 2N (real coefficient data) for the FIR filter algorithm implementing unit 303 of
Supposing that an optimal condition have been set previously, each block size is decided and information of the decided block sizes and FFT transform data for the CONV algorithm implementing unit 304 are stored in the RAM 306, and when the block size “N” is decided for implementing convolution and the decided block size “N” is compared with the information of the decided block sizes stored in the RAM 306. It will be practical to implement the FFT algorithm, only when the decided block size “N” is not equivalent to the information of the decided block sizes.
In the electronic musical instrument 100 shown in
The CPU 101 executes a switching process (step S1402), where the CPU 101 watches the operated condition of the operator 108 shown in
The CPU 101 executes a pressed key detecting process (step S1403), where the CPU 101 detects pressed key(s) of the keyboard 106 shown in
The CPU 101 executes a pedal detecting process (step S1404), where the CPU 101 judges the operated condition of the pedal 107 shown in
The CPU 101 executes a reverberation and resonance renewing process (step S1405). In the reverberation and resonance renewing process, the CPU 101 confirms a judging result in the switching process (step S1402) and a detected result in the pedal detecting process (step S1404) to control the effect applying unit 105, thereby making the reverberation/resonance effect unit 211(Lch) and the reverberation/resonance effect unit 211(Rch) apply reverberation/resonance effects respectively to the Lch effect tone input data 209 and the Rch effect tone input data 210 generated by the tone generator (TG) 104.
The CPU 101 executes other processes (step S1406) such as a controlling process for adjusting musical tone envelops.
The CPU 101 executes a tone generating process (step S1407), where the CPU 101 gives the tone generator (TG) an instruction to generate a tone based on the pressed key or released key detected in the pressed key detecting process (step S1403).
The CPU 101 confirms the judging result in the switching process (step S1402) to refer data stored in the ROM 102 of
Further, the CPU 101 judges whether a type of tone effect has been designated by the operator 108 (step S1502).
When it is decided YES at step S1502, the CPU 101 executes the reverberation and resonance renewing process on a block size “BL” (=N) in the operation of the reverberation/resonance effect unit 211 (Lch, Rch) (
The CPU 101 refers to a convolution table stored in the ROM 102 to read an impulse response length (IR: Impulse Response) of impulse response data (step S1601). The information concerning a type of tone effect obtained at step S1501 in
The CPU 101 judges whether the impulse response length (IR length) is shorter than a short threshold value (step S1602).
When it is determined YES at step S1602, the CPU 101 sets the block size “BL” to a prescribed short value (step S1603).
When it is determined NO at step S1602, the CPU 101 judges whether the impulse response length (IR length) is shorter than a medium threshold value (step S1604).
When it is determined YES at step S1604, the CPU 101 sets the block size “BL” to a prescribed medium value (step S1605).
When it is determined NO at step S1604, the CPU 101 sets the block size “BL” to a prescribed large value (step S1606).
After implementing the processes at step S1603, S1605, or S1606, the CPU 101 reads first 2BL pieces of impulse response data stored in the ROM 102 (or the data loaded on the RAM 306 (
Further, the CPU 101 implements the FFT algorithm on the data following the 2BL pieces of impulse response data every blocks BL and expands the transformed data on the RAM 306 (
The CPU 101 confirms the system condition or, for example, refers to the table in the ROM 102 to obtain a block size “B1” which can be set to the CONV algorithm implementing unit 304 of
The CPU 101 refers to the convolution table stored in the ROM 102 to read a block size “B2” (step S1702). The information concerning a type of tone effect obtained at step S1501 in
The CPU 101 judges whether the block size “B1” obtained based on the system condition at step S1701 is equivalent to the block size “B2” obtained based on the type of tone effect (step S1703).
When it is determined YES at step S1703, the coefficient data for the FIR filter algorithm implementing unit 303 and the CONV algorithm implementing unit 304 is not renewed, and the same coefficient data is set or only the same reference number is set (step S1704).
When it is determined NO at step S1703, the coefficient data for the FIR filter algorithm implementing unit 303 and the CONV algorithm implementing unit 304 are renewed in a similar manner to the manner at steps S1607 and S1608 (step S1705).
After implementing the process at step S1704 or S1706, the CPU 101 finishes the block renewing process shown in
As described above, the embodiments of the present invention realize the signal processing apparatus which can change the filter order flexibly and also implement plural sorts of FIR filter algorithms.
In the embodiments of the present invention, when the FIR filter algorithm and CONV algorithm are implemented in combination to implement convolution, impulse response can be applied to a musical tone signal without block delay, while the block size is changed flexibly in accordance with the tone generating setting condition and the system condition. Therefore, the combination of FIR filter algorithm and CONV algorithm according to the embodiments of the invention can be used in the electronic musical instruments, enhancing response and reproducibility in their performance.
In the above embodiments, the controlling unit for performing various controlling operations is composed of CPU (general purpose processor) which executes a program stored in ROM (memory). But it is possible to compose such controlling unit with plural processors each specified in for performing a specific controlling operation. Each specified processor can be composed of a general processor (electronic circuit) for executing an arbitrary program and a memory for storing a control program for a specific control or specific electronic circuits each specified in a specific control.
Various sorts of filters (filtering operation implementing units) in the above embodiments can be composed of an analog circuit(s) or DSP (digital signal processor).
The apparatus for providing the various sorts of effects as described above can be composed of the above structures but also can be composed as follows:
The apparatus is provided with a first memory in which plural pieces of coefficient data used for implementing a filter algorithm are stored; and a processor which receives plural pieces of input data to be subjected to the filter algorithm, implements the filter algorithm using the plural pieces of coefficient data stored in the first memory and the plural pieces of received input data as many times as the number corresponding to a designated filter order, and outputs a result of implementing the filter algorithm, in which filter algorithm each piece of coefficient data and each piece of input data are multiplied together and resultant products are summed up.
The apparatus recited in the configuration example No. 1 is further provided with a second memory which stores plural pieces of received input data, wherein the filter algorithm is a Finite Impulse Response (FIR) filter algorithm; the first memory stores plural pieces of FIR coefficient data; and the processor implements the FIR filter algorithm using the plural pieces of FIR coefficient data stored in the first memory and the plural pieces of received input data stored in the second memory as many times as the number corresponding to a designated filter order, in which filter algorithm each piece of FIR coefficient data and each piece of input data are multiplied together and resultant products are summed up.
The apparatus recited in the Configuration examples No. 1 and No. 2, wherein the processor can designate a number corresponding to the filter order of the filter algorithm to be implemented within a predetermined number; the first memory stores at least the predetermined number of pieces of coefficient data; the second memory stores at least the predetermined number of pieces of input data.
The apparatus recited in the configuration examples No. 1 to No. 3 is further provided with a filter algorithm implementing unit which implements a first-order filter algorithm, wherein the first memory stores plural coefficient data sets as many as the number corresponding to the filter order of the filter algorithm at least for one sort of filter algorithm of variable filter order; the second memory stores input data set from the last sample to the sample before the (filter order−1)-th sample for the filter algorithm as delay data set; and the processor successively supplies the coefficient data stored in the first memory and current input data or the delay data stored in the second memory to the filter algorithm implementing unit and makes the filter algorithm implementing unit repeatedly implement the first-order filter algorithm by time division processing of a dividing time length corresponding to the filter order and output output-data in each sampling period.
The apparatus recited in the configuration example No. 4, wherein the processor assigns continuous time durations of a time length counted by a clock having a cycle subdividing a sampling period to the filter algorithms respectively, each time length being long enough for implementing the filter algorithm of the filter order in the sampling period; successively supplies the coefficient data stored in the first memory and the current input data or the delay data stored in the second memory to the filter algorithm implementing unit and makes the filter algorithm implementing unit implement the filter algorithm in the continuous time duration, in which filter algorithm the successively supplied data are multiplied together and resultant products are summed up in synchronism with the clock; and controls the filter algorithm implementing unit to output output-data of the filter algorithms in each sampling period.
The apparatus recited in the configuration example No. 4, wherein the filter algorithm implementing unit has: a first register which retains in synchronism with the clock the coefficient data output from the first memory; a first selector which selects either one of input data in the current sampling period and the delay data output from the second memory; a second register which holds in synchronism with the clock the data output from the first selector; a multiplier which multiplies the coefficient data output from the first register and the data output from the second register to obtain product data; a third register which retains in synchronism with the clock the product data output from the multiplier; an adder which adds the product data output from the third register and current summed-up data together to obtain sum data; a fourth register which retains in synchronism with the clock the sum data output from the adder; and a second selector which selects either one of data of a value “0” and the sum data output from the fourth register to feed back the selected data as the summed-up data to the adder.
The apparatus for applying an acoustic effect to an original tone by convoluting the original tone with impulse response data of an acoustic effect tone, the apparatus having: a time-domain convolution implementing unit which employs the FIR filter algorithm implemented by the signal processing apparatus recited in the configuration example No. 2 to convolute the original tone with first half data of the impulse response data in a time domain of unit of the sampling period; and a frequency-domain convolution implementing unit which implement a Fast Fourier Transform algorithm on second half data of the impulse response data in a frequency domain of unit of block, thereby convoluting the original tone with the second half data.
The apparatus recited in the configuration example No. 7, wherein the first half data and the second half data of the impulse response data are set arbitrarily.
The apparatus recited in the configuration example No. 7 is further provided with a setting unit which decides a block size of the block and sets a filter order of the FIR filter algorithm and an FFT point number of FFT algorithm implementing unit to twice as large as the block size.
The apparatus recited in the configuration example No. 9, wherein the setting unit decides the block size in accordance with a time length of the impulse response data.
The apparatus recited in the configuration example No. 9, wherein the setting unit decides the block size in accordance with a tone generation setting condition of the original tone.
The apparatus recited in the configuration example No. 9, wherein the setting unit stores coefficient data in a time domain of the impulse response data; after deciding the block size, removes FIR coefficient data of filter order equivalent to twice as large as the block size to be used in the FIR filter algorithm from the coefficient data of the impulse response data to obtain remaining coefficient data; and implements a Fast Fourier Transform algorithm on the remaining coefficient data to transform the same data to coefficient data for convolution in the frequency domain, expanding the same on a memory.
The apparatus recited in the Configuration example 12, wherein the setting unit adds data indicating the decided block size to the coefficient data for convolution in the frequency domain and stores resultant data; when the block size is decided again and the decided block size is different from the previously stored block size, implements the Fast Fourier Transform algorithm on the coefficient data for convolution in the frequency domain, thereby renewing the same coefficient data.
Although specific embodiments of the invention have been described in the foregoing detailed description, it will be understood that the invention is not limited to the particular embodiments described herein, but modifications and rearrangements may be made to the disclosed embodiments while remaining within the scope of the invention as defined by the following claims. It is intended to include all such modifications and rearrangements in the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2017-049459 | Mar 2017 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
5195140 | Kudo | Mar 1993 | A |
5248845 | Massie | Sep 1993 | A |
5536902 | Serra | Jul 1996 | A |
5587548 | Smith, III | Dec 1996 | A |
5777249 | Suzuki | Jul 1998 | A |
5814750 | Wang | Sep 1998 | A |
8653354 | Van Buskirk | Feb 2014 | B1 |
20020053275 | Ogawa | May 2002 | A1 |
20050145099 | Lengeling | Jul 2005 | A1 |
20080202321 | Goto | Aug 2008 | A1 |
20090025538 | Arimoto | Jan 2009 | A1 |
20090107322 | Akiyama | Apr 2009 | A1 |
Number | Date | Country |
---|---|---|
2003263178 | Sep 2003 | JP |
2003280675 | Oct 2003 | JP |
2005215058 | Aug 2005 | JP |
2008299005 | Dec 2008 | JP |
Entry |
---|
Gardner, “Efficient Convolution without Input-Output Delay,” J. Audio Eng. Soc., vol. 43, No. 3, Mar. 1995, pp. 127-136. |
Number | Date | Country | |
---|---|---|---|
20180268794 A1 | Sep 2018 | US |