Patent Description:
The present disclosure relates to a musical sound signal generation device, a musical sound signal generation method, and a program.

The number of delay units constituting a wave guide modeling sound source is an integer and is discrete. Therefore, a technique for achieving a delay length of a fraction finer than the integer corresponding to the number of delay units is required in order to determine a strict frequency.

As a related art for continuously achieving fractional delay lengths in a wide frequency band, for example, there is known a technique of inserting an all-pass filter before a final stage of a delay unit in <CIT>. This technique achieves a musical sound signal synthesis device including: a first all-pass filter APF1; a second all-pass filter APF2; a variable connection means for connecting the first and second all-pass filters to selected different stages of delay elements; a control means for controlling the all-pass filters and the variable connection means such that delay times become equal in outputs of the first and second all-pass filters; and a weighted addition means for performing weighted addition of the outputs of the first and second all-pass filters. In this related art, it is possible to prevent a decrease in amplitude in a high frequency band by using the all-pass filter. In addition, in this related art, a fractional delay length is generated by the weighted addition of the two all-pass filters to suppress generation of noise due to discontinuous transition of a coefficient of the all-pass filter between <NUM> and <NUM> when a tone pitch frequency changes with time and an integer delay length in a wave guide modeling sound source is switched with a lapse of time, such as at the time of pitch bend.

<CIT> discloses a tone generator for an electronic musical instrument is fundamentally configured by a drive-waveform creating portion and a closed loop. The drive-waveform creating portion creates a drive-waveform signal by mixing an excitation waveform and a noise waveform together. The drive-waveform signal is applied to the closed loop through an adder. The closed loop contains a plurality of feedback paths, each of which at least contains a delay circuit and an all-pass filter. The adder adds all of output signals of the feedback paths together with the drive-waveform signal so as to produce a musical tone signal. The number of delay stages, representing an amount of delay to be used in each delay circuit provided in each feedback path, is designated in response to a delay ratio which is arbitrarily set. Since the signal repeatedly circulates through the closed loop containing a plurality of feedback paths, each having a specific signal processing function, the musical tone signal to be produced has a rich amount of overtone components.

<CIT> discloses a system and method for generating fractional length delay lines in a digital signal processing system. A sampled data, non-integer delay line interpolation structure (<NUM>) includes a sampled data delay line (<NUM>), two allpass filters (<NUM>, <NUM>), each having an associated read pointer (<NUM>, <NUM>) for reading data at a corresponding integer position of the delay line, an alternating crossfader (<NUM>) that alternatingly crossfades between the outputs of the two allpass filters, plus a controller (<NUM>) that controls when the read position of each allpass filter is updated and also controls when the filter coefficient of each allpass filter is updated. A specified delay length value is sampled by the controller each time the crossfade orientation of the alternating crossfader is changed, and from that value the controller generates a new read pointer and filter coefficient for allpass filter to which the structure will next crossfade.

<CIT> discloses an effect adding system capable of simulating tones of stringed instruments. An object of the invention is to obtain musical tones being equivalent to those of an acoustic guitar with a hollow body with only an electric guitar with a solid body. For the sake of attaining this object, the effecting system according to the invention is composed of an absolute value detecting means for detecting absolute values of musical tone signals in response to oscillations of the strings, a delay time setting means for setting a delay time based on the absolute values detected by the above described absolute value detecting means, and a delay means for delaying the above described musical tone signals by the delay time which was set by the above described delay time setting means.

In the above-described related art, however, it is necessary to operate the two all-pass filters such that the delay times are always equal and to perform the weighted addition of the outputs of the two all-pass filters. Thus, an operation of constantly multiplying a filter coefficient twice is executed in each calculation of the two all-pass filters, and a multiplication operation in the weighted addition is also required, so that a total of at least six multiplication operations are required per sample. In a case where, for example, <NUM> polyphonic sounds are simultaneously generated using such a technique of the wave guide modeling sound source with a large number of multiplication operations (for example, in the case of a modeling sound source of a piano), it is necessary to perform multiplication operations, for example, at least <NUM> times × <NUM> polyphonic sounds = <NUM>,<NUM> times of multiplication operations in total per sample, and there is a problem that the amount of calculation for musical sound generation increases as a whole.

Therefore, one advantage of the present disclosure is to generate a musical sound with a small amount of calculation.

A musical sound signal generation device according to appended claim <NUM>, a musical sound signal generation method according to claim <NUM> and a program according to claim <NUM>.

The musical sound signal generation device continuously connects any one of a connected zeroth delay unit and a connected second delay unit to a fractional delay block and connects at least any one of a new zeroth delay unit and a new second delay unit to at least any one of the fractional delay block other than the fractional delay block connected to a new first delay unit in response to setting any one of the connected zeroth delay unit and the connected second delay unit as the new first delay unit, setting a delay unit in a preceding stage of the new first delay unit as the new zeroth delay unit, and setting a delay unit in a subsequent stage of the new first delay unit as the new second delay unit in accordance with a change in a designated tone pitch.

According to the present disclosure, it is possible to generate the musical sound with the small amount of calculation.

Hereinafter, modes for carrying out the present disclosure will be described in detail with reference to the drawings. An electronic device includes a musical sound signal generation device <NUM>, a performance operator (not illustrated), and a speaker. The performance operator corresponds to a key when the electronic device is a keyboard, such as an electronic piano, and corresponds to a mouthpiece when the electronic device is an electronic wind instrument. <FIG> is a block diagram illustrating exemplary hardware of an embodiment of the musical sound signal generation device <NUM> according to the present disclosure. The musical sound signal generation device <NUM> includes: at least one central processing unit (CPU) <NUM> as a processor; a read only memory (ROM) <NUM>; a random access memory (RAM) <NUM>; a digital signal processor (DSP) or a wave guide model circuit <NUM>; a pitch bend sensor <NUM> and an analog-to-digital converter (ADC) <NUM> to which an output of the pitch bend sensor <NUM> is connected; a volume sensor <NUM> and an ADC or a digital input port <NUM> configured to detect the volume sensor <NUM>; a tone pitch designation switch <NUM> and a digital input port <NUM> to which an output of the tone pitch designation switch is connected; a digital-to-analog converter (DAC)/amplifier <NUM>; and a system bus <NUM>. The CPU <NUM>, the ROM <NUM>, the RAM <NUM>, the DSP or wave guide model circuit <NUM>, the ADC <NUM>, the ADC or digital input port <NUM>, the digital input port <NUM>, and the DAC/amplifier <NUM> are connected to each other by the system bus <NUM>. Here, the volume sensor <NUM> and the tone pitch designation switch <NUM> may be the same. For example, in a case where the musical sound signal generation device <NUM> is an electronic piano, a switch sensing that a key has been pushed serves as both a tone pitch sensor and a volume sensor.

In the present embodiment, an example of using the CPU <NUM> and the DSP <NUM> is described as an embodiment in which the present disclosure is implemented as software. However, the CPU <NUM> may play the role of the DSP <NUM>. In addition, the function of the DSP <NUM> may be implemented by the hardware wave guide model circuit <NUM>. <FIG> is a block diagram illustrating exemplary functions implemented by the DSP or wave guide model circuit <NUM>.

A wave guide model control unit <NUM>, which is a control circuit, receives tone pitch information <NUM> (for example, a note number depending on a key in the case of the electronic piano) input from the tone pitch designation switch <NUM> in <FIG> and bend information (pitch change amount) <NUM> transmitted from the pitch bend sensor <NUM> in <FIG> as input signals, calculates a delay length of a wave guide model corresponding to a frequency f at which a sound needs to be generated, calculates the number of delay units k that is an integer part of the delay length and a filter coefficient g of an all-pass filter (fractional delay block) that determines a fractional part f of the delay length, and outputs the calculated number of delay units k and the calculated filter coefficient g to a wave guide model calculation unit <NUM>.

Here, it is known that there is a relationship of <MAT> between the fractional part f of the delay length and the filter coefficient g of the all-pass filter.

In addition, the wave guide model control unit <NUM> calculates a volume <NUM> of an excitation original sound <NUM> on the basis of volume information <NUM> input from the volume sensor <NUM> in <FIG>. Then, the excitation original sound <NUM> is multiplied by the volume <NUM> by a multiplier <NUM>. Here, the excitation original sound <NUM> is a signal that serves as a source of resonance in wave guide modeling and is a signal that is recorded in advance and stored in, for example, the ROM <NUM> in <FIG>, is copied from the ROM <NUM> to the RAM <NUM> in response to an activation of a system, and is read from the RAM <NUM> in response to a start of sound generation control, or is a signal synthesized by calculation.

The wave guide model calculation unit <NUM> receives the excitation original sound <NUM> multiplied by the volume <NUM> as an input signal x(n) and the delay length (the number of delay units k and the filter coefficient g), performs calculation to be described later with reference to <FIG>, and outputs a musical sound signal <NUM>. The musical sound signal <NUM> is input to the DAC/amplifier <NUM> in <FIG> and emitted via a speaker or the like of an electronic device (electronic musical instrument).

<FIG> is a diagram illustrating an exemplary block configuration of the wave guide model calculation unit <NUM> in <FIG>. In <FIG>, a delay line <NUM> includes N (a plurality of) delay units <NUM> including #<NUM> to #N-<NUM> connected in a cascade manner (in series). The delay unit <NUM> delays an input signal by one sampling time and outputs the delayed signal. A symbol z-<NUM> in each of the delay units <NUM> in <FIG> indicates that a delay operation for one sample in z-conversion is executed. A signal obtained by adding, by an adder <NUM>, a signal obtained by multiplying the input signal x(n) (see <FIG>) generated on the basis of the excitation original sound <NUM> by a predetermined gain by a multiplier <NUM> to a feedback signal <NUM> is input to a delay unit <NUM>(#<NUM>) at the head of the delay line <NUM>. Outputs of the delay units <NUM> in the delay line <NUM> can be taken out from delay line switch terminals d1 to dN, respectively.

In the present embodiment, the wave guide model calculation unit <NUM> includes three all-pass filter circuits (hereinafter referred to as "APF") <NUM> including #<NUM>, #<NUM>, and #<NUM>. The APF <NUM> is connected to both ends of any of the delay units <NUM> in the delay line <NUM>, thereby operating as the all-pass filter. The APF <NUM> includes: a multiplier <NUM> that multiplies a signal on an input side of the connected delay unit <NUM> by a feedforward gain g (g0, g1, or g2); an adder <NUM> that adds a signal on an output side of the connected delay unit <NUM>, an output signal of the multiplier <NUM>, and an output signal of a multiplier <NUM> to be described later and selectively outputs the added output signal to a switch <NUM>; a feedback delay unit <NUM> that delays the added output signal by one sampling time; and the multiplier <NUM> that multiplies an output signal of the feedback delay unit <NUM> by a feedback gain -g (-g0, -g1, or -g2) and outputs the multiplied output signal to the adder <NUM>.

Each set of connection terminals i00 and i01 of the APF <NUM>(#<NUM>), connection terminals i10 and i11 of the APF <NUM>(#<NUM>), and connection terminals i20 and i21 of the APF <NUM>(#<NUM>) is connected to delay line switch terminals at both ends of the same delay unit <NUM> of the delay line <NUM>.

In addition, the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) respectively include sets of the feedforward gain and the feedback gain, that is, (g0 and -g0), (g1 and -g1), and (g2 and -g2). Hereinafter, the feedforward gain and the feedback gain are collectively referred to as a filter coefficient of the all-pass filter.

The APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) are always connected to the respective adjacent delay units <NUM> in the delay line <NUM>, and the order thereof is controlled to be switched in the order of an annular ring by pitch bend control processing to be described later.

Each output destination of the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), or the APF <NUM>(#<NUM>) is connected to each output selection terminal o0, o1, or o2 of the switch <NUM>, and one of the output selection terminals is selected to output an output signal y(n), whereby the musical sound signal <NUM> is output. In addition, the output signal y(n) is multiplied by an output feedback gain by the multiplier <NUM>, and the multiplication result is added to the input signal x(n) by the adder <NUM>.

<FIG> is a diagram illustrating exemplary connections of the three sets of APFs <NUM> including #<NUM>, #<NUM>, and #<NUM> to the delay line <NUM> in the wave guide model calculation unit <NUM> in <FIG> having the configuration of <FIG>. As described above, the wave guide model control unit <NUM> in <FIG> calculates the delay length of the wave guide model corresponding to the frequency f at which a sound needs to be generated on the basis of the tone pitch information <NUM> input from the tone pitch designation switch <NUM> in <FIG>, which is the performance operator of the electronic musical instrument, for example, and then, designates the number of delay units k, which is the integer part of the delay length, to the wave guide model calculation unit <NUM>. In addition, the wave guide model control unit <NUM> in <FIG> calculates the filter coefficient g of the APF <NUM> that defines the fractional part f of the delay length by calculation represented by Formula (<NUM>) described above, and designates the filter coefficient g to the wave guide model calculation unit <NUM>.

As a result, in the wave guide model calculation unit <NUM> in <FIG>, delay line switch terminals dk and dk+<NUM> at both ends of a delay unit <NUM>(#k) in the delay line <NUM>, which is a first delay unit that generates a delay of the integer part of the delay length corresponding to a designated tone pitch designated by the wave guide model control unit <NUM>, are respectively connected to the connection terminals i10 and i11 of the APF <NUM>(#<NUM>).

In addition, delay line switch terminals dk-<NUM> and dk at both ends of a delay unit <NUM>(#k-<NUM>), which is a zeroth delay unit in an immediately preceding stage of the delay unit <NUM>(#k), which is the first delay unit, in the delay line <NUM> are respectively connected to the connection terminals i00 and i01 of the APF <NUM>(#<NUM>).

Furthermore, delay line switch terminals dk+<NUM> and dk+<NUM> at both ends of a delay unit <NUM>(#k+<NUM>), which is a second delay unit in an immediately subsequent stage of the delay unit <NUM>(#k), which is the first delay unit, in the delay line <NUM> are respectively connected to the connection terminals i20 and i21 of the APF <NUM>(#<NUM>).

The wave guide model control unit <NUM> in <FIG> sets the feedforward gain g and the feedback gain -g of the filter coefficient g, calculated by the calculation represented by Formula (<NUM>) to correspond to the fractional part f of the delay length corresponding to the designated tone pitch, respectively in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>).

In addition, a value of <NUM> that causes a delay of a value of <NUM> in the fractional part is set as the feedforward gain and the feedback gain of the filter coefficient in both of the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>).

Further, values of <NUM> and -<NUM> that cause a delay of a value of <NUM> of the fractional part are respectively set as the feedforward gain and the feedback gain of the filter coefficient in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>).

Then, the switch <NUM> causes conduction of the output selection terminal o1. As a result, an output signal of the APF <NUM>(#<NUM>) is selected as the output signal y(n) via the switch <NUM>, whereby the musical sound signal <NUM> is output. In addition, the output signal y(n) is multiplied by the output feedback gain by the multiplier <NUM>, and the result is added to the input signal x(n) by the adder <NUM>.

As a result of the above control operation, as the musical sound signal <NUM>, the integer part k of the delay length corresponding to the designated tone pitch is generated by the delay units <NUM> including #<NUM> to #k-<NUM> in the delay line <NUM>, and the fractional part f of the delay length is generated by the APF <NUM>(#<NUM>) that operates on the basis of the filter coefficient g calculated by the calculation represented by Formula (<NUM>).

In this case, a circuit including the delay line <NUM> and the APF <NUM>(#<NUM>) has flat frequency characteristics, and thus, it is possible to prevent a decrease in amplitude in a high frequency band.

<FIG> is an explanatory diagram of an effect of reducing a calculation load in the embodiment. As described above, the value of <NUM> that causes the delay of the value of <NUM> in the fractional part is set as the feedforward gain and the feedback gain of the filter coefficient in both of the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>). Therefore, it is substantially unnecessary for the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) to execute a multiplication operation with a large load, and the APF <NUM>(#<NUM>) in <FIG> is an equivalent circuit illustrated in <FIG>. That is, it is sufficient for the APF <NUM>(#<NUM>) to execute an operation of outputting an output from the delay unit <NUM>(#k-<NUM>) in the delay line <NUM> via the delay line switch terminal dk directly to the output selection terminal o0 of the switch <NUM>.

On the other hand, the value of <NUM> and the value of -<NUM> that cause the delay of the value of <NUM> of the fractional part are respectively set as the feedforward gain and the feedback gain of the filter coefficient in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) as described above. Therefore, it is substantially unnecessary for the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) to execute a multiplication operation with a large load, and the APF <NUM>(#<NUM>) in <FIG> is an equivalent circuit illustrated in <FIG>. That is, it is sufficient for the APF <NUM>(#<NUM>) to execute an operation of inputting an output from the delay unit <NUM>(#k) in the delay line <NUM> via the delay line switch terminal dk+<NUM> directly to the adder <NUM>(#<NUM>), changing a sign of an output of the feedback delay unit <NUM>(#<NUM>) by the multiplier <NUM>(#<NUM>), and inputting the output with the changed sign to the adder <NUM>(#<NUM>).

As described above, the multiplication operation is substantially necessary only in the APF <NUM>(#<NUM>) in the present embodiment, and the multiplication operation is unnecessary in the APF <NUM>(#<NUM>) and the APF <NUM>(#<NUM>). Therefore, the calculation load can be greatly reduced particularly in musical sound generation by the wave guide modeling with a large number of polyphonic sounds as compared with a technique of <CIT> in which two all-pass filters are used,.

Next, a description will be given regarding a principle of the pitch bend control processing in a case where a player has changed a tone pitch (pitch) of a playing sound being generated by operating the pitch bend sensor <NUM> (<FIG>) of the musical instrument.

In <FIG>, the wave guide model control unit <NUM> sequentially calculates a delay length of a new designated tone pitch on the basis of the sequentially input bend information <NUM>, and sequentially outputs the number of delay units k, which is an integer part of the delay length, and the filter coefficient g, calculated by the calculation represented by Formula (<NUM>) corresponding to the fractional part f, to the wave guide model calculation unit <NUM>.

Here, if a value of the number of delay units k does not change, only the filter coefficient g changes. This means that a change in wavelength of the musical sound signal <NUM> settles within one sampling time. For example, in a case where the player performs a pitch bend operation to decrease a pitch so that the fractional part f of a delay length corresponding to a new designated tone pitch sequentially increases, a value of the filter coefficient g calculated by the calculation represented by Formula (<NUM>) described above is designated to be sequentially decreased.

<FIG> is a diagram illustrating a change in the connections of the three sets of APFs <NUM> to the delay line <NUM> when the number of delay units k, which is the integer part of the delay length, increases. When the player performs the pitch bend operation to decrease the pitch so that the fractional part f of the delay length corresponding to the new designated tone pitch sequentially increases and reaches a value of <NUM>, the wave guide model control unit <NUM> in <FIG> increments a value of the number of delay units k, which is the integer part of the delay length of the designated tone pitch to be output to the wave guide model calculation unit <NUM>, by +<NUM>. At this time, the fractional part f of the delay length becomes <NUM> due to the increment of the number of delay units k, the value of the filter coefficient g calculated by the calculation represented by Formula (<NUM>) becomes <NUM>.

When the value of the number of delay units k designated by the wave guide model control unit <NUM> has been incremented by +<NUM> and changed in this manner, in the wave guide model calculation unit <NUM> illustrated in <FIG>, the operation of the all-pass filter is handed over to the APF <NUM>(#<NUM>), which has been connected to the delay line switch terminals dk+<NUM> and dk+<NUM> at both ends so far, with a new delay unit <NUM>(#k+<NUM>) in the delay line <NUM> corresponding to the changed number of delay units k+<NUM> as a new first delay unit.

In addition, as a result of the handover in <FIG>, the switch <NUM> cuts off the conduction of the output selection terminal o1 and newly causes conduction of the output selection terminal o2.

At this time, the value of <NUM> and the value of -<NUM> that cause the delay of the value of <NUM> of the fractional part are respectively set as the feedforward gain and the feedback gain of the filter coefficient in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) for the operation as described above. Therefore, the above-described operation of switching the operation of the all-pass filter from the APF <NUM>(#<NUM>) to the APF <NUM>(#<NUM>) matches well with the operation of controlling the fractional part f designated by the wave guide model control unit <NUM> in Fig. <NUM> to <NUM>.

In addition, the APF <NUM>(#<NUM>) continuously operates according to actual signals from the delay line switch terminals dk+<NUM> and dk+<NUM>, and thus, it is possible to perform control so as not to generate noise at the time of switching the APF <NUM>.

Here, as the value of the fractional part f increases in the APF <NUM>(#<NUM>), the value of the filter coefficient g calculated by the calculation represented by Formula (<NUM>) decreases toward <NUM> as described above. However, when the control is switched from the APF <NUM>(#<NUM>) to the APF <NUM>(#<NUM>), the operation is started with the value of the fractional part f being reset to <NUM>, and thus, it is necessary to cause a jump of the value of the filter coefficient g from the vicinity of <NUM> to the vicinity of <NUM> at this moment. Such a discontinuous jump of the value is not so preferable when envelope control is performed on the filter coefficient g.

Therefore, in the present embodiment, in a case where the delay unit <NUM> operating as the first delay unit is, for example, an even-numbered delay unit, the filter coefficient g is calculated by the calculation processing represented by Formula (<NUM>) described above.

On the other hand, in a case where the delay unit <NUM> operating as the first delay unit is, for example, an odd-numbered delay unit, the filter coefficient g is calculated by calculation processing represented by the following Formula (<NUM>).

In this case, coefficients (<NUM>-g) and -(<NUM>-g) calculated using the coefficient g calculated by the calculation represented by the above Formula (<NUM>) are respectively set as a feedforward gain and a feedback gain in the multipliers <NUM> and <NUM>.

In the example of <FIG>, for example, in a case where the APF <NUM>(#<NUM>) has executed the operation of the all-pass filter so far and g and -g have been set as a feedforward gain and a feedback gain in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>), control may be performed such that (<NUM>-g) and -(<NUM>-g) are set as the feedforward gain and the feedback gain in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>), respectively, when the operation of the all-pass filter is switched from the APF <NUM>(#<NUM>) to the APF <NUM>(#<NUM>) as described above.

<FIG> is an explanatory view of a method of continuously controlling the filter coefficient g. For example, a case is considered in which the filter coefficient g decreases with an increase of a fraction of a delay length as illustrated in <FIG> by the calculation represented by Formula (<NUM>) in a section t1 in which a value of the number of delay units, which is an integer part of the delay length, is k as illustrated in <FIG>. When a value of the filter coefficient g reaches <NUM> in the section t1, the value of the number of delay units, which is the integer part of the delay length, is switched from k to k+<NUM>, which is a section t2, as illustrated in <FIG>. In the new section t2, the value of the filter coefficient g is controlled to increase from the minimum value of <NUM> with the increase of the fraction of the delay length as illustrated in <FIG> by the calculation represented by Formula (<NUM>) by the control method described above.

As described above, in the present embodiment, the filter coefficient g can be calculated by switching between the calculation represented by Formula (<NUM>) and the calculation represented by Formula (<NUM>) depending on whether the delay unit <NUM> operating as the first delay unit is an even-numbered (or odd-numbered) delay unit or an odd-numbered (or even-numbered) delay unit, and the filter coefficient g designated to the wave guide model calculation unit <NUM> by the wave guide model control unit <NUM> in <FIG> can be continuously changed as illustrated in <FIG> by switching between the set of g and -g and the set of (<NUM>-g) and -(<NUM>-g) to be set in the multipliers <NUM> and <NUM> in the APF <NUM>.

As a result, the filter coefficient g changing as illustrated in <FIG> can be output as an envelope value by the calculation processing represented by Formula (<NUM>) or (<NUM>) with the fractional part f of the delay length as the input by using an envelope generator circuit generally used in the electronic musical instrument technology.

In <FIG>, in a case where the number of delay units k, which is an integer part of a delay length, increases so that an object that performs the operation of the all-pass filter as a first delay unit is switched from the APF <NUM>(#<NUM>) to the new APF <NUM>(#<NUM>) as described above, the delay unit <NUM>(#k) that has operated as the first delay unit so far is recognized as a zeroth delay unit in an immediately preceding stage of the delay unit <NUM>(#k+<NUM>), which is a new first delay unit, and a value of <NUM> that causes a delay of a value of <NUM> of a fractional part as an all-pass filter circuit connected to the zeroth delay unit is set as the feedforward gain and the feedback gain of the filter coefficient in both of the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) which has been connected to the delay line switch terminals dk and dk+<NUM> on both sides as illustrated in <FIG>.

In addition, in <FIG>, the delay unit <NUM>(#k+<NUM>) is recognized as a second delay unit in an immediately subsequent stage of the delay unit <NUM>(#k+<NUM>) which is a new first delay unit, the connection terminals i00 and i01 of the APF <NUM>(#<NUM>) are newly connected to the delay line switch terminals dk+<NUM> and dk+<NUM> on both sides, respectively, and a value of <NUM> and a value of -<NUM> that cause a delay of a value of <NUM> of a fractional part as an all-pass filter circuit connected to the second delay unit are respectively set as the feedforward gain and the feedback gain of the filter coefficient in the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>).

Note that an output of the feedback delay unit <NUM> may be cleared to <NUM> before the connection of each of the APFs <NUM> is switched as described above.

<FIG> is a diagram illustrating a change in the connections of the three sets of APFs <NUM> to the delay line <NUM> when the number of delay units k, which is the integer part of the delay length, decreases. When the player performs the pitch bend operation to increase the pitch so that the fractional part f of the delay length corresponding to the new designated tone pitch sequentially decreases and reaches a value of <NUM>, the wave guide model control unit <NUM> in <FIG> decrements a value of the number of delay units k, which is the integer part of the delay length of the designated tone pitch to be output to the wave guide model calculation unit <NUM>, by <NUM>. At this time, the fractional part f of the delay length becomes the maximum value of <NUM> due to the decrement of the number of delay units k, the value of the filter coefficient g calculated by the calculation represented by Formula (<NUM>) becomes <NUM>.

When the value of the number of delay units k designated by the wave guide model control unit <NUM> has been decremented by <NUM> and changed in this manner, in the wave guide model calculation unit <NUM> illustrated in <FIG>, the operation of the all-pass filter is handed over to the APF <NUM>(#<NUM>), which has been connected to the delay line switch terminals dk-<NUM> and dk at both ends so far, with a new delay unit <NUM>(#k-<NUM>) in the delay line <NUM> corresponding to the changed number of delay units k-<NUM> as a new first delay unit.

In addition, as a result of the handover in <FIG>, the switch <NUM> cuts off the conduction of the output selection terminal o1 and newly causes conduction of the output selection terminal o0.

At this time, the value of <NUM> that cause the delay of the value of <NUM> of the fractional part is set as the feedforward gain and the feedback gain of the filter coefficient in both the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) for the operation as described above. Therefore, the above-described operation of switching the operation of the all-pass filter from the APF <NUM>(#<NUM>) to the APF <NUM>(#<NUM>) matches well with the operation of controlling the fractional part f designated by the wave guide model control unit <NUM> in Fig. <NUM> to <NUM>.

In addition, the APF <NUM>(#<NUM>) continuously operates according to actual signals from the delay line switch terminals dk-<NUM> and dk, and thus, it is possible to perform control so as not to generate noise at the time of switching the APF <NUM>.

Here, as the value of the fractional part f decreases in the APF <NUM>(#<NUM>), the value of the filter coefficient g calculated by the calculation represented by Formula (<NUM>) increases toward <NUM> as described above. However, when the control is switched from the APF <NUM>(#<NUM>) to the APF <NUM>(#<NUM>), the operation is started with the value of the fractional part f being set to <NUM>, and thus, it is necessary to cause a jump of the value of the filter coefficient g from the vicinity of <NUM> to the vicinity of <NUM> at this moment. Such a nonlinear jump of the value is not so preferable when envelope control is performed on the filter coefficient g even in the case where the value of the number of delay units k, which is the integer part of the delay length, decreases as in the case where the value of the number of delay units k, which is the integer part of the delay length, increases.

Therefore, in the present embodiment, control is performed to calculate the filter coefficient g by switching between the calculation represented by Formula (<NUM>) described above and the calculation represented by Formula (<NUM>) depending on whether the delay unit <NUM> operating as the first delay unit is an even-numbered (or odd-numbered) delay unit or an odd-numbered (or even-numbered) delay unit, and to switch between the set of g and -g and the set of (<NUM>-g) and -(<NUM>-g) to be set in the multipliers <NUM> and <NUM> in the APF <NUM> as in the case where the value of the number of delay units k, which is the integer part of the delay length, increases.

For example, in <FIG> described above, a case is considered in which the filter coefficient g increases with a decrease of a fraction of a delay length as illustrated in <FIG> by the calculation represented by Formula (<NUM>) in a section t1 in which a value of the number of delay units, which is an integer part of the delay length, is k as illustrated in <FIG>. When a value of the filter coefficient g reaches <NUM> in the section t1, the value of the number of delay units, which is the integer part of the delay length, is switched from k to k-<NUM>, which is a section t0, as illustrated in <FIG>. In the new section t0, the value of the filter coefficient g is controlled to decrease from the maximum value of <NUM> with the decrease of the fraction of the delay length as illustrated in <FIG> by the calculation represented by Formula (<NUM>) by the control method described above.

As described above, in the present embodiment, even in the case where the value of the number of delay units k, which is the integer part of the delay length, decreases, it is possible to calculate the filter coefficient g by switching between the calculation represented by Formula (<NUM>) and the calculation represented by Formula (<NUM>) depending on whether the delay unit <NUM> operating as the first delay unit is an even-numbered (or odd-numbered) delay unit or an odd-numbered (or even-numbered) delay unit, and to continuously change the filter coefficient g, designated to the wave guide model calculation unit <NUM> by the wave guide model control unit <NUM> in <FIG>, as illustrated in <FIG> by switching between the set of g and -g and the set of (<NUM>-g) and -(<NUM>-g) to be set in the multipliers <NUM> and <NUM> in the APF <NUM> as in the case where the value of the number of delay units k, which is the integer part of the delay length, increases.

In <FIG>, in a case where the number of delay units k, which is an integer part of a delay length, decreases so that an object that performs the operation of the all-pass filter as a first delay unit is switched from the APF <NUM>(#<NUM>) to the new APF <NUM>(#<NUM>) as described above, the delay unit <NUM>(#k) that has operated as the first delay unit so far is recognized as a second delay unit in an immediately subsequent stage of the delay unit <NUM>(#k-<NUM>), which is a new first delay unit, and a value of <NUM> and a value of -<NUM> that cause a delay of a value of <NUM> of a fractional part as an all-pass filter circuit connected to the second delay unit are respectively set as the feedforward gain and the feedback gain of the filter coefficient in both of the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) which has been connected to the delay line switch terminals dk and dk+<NUM> on both sides as illustrated in <FIG>.

In addition, in <FIG>, the delay unit <NUM>(#k-<NUM>) is recognized as a zeroth delay unit in an immediately preceding stage of the delay unit <NUM>(#k-<NUM>) which is a new first delay unit, the connection terminals i20 and i21 of the APF <NUM>(#<NUM>) are newly connected to the delay line switch terminals dk-<NUM> and dk-<NUM> on both sides, respectively, and a value of <NUM> that causes a delay of a value of <NUM> of a fractional part as an all-pass filter circuit connected to the zeroth delay unit is set as the feedforward gain and the feedback gain of the filter coefficient in both the multipliers <NUM>(#<NUM>) and <NUM>(#<NUM>) of the APF <NUM>(#<NUM>).

Note that the output of the feedback delay unit <NUM> may be cleared to <NUM> before the connection of each of the APFs <NUM> is switched as described above, which is similar to the case of <FIG>.

<FIG> and <FIG> are flowcharts illustrating an example of the pitch bend control processing executed on the basis of the principle described above. This processing is processing in which the CPU <NUM> in <FIG> loads a pitch bend control program stored in the ROM <NUM> onto the RAM <NUM> and executes the program. The flowcharts in <FIG> and <FIG> are views obtained by expressing, as flowcharts, control time sequences of the wave guide model control unit <NUM> and the wave guide model calculation unit <NUM> in <FIG> in a case where a value of the number of delay units k, which is an integer part of a delay length of a designated tone pitch, and the fractional part f is changed from L1 to L2 by the pitch bend sensor <NUM> after sound generation when the APF <NUM>(#<NUM>) is connected to both the ends of the delay unit <NUM>(#k-<NUM>), the APF <NUM>(#<NUM>) is connected to both the ends of the delay unit <NUM>(#k), and the APF <NUM>(#<NUM>) is connected to both the ends of the delay unit <NUM>(#k+<NUM>).

When pitch bend is started, the CPU <NUM> determines whether L2 is larger or smaller than L1, that is, whether to execute bend-down or bend-up in step S1.

When L1 < L2, that is, in the case of the bend-down, the CPU <NUM> adds a rate r to the fractional part f of the delay length in step S2. Note that "+=" represents an operation of adding a variable value on the right side to a variable value on the left side.

When L which is a value of the fractional part f and the number of delay units k which is an integer part of a delay length, is larger than a target value in step S3, the CPU <NUM> causes the fractional part f to coincide with L2 for coincidence with the target value in step S4.

Next, the CPU <NUM> determines whether the number of delay units k is an even number or an odd number in step S5. Note that "%" is an operation of calculating a remainder obtained by dividing the value of the number of delay units k by <NUM>. The number of delay units k is the even number if a result of the operation is <NUM>, and the number of delay units k is the odd number if the result of the operation is not <NUM>.

When k is the even number, the CPU <NUM> sets a coefficient calculated from the fractional part f by the calculation represented by Formula (<NUM>) as the filter coefficient g in step S6.

When k is the odd number, the CPU <NUM> sets a coefficient calculated from the fractional part f by the calculation represented by Formula (<NUM>) as <NUM>-g in step S8.

Thereafter, when g < <NUM> or <NUM>-g < <NUM> is not satisfied in step S7 or step S9, there is no carry in the number of delay units k, which is the integer part of the delay length, and thus, the CPU <NUM> directly executes the all-pass filter calculation of each of the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) in step S10, and then, updates a sample in step S11. Updating the sample means shifting data in each of the delay units <NUM> of the delay line <NUM> one by one to advance a waveform.

The CPU <NUM> ends the processing when it is determined in step S12 that L has reached the target value, and repeats the processing while adding the rate r to L until L reaches the target value when it is determined that L has not reached the target value.

A case where g < <NUM> or <NUM>-g < <NUM> is satisfied in step S7 or step S9 is a case where there is a carry in the number of delay units k, which is the integer part of the delay length. In this case, the CPU <NUM> sets g = <NUM> in step S13.

In this state, the CPU <NUM> executes the all-pass filter calculation of each of the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) in step S14. In this case, the calculation is executed in the APF <NUM>(#<NUM>) with the number of delay units k and the filter coefficient of <NUM>, and in the APF <NUM>(#<NUM>) with the number of delay units k+<NUM> and the filter coefficient of <NUM>. Since the calculation is started with a value of the feedback delay unit being set to <NUM> in the APF <NUM>(#<NUM>), a signal of i20 is directly output due to the property of the all-pass filter. On the other hand, the calculation is executed with g = <NUM> in the APF <NUM>(#<NUM>), and thus, a signal of i11 is directly output. The signals of i20 and i11 are the same. Therefore, at this timing, signals output to the output selection terminals o1 and o2 are equal. Thus, noise is not generated even if the switch <NUM> switches the output selection terminal from o1 to o2 in step S16.

Thereafter, in step S15, the CPU <NUM> updates the sample as in step S11.

Subsequently, the CPU <NUM> switches the switch <NUM> to the output selection terminal o2.

Thereafter, the CPU <NUM> clears data in the feedback delay unit <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) to <NUM> in step S17.

Thereafter, the CPU <NUM> reconnects the connection terminals i00 and i01 of the APF <NUM>(#<NUM>) to the delay line switch terminals dk+<NUM> and dk+<NUM>, respectively, in step S18. In addition, the filter coefficient g0 of the APF <NUM>(#<NUM>) is changed from <NUM> to <NUM>.

A state of the wave guide model calculation unit <NUM> after switching of the connection of the APF <NUM>(#<NUM>) is the same as described above with reference to <FIG>. The process of step S18 is equivalent to the operation of incrementing the number of delay units k, which is the integer part of the delay length, by +<NUM>. In the drawing, "++" represents an increment operation by +<NUM>.

After the process of step S18, the CPU <NUM> returns to the process of step S2 and repeats the operation of increasing the delay length. At this time, the APF <NUM>(#<NUM>) is an object for changing the filter coefficient. Thereafter, the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) become objects of filter coefficient calculation one after another in the ascending order of the annular ring each time the number of delay units k is incremented.

In step S1 of <FIG>, when L1 > L2, that is, in the case of bend-up, processes in and after step S19 of the flowchart of <FIG> is executed. When L1 > L2, the following differences occur as compared with the case of L1 < L2.

First, the CPU <NUM> subtracts the rate r from the fractional part f in step S19. In the drawing, "-=" represents an operation of subtracting a variable value on the right side from a variable value on the left side.

In addition, it is determined in step S24 or step S26 whether there is a borrow in the number of delay units k, which is the integer part of the delay length, depending on whether g > <NUM> or <NUM>-g > <NUM> is satisfied.

A case where it is determined that g > <NUM> or <NUM>-g > <NUM> is satisfied is a case where there is the borrow in the number of delay units k. In this case, the CPU <NUM> sets g = <NUM> in step S30.

The CPU <NUM> further executes the calculation and sample update of each of the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) in steps S31 and S32. In the subsequent state, the calculation is performed with the filter coefficient g = <NUM> in the APF <NUM>(#<NUM>), and a signal of i10 is output substantially without any change although there is some influence of feedback. The calculation is continued with the filter coefficient of <NUM> in the APF <NUM>(#<NUM>), a signal of i01 is directly output. The signals of i10 and i01 are substantially the same. Therefore, noise is not generated even if the output selection terminal is switched from the output selection terminal o1 to the output selection terminal o0 by the switch <NUM> in step S33.

The CPU <NUM> switches the switch <NUM> to the output selection terminal o0 in step S33.

Thereafter, the CPU <NUM> clears data in the feedback delay unit <NUM>(#<NUM>) of the APF <NUM>(#<NUM>) to <NUM> in step S34.

Thereafter, the CPU <NUM> connects the connection terminals i20 and i21 of the APF <NUM>(#<NUM>) to the delay line switch terminals dk-<NUM> and dk-<NUM>, respectively, in step S35.

A state of the wave guide model calculation unit <NUM> after switching of the connection of the APF <NUM>(#<NUM>) is the same as described above with reference to <FIG>. The process of step S35 is equivalent to the operation of decrementing the number of delay units k, which is the integer part of the delay length, by <NUM>. In the drawing, "--" represent a decrement operation by <NUM>.

After the process of step S35, the CPU <NUM> returns to the process of step S19 and repeats the operation of decreasing the delay length. At this time, the APF <NUM>(#<NUM>) is an object for changing the filter coefficient. Thereafter, the APF <NUM>(#<NUM>), the APF <NUM>(#<NUM>), and the APF <NUM>(#<NUM>) become objects of the filter coefficient calculation one after another in the descending order of the annular ring each time the number of delay units k is decremented.

In pitch change processing in which the delay length decreases, the connection is changed with the filter coefficient of the APF <NUM> being set to <NUM>, and the calculation is started in a state where the filter coefficient is small when the rate r is sufficiently small as described in step S35 in <FIG>. Thus, noise appearing in the next sample is small even if a value on the feedback side is undefined (discontinuous). Therefore, as a modification of the present embodiment, the APF <NUM>(#<NUM>) and the APF <NUM>(#<NUM>) are calculated with the APF <NUM>(#<NUM>) having been removed as illustrated in <FIG>, the APF <NUM>(#<NUM>) is then reconnected instead of the APF <NUM>(#<NUM>) in step S18 of <FIG>, and the APF <NUM>(#<NUM>) is reconnected to the delay line switch terminals dk-<NUM> and dk in step S35 of <FIG>, but the influence of noise is small, and the number of delay units can be changed. In this case, the number of times of multiplication can be reduced by twice.

Although it has been described that the number of times of multiplication can be reduced in the APF <NUM>(#<NUM>) and the APF <NUM>(#<NUM>) in <FIG>, the multiplication operation may be left with priority given to uniformity of algorithms and hardware. The final output signal y(n) is connected to o1 when no pitch bend occurs during sound generation. At this time, the output signals of the APF <NUM>(#<NUM>) and the APF <NUM>(#<NUM>) are not output from the output selection terminals o0 and o2, but are calculated and prepared for the occurrence of the pitch bend during the sound generation described above.

As described above, since the plurality of APFs <NUM> are connected to the respective adjacent delay units <NUM> in the delay line <NUM> in advance to prevent undefined data from entering the delay unit <NUM> in the present embodiment, it is possible to suppress the noise when the number of delay units <NUM> changes during the sound generation of the wave guide model. In addition, it is possible to reduce the number of times of multiplication in the two APFs <NUM> other than the APF <NUM> connected to the first delay unit in the present embodiment.

Then, it is possible to eliminate the frequency dependence of the amplitude and to suppress generation of noise with a small amount of calculation when the number of connections of the delay units changes by using the fractional delay block, such as the all-pass filter, in a wave guide modeling sound source according to the present embodiment. Specifically, there is an advantage in that the number of times of multiplication is reduced by up to four times per one wave guide model. This is because there are about <NUM> strings in the case of a piano, for example, and the multiplication is reduced by <NUM> times if all the strings are modeled and operated.

In addition, the envelope control can be easily applied to the filter coefficient since the filter coefficient can be continuously changed according to the present embodiment.

The block diagrams illustrated in the respective drawings described above can be replaced with software. For example, in a case where the entire configuration of <FIG> is replaced with software, software processing can be implemented as a processor calculates and outputs filter coefficients from a mathematical expression for deriving delay lengths of pairs of each of a zeroth to second delay units and each of the APFs <NUM> (#<NUM> to #<NUM>), calculates a waveform with the filter coefficient of the pair of the first delay unit and the APF <NUM>(#<NUM>) and applies the waveform to an output. In addition, regarding the switching operation of the APF <NUM> described with reference to <FIG>, software processing can be implemented as the processor periodically outputs the filter coefficients from the mathematical expression for deriving the delay lengths of the pairs of each of the zeroth to second delay units and each of the APFs <NUM> (#<NUM> to #<NUM>) before switching, regards a case where the filter coefficient corresponding to the APF <NUM>(#<NUM>) exceeds a predetermined range as switching, and then, outputs filter coefficients from a mathematical expression for deriving delay lengths of pairs of each of new zeroth to second delay units and each of the APFs <NUM> (#<NUM> to #<NUM>) after the switching, calculates a waveform with the filter coefficient of the new pair of the first delay unit and the APF <NUM>(#<NUM>), and applies the waveform to an output. Furthermore, it is also possible to combine the embodiment using the circuit with software, and replace a part of the circuit with the software.

The control program is stored in the ROM <NUM> in the above-described embodiment, but is not limited thereto, and may be stored in a removable storage medium, such as a USB memory, a CD, and a DVD, or may be stored in a server. The musical sound signal generation device <NUM> may acquire the control program from such a storage medium or may acquire the control program from the server via a network.

In addition, the number of all-pass filters described in the above embodiment is not limited to three, and four or more all-pass filters may be provided.

Claim 1:
A musical sound signal generation device (<NUM>) comprising:
a delay line (<NUM>) provided with a plurality of delay units (<NUM>) which are connected in a cascade manner and respectively delay input signals (x(n)) by a first delay length;
at least three fractional delay blocks (<NUM>) each of which is connected to correspond to any delay unit (<NUM>) among the plurality of delay units (<NUM>) and delays an input signal (x(n)) by a second delay length equal to or less than the first delay length; and
at least one processor (<NUM>) that sets any one of the plurality of delay units (<NUM>) as a first delay unit (<NUM>) which generates a delay corresponding to a designated tone pitch, sets a delay unit in a preceding stage of the first delay unit (<NUM>) among the plurality of delay units (<NUM>) as a zeroth delay unit (<NUM>), and sets a delay unit in a subsequent stage of the first delay unit (<NUM>) among the plurality of delay units (<NUM>) as a second delay unit (<NUM>),
wherein the at least one processor (<NUM>)
connects the at least three fractional delay blocks (<NUM>) to the first delay unit (<NUM>), the zeroth delay unit (<NUM>), and the second delay unit (<NUM>), respectively, and
continuously connects any one of the connected zeroth delay unit (<NUM>) and the connected second delay unit (<NUM>) to the fractional delay block (<NUM>) and connects at least any one of a new zeroth delay unit (<NUM>) and a new second delay unit (<NUM>) to at least any one of the fractional delay blocks (<NUM>) other than the fractional delay block (<NUM>) connected to a new first delay unit (<NUM>) in response to setting any one of the connected zeroth delay unit (<NUM>) and the connected second delay unit (<NUM>) as the new first delay unit (<NUM>), setting a delay unit in a preceding stage of the new first delay unit (<NUM>) as the new zeroth delay unit (<NUM>), and setting a delay unit in a subsequent stage of the new first delay unit (<NUM>) as the new second delay unit (<NUM>) in accordance with a change in the designated tone pitch.