The present disclosure relates to a technique for generating a sound signal.
In order to make a sound from an electronic piano as close as possible to a sound of an acoustic piano, various contrivances have been made. When pressing the key in the performance of the acoustic piano, not only string striking sound occurs, also occurs key bed collision sound that occurs with the pressing of the key. For example, in Japanese laid-open patent publication No. 2014-59534, techniques have been disclosed for reproducing such a key bed collision sound in electronic instruments such as an electronic piano.
According to an embodiment of the present disclosure, a sound signal generation device for a keyboard including a pedal and a key, the sound signal generation device including at least one memory storing instructions and a processor that implements the instructions to generate a first sound signal and a second sound signal different from the first sound signal based on first operation data corresponding to a first operation of the key, and adjust a relationship between the first sound signal and the second sound signal based on the first operation data to control a decay rate of the first sound signal to be different from a decay rate of the second sound signal based on second operation data corresponding to an operation on the pedal.
According to an embodiment of the present disclosure, a sound signal generation device for a keyboard including a pedal and a key, the sound signal generation device including at least one memory storing instructions and a processor that implements the instructions to generate a first sound signal and a second sound signal different from the first sound signal based on first operation data corresponding to an operation of a key, from among the at least one key, and to adjust a relationship between the first sound signal and the second sound signal to sound at respective timings according to a physical quantity of a key pressing operation of the key to control a decay rate of the first sound signal to be different from a decay rate of the second sound signal based on a key release operation of the key.
According to an embodiment of the present disclosure, a keyboard instrument including the key, the pedal, a first detection unit that outputs the first operation data corresponding to the operation of the key, and a second detection unit that outputs the second operation data corresponding to the operation on the pedal.
According to an embodiment of the present disclosure, a sound signal generation method for a keyboard including a pedal and a key, the method including generating a first sound signal and a second sound signal different from the first sound signal based on first operation data corresponding to an operation of the key, and adjusting a relationship between the first sound signal and the second sound signal to sound at respective timings according to a physical quantity of a key pressing operation of the key to control a decay rate of the first sound signal to be different from a decay rate of the second sound signal based on a key release operation of the key.
Hereinafter, a keyboard instrument according to an embodiment of the present disclosure will be described in detail referring to the drawings. The following embodiments are exemplary embodiments of the present disclosure, and the present disclosure is not construed within the limitations of these exemplary embodiments. In the drawings referred to in the present exemplary embodiments, the same portions or portions having similar functions are denoted by the identical symbols or similar symbols (symbols each formed simply by adding A, B, etc. to the end of a number), and a repetitive description thereof may be omitted.
[Configuration of keyboard instrument]
The keyboard instrument 100 includes the plurality of keys 101 (the performance operating elements) in a housing 107 and a separate pedal device 119. The plurality of keys 101 are rotatably supported by the housing 107. The speaker 103 is provided on the housing 107. Inside the housing 107, a control unit 111, a memory unit 113, a sound generator 115, and a first detection unit 117 are provided. The pedal device 119 includes a damper pedal 121 and a second detection unit 125. The pedal device 119 includes a shift pedal 123 but may be omitted. The configurations provided inside the housing 107 are connected via buses.
In this example, the keyboard instrument 100 includes an interface for inputting and outputting signals to and from an external device. The interface may be, for example, a terminal for outputting sound signals, a cable connecting terminal for transmitting and receiving MIDI data, or the like. In this example, the pedal device 119 is connected to the interface so that the second detection unit 125 is connected to the configurations arranged inside the housing 107 via the buses described above, and the signals are exchanged between the pedal device and the keyboard instrument.
The control unit 111 includes a calculation processing circuit such as CPU, and a memory device such as RAM and ROM. The control unit 111 implements a control program stored in the memory unit 113 by the CPU to realize various functions in the keyboard instrument 100. The operation unit 105 is a device such as an operation button, a touch sensor, and a slider, and outputs a signal corresponding to the input operation to the control unit 111. A display unit 109 displays a screen based on the control by the control unit 111.
The memory unit 113 is a memory device such as non-volatile memory. The memory unit 113 stores control programs implemented by the control unit 111. The memory unit 113 may store parameters, waveform data, and the like used in the sound generator 115. The speaker 103 outputs a sound corresponding to the sound signal by amplifying and outputting the sound signal output from the control unit 111 or the sound generator 115. Although
The first detection unit 117 detects operations including the key pressing operation and the key release operation of the key 101. The first detection unit 117 measures the behavior of each of the plurality of keys 101, and outputs measurement data indicating the measurement results. The first detection unit 117 outputs a key number Kc which is information indicating the pressed key 101, information Ks indicating the depressed amount (operation amount) of the key 101, and information Kv indicating the speed (pressed speed) of the key 101 as the measurement data. By outputting the key number Kc, the information Ks, and the information Kv in association with each other, the operated key 101 and the operation for the key 101 are specified. The mechanical structure (key assembly) interlocking with the key 101 will be described in detail. The information Ks is detected by a continuous amount and may be one that outputs a value corresponding to the position or may be one that outputs the position with a status of on/off by a switch of two contacts, or three contacts.
The support member connection part 215 protruding downward from the key 101 includes a connection part 217 at the lower end. A key connection part 219 and the connection part 217 provided at one end of the support member 209 are connected to slidable. The support member 209 is provided with a weight 221 on the opposite side of the key connection 219 to the shaft 213. When the key 101 is not operated, the weight 221 is placed on a lower limit stopper 223 by its own weight.
On the other hand, when the key 101 is depressed, the key connection part 219 moves downward, and the support member 209 rotates. When the support member 209 rotates, the weight 221 moves upward. When the weight 221 collides with an upper limit stopper 225, the rotation of the support member 209 is limited and the depressing of the key 101 stops.
The key assembly is not limited to the structure shown in
The first detection unit 117 is provided between the frame 203 and the key 101. The first detection unit 117 may include a first sensor 117-1, a second sensor 117-2, and a third sensor 117-3. When the key 101 is depressed, the first sensor 117-1 outputs a first detection signal K1 when the key 101 reaches the first press level. Subsequently, the second sensor 117-2 outputs a second detection signal K2 when the key 101 reaches the second press level. Furthermore, the third sensor 117-3 outputs a third detection signal K3 when the key 101 reaches the third press level. This temporal difference in the output timings of the detection signals can be used to calculate the press speed of the key 101.
In the present embodiment, as an example, the control unit 111 calculates a first press speed based on the time from the output timing of the first detection signal to the output timing of the second detection signal, and a predetermined distance (here, the distance between the first press level and the second press level). Similarly, the control unit 111 calculates a second press speed based on the time from the output timing of the second detection signal to the output timing of the third detection signal, and a predetermined distance (here, the distance between the second press level and the third press level). The control unit 111 may calculate the pressing acceleration based on the first press speed and the second press speed. Further, the control unit 111 outputs a note-on signal Non to the sound generator 115 by detecting the third detection signal, and when the output of the first signal for the same key is stopped after outputting note-on signal Non, outputs a note-off signal Noff to the sound generator 115.
When the note-on signal Non is output, the key number Kc indicating the pressed key 101, the information Ks indicating the depressed amount (operation amount) of the key 101, and the information Kv indicating the speed (pressed speed) of the key 101 are output as the measurement data from the first detection unit 117. At this time, the measurement data may include information Ka indicating the pressing acceleration of the key 101. On the other hand, when the note-off signal Noff is output, the information Kc indicating the released key 101 is output in association with the note-off signal Noff. In the following explanation, these pieces of information (measurement data) output from the control unit 111 in accordance with the operation of the key 101 are supplied to the sound generator 115.
Referring back to
The sound generator 115 generates the sound signal based on the information input from the first detection unit 117 and second detection unit 125 and outputs the sound signal to the speaker 103. The sound signal generated by the sound generator 115 is obtained for each operation of the key 101 and the damper pedal 121. Then, a plurality of sound signals obtained by the plurality of key depressions are synthesized and output from the sound generator 115. The configuration of the sound generator 115 will be described in detail.
The conversion unit 301 generates data (hereinafter, referred to as first operation data) corresponding to the operation on the key 101 based on the information (Kc, Ks, Kv) input from the first detection unit 117. The conversion unit 301 generates data (hereinafter, referred to as second operation data) corresponding to the operation (pushing amount) of the damper pedal 121 based on the information Ps (or the information Pc and Ps) input from the second detection unit 125.
The waveform data memory unit 305 includes a string striking sound waveform memory 305-1 and a collision sound waveform memory 305-2. The string striking sound waveform memory 305-1 stores a plurality of string striking sound waveform data which is the original waveform data of the first sound signal (the string striking sound signal) generated in the signal generation unit 311. The string striking sound waveform data is the waveform data obtained by sampling the sound caused by the string striking accompanied by the key depression. The collision sound waveform memory 305-2 stores a plurality of collision sound waveform data which is the original waveform data of the second sound signal (the collision sound signal). The collision sound waveform data is waveform data obtained by sampling the key bed collision sound of the acoustic piano (sound generated by the collision of the key and the key bed when the key is depressed). The waveform data of the respective velocity values corresponding to the respective pitches is stored string striking sound waveform data. The collision sound waveform data is stored as shared for all pitches, corresponding to the respective velocity values.
The signal generation unit 311 generates and outputs a sound signal based on the first operation data input from the conversion unit 301. More specifically, the signal generation unit 311 includes a first sound signal generation unit 311-1, a second sound signal generation unit 311-2, and a synthesis unit 315. The first sound signal generation unit 311-1 generates and outputs the first sound signal (the string striking sound signal) based on the first operation data. The second sound signal generation unit 311-2 generates and outputs a second sound signal (the collision sound signal) based on the first operating data. At this time, the envelopes of the first sound signal and the second sound signal are adjusted by the adjustment unit 313. The synthesis unit 315 synthesizes the envelope-adjusted first sound signal and the envelope-adjusted second sound signal and outputs it to the output unit 307.
The output unit 307 outputs the synthesized sound signal obtained by synthesizing the first sound signal and the second sound signal obtained from the signal generation unit 311 to the outside of the sound generator 115. In the present embodiment, the synthesized sound signal is output to the speaker 103 and is listened to by the user. Next, the configuration of the signal generation unit 311 will be described in detail.
The control signal generation unit 401 generates control data (hereinafter, referred to as first operation data) defining the content of sound generation based on the information (Kc, Ks, Kv) output from the first detection unit 117. The first operation data is, in this example, data in the form of MIDI and includes a note number Note, a velocity Vel, a note-on signal Non, and a note-off signal Noff. The generated first operation data is output to the signal generation unit 311 and the adjustment unit 313. When the third detection signal K3 is output from the first detection unit 117, the control signal generation unit 401 generates the note-on signal Non. That is, when the key 101 is depressed and reached the third press level, the note-on signal Non is output. The target note number Note is determined based on the key number Kc output corresponding to the third detection signal K3.
The control signal generation unit 401 generates the note-off signal Noff when the outputting of the first detection signal K1 of the corresponding key number Kc is stopped after generating the note-on signal Non. That is, when the press level of the key 101 returns to the first press level when the depressed key 101 returns to the rest position, the note-off signal Noff is generated.
The key press speed calculation unit 403 calculates the speed at a predetermined position of the depressed key 101 based on the information output from the first detection unit 117. This speed will be referred to as key press speed in the following description. The key press speed calculation unit 403, here, calculates the key press speed by a predetermined calculation using a first time from when the key 101 reaches the first press level until when it reaches the second press level. Here, the key press speed is a value obtained by multiplying the reciprocal of the first time by a predetermined constant. The key press speed calculation unit 403 outputs the calculated key press speed to the acceleration calculation unit 407 and the string striking volume adjustment unit 411 of the adjustment unit 313.
The collision speed calculation unit 405 calculates the speed at the end position of the depressed key 101 based on the information output from the first detection unit 117. This speed is referred to as the collision speed in the following description. The collision speed calculation unit 405, here, calculates the collision speed by a predetermined calculation using the first time described above and a second time from when the key 101 reaches the second press level until when it reaches the third press level. Here, the collision speed is calculated from the change of the second time relative to the first time as the change of the speed accompanying the change of the position of the key 101, and the speed at the end position, that is, the speed in the situation where the key bed collision sound is generated by the key 101, is estimated. The collision speed calculation unit 405 outputs the calculated collision speed to the acceleration calculation unit 407 and the collision volume adjustment unit 413 of the adjustment unit 313.
The acceleration calculation unit 407 calculates the amount of change (hereinafter referred to as pressing acceleration) between the press speed and the collision speed. The pressing acceleration may be calculated based on the change between the first time and the second time. The acceleration calculation unit 407 outputs the calculated acceleration to the delay adjustment unit 415 of the adjustment unit 313.
The pedal position detection unit 409 generates control data (hereinafter, referred to as second operation data) corresponding to the operation (pushing amount) of the damper pedal 121 based on the information Ps (or the information Pc and Ps) input from the second detection unit 125. The second operation data includes information indicating three states in the pedal operating range: an off state, which is a predetermined range from a state where the pedal is not operated (the rest position), an on state, which is a predetermined range of the stroke of the pedal up to a state where the pedal is fully depressed (the end position), and a half state that is a state between the off state and the on state. These three states, respectively, in an acoustic piano, indicate a state where the damper is separated from the string (damper on), a state where the damper is in contact with the string (damper off), and a state where the damper is separate to the extent that it touches when the string vibrates (half damper), etc. The pedal is operable in the range from the rest position to the end position.
Here, in the acoustic piano, the damper on corresponds to a state where the damper is separated from the string and a state where the damper pedal 121 is positioned in a predetermined range (a range that is set in advance as being equivalent to that state) from the end position at its operation stroke. In the acoustic piano, the damper off corresponds to a state where the damper is in contact with the string and a state where the damper pedal 121 is positioned in a predetermined range (a range that is set in advance as being equivalent to that state) from the rest position at its operation stroke. The pedal position detection unit 409 outputs the second operation data to the decay control unit 417 of the adjustment unit 313. The control data corresponding to the shift pedal 123 may also be generated, but the description thereof is omitted here.
The adjustment unit 313 adjusts the relationship between the first sound signal (the string striking sound signal) and the second sound signal (the collision sound signal) generated in the signal generation unit 311 based on the first operation data input from the conversion unit 301. Specifically, the adjustment unit 313 adjusts the relationships of the timing of the sounding and the volume between the first sound signal and the second sound signal based on the first operation data. Further, the adjustment unit 313 refers to the first decay control table 309 and the second decay control table 310 and controls the envelopes of the first sound signal and the second sound signal based on the second operation data input from the conversion unit 301. In particular, the adjustment unit 313 controls the envelopes when the first sound signal and the second sound signal are decayed. Here, the adjustment unit 313 controls the decay speed based on the operation of the damper pedal 121, that is, the second operation data. At this time, the adjustment unit 313 controls a decay rate of the first sound signal to be different from a decay speed of the second sound signal. Hereinafter, the configuration of the adjustment unit 313 will be described in detail.
The string striking volume adjustment unit 411 determines a string striking volume specified value based on the key press speed obtained from the key press speed calculation unit 403. The string striking volume specified value is used to specify the volume of the first sound signal (the string striking sound signal) generated by the signal generation unit 311. Here, the larger the key press speed, the larger the string striking volume specified value. The string striking volume adjustment unit 411 outputs the determined string striking volume specified value to the signal generation unit 311.
The collision volume adjustment unit 413 determines a collision volume specified value based on the collision speed obtained from the collision speed calculation unit 405. The collision volume specified value is used to specify the volume of the second sound signal (the collision sound signal) generated by the signal generation unit 311. In this example, the larger the collision speed, the larger the collision volume specified value. The collision volume adjustment unit 413 outputs the determined collision volume specified value to the signal generation unit 311.
The delay adjustment unit 415 determines a string striking sound delay time td1 based on the pressing acceleration obtained from the acceleration calculation unit 407 referring to a string striking sound delay table. The delay adjustment unit 415 determines a collision sound delay time td2 based on the pressing acceleration referring to a collision sound delay table. The string striking sound delay time td1 indicates the delay time until the first sound signal (the string striking sound signal) is output from note-on Non. The collision sound delay time td2 indicates the delay time until the second sound signal (the collision sound signal) is output from note-on Non.
Here, when the pressing acceleration is A2, the string striking sound delay time td1 and the collision sound delay time td2 are equal. When the pressing acceleration is A1 smaller than A2, the collision sound delay time td2 is longer than the string striking sound delay time td1. On the other hand, when the pressing acceleration is A3 greater than A2, the collision sound delay time td2 is shorter than the string striking sound delay time td1. At this time, A2 may be “0”. In this case, A1 is a negative value, which indicates that the speed is gradually decelerated during pressing. On the other hand, A3 is a positive value, which indicates that the speed is gradually accelerated during pressing.
In the example shown in
As shown in
As described above, the delay adjustment unit 415 determines the string striking sound delay time td1 and the collision sound delay time td2 according to the pressing acceleration obtained from the acceleration calculation unit 407 referring to the string striking sound delay table and the collision sound delay table as described referring to
The decay control unit 417 controls the envelopes of the first sound signal and the second sound signal generated in the signal generation unit 311 based on the second operation data input from the conversion unit 301 by referring to the first decay control table 309 and the second decay control table 310. In particular, the envelopes when the first sound signal and the second sound signal are decayed are controlled. In this example, the decay control unit 417 sets the parameters of the envelope based on the operation of the damper pedal 121, i.e., the second operation data and controls the decay speed.
The first decay control table 309 is a table that defines the relation between the velocity Vel and the decay coefficient k1 of the string striking sound according to the position of the damper pedal 121. Decay coefficient k1 is a coefficient showing the rate of change relative to the decay speed when the damper pedal is in the ON state. In this example, the decay coefficient k1 is a value of 1 or more. If k1=1, it means a decay speed that does not change from the setting value (decay rate DR). On the other hand, as k1 becomes larger than 1, the decay speed of the sound signal is increased.
When the note-on is occurred, the envelope waveform rises to the attack level AL during the time of the attack time AT. Thereafter, the envelope waveform is decreased to the sustain level SL during the time of the decay time DT to maintain the sustain level SL. When the note-off is occurred, the envelope waveform decreases from the sustain level SL to the mute state (level “0”) during the time of the release time RT. If the note-off is occurred before the envelope waveform reaches the sustain level SL, that is, a period during the attack time AT and the decay time DT, the envelope waveform reaches a mute state from that point to the release time RT. The mute state may be reached by the decay rate obtained by dividing the sustain level SL by the release time RT.
The decay rate DR is a value that can be calculated from the above-mentioned parameters, and is obtained by dividing the difference between the attack level AL and the sustain level SL by the decay time DT. This parameter (decay rate DR) indicates the degree of natural decay (decay speed) of the sound in the decay period after note-on. Although an example in which the decay speed of the decay rate DR in the decay period is constant (slope is a straight line) is shown, it may not necessarily be constant, the slope may be defined other than a straight line by making a predetermined change in the decay speed.
When a note-off is occurred during the decay time DT, the envelope waveform rapidly decreases as indicated by a dotted line in accordance with the setting of the release time RT. An EV waveform generation unit of the first sound signal generation unit 311-1 of the signal generation unit 311, which will be described later, generates the envelope waveform shown in
The second decay control table 310 is a table that defines the relationship between the velocity and decay coefficient k2 of collision sound according to the pitch. The decay coefficient k2 is a coefficient that indicates a ratio of changing of the decay speed according to the pitch. Here, when generating a sound in the middle range, the decay time is set to be longer than when generating a sound in the high range side and the low range side. When the decay speed of the second sound signal, that is, the collision sound, is assumed to be constant independent of the pitch, the second decay control table and the associated process can be omitted.
As described above, when a note-off is occurred during the decay time DT, string striking sound rapidly decays according to the setting of the release time RT, whereas collision sound decays according to the decay rate DR, unlike string striking sound.
As described above, the adjustment unit 313 refers to the first decay control table 309 and the second decay control table 310, sets the parameters of the envelopes of the first sound signal and the second sound signal based on the second operation data input from the conversion unit 301, and controls the decay speed of the signal based on the respective waveform data output from the waveform data memory unit 305. The adjustment unit 313 adjusts the relationship between the timing and the volume of sounding of the first sound signal and the second sound signal generated in the signal generation unit 311 based on the first operation data.
The waveform reading unit 501 selects and reads out the string striking sound waveform data to be read out from the string striking sound waveform memory 305-1 based on the first operation data (e.g., the note-on signal Non, the note number Note, and the velocity Vel) obtained from the control signal generation unit 401 of the conversion unit 301, and generates a sound signal (the first sound signal) of a pitch corresponding to the note number Note. The waveform reading unit 501 continues to read the string striking sound waveform data until the generated sound signal is silenced in response to the note-off signal Noff.
The EV waveform generation unit 503 generates an envelope waveform based on the first operation data obtained from the control signal generation unit 401 of the conversion unit 301 and the parameters set in the decay control unit 417 of the adjustment unit 313 described above. For example, the envelope waveform is defined by parameters of the attack level AL, the attack time AT, the decay time DT, the sustain level SL, and the release time RT.
The multiplier 505 multiplies the first sound signal generated in the waveform reading unit 501 by the envelope waveform generated in the EV waveform generation unit 503, and outputs it to the delay unit 507.
The delay unit 507 delays the first sound signal according to the set delay time and outputs the delayed first sound signal to the amplifying unit 509. The delay time is set based on the string striking sound delay time td1 determined in the delay adjustment unit 415 of the adjustment unit 313.
The amplifying unit 509 amplifies the first sound signal in accordance with the set amplification factor and outputs the amplified first sound signal to the synthesis unit 315. This amplification factor is set based on string striking volume specified value determined by the string striking volume adjustment unit 411 of the adjustment unit 313 described above and is generated so that the output level (volume) becomes larger as the key press speed calculated in response to the depressing of the key 101 becomes higher.
In the above, the case when k=1 (k=1˜n) is exemplified by referring to
The waveform reading unit 601 selects and reads collision sound waveform data to be read from the collision sound waveform memory 305-2 based on the first operation data obtained from the control signal generation unit 401 of the conversion unit 301 (e.g., the note-on signal Non, the velocity Vel), and generates a sound signal (second sound signal) corresponding to the first operation.
The EV waveform generation unit 603 generates an envelope waveform based on the first operation data (e.g., the note number Note) obtained from the control signal generation unit 401 of the conversion unit 301 and the parameters set in the decay control unit 417 of the adjustment unit 313 described above. For example, the envelope waveform is defined by parameters of the attack level AL, the attack time AT, the decay time DT, the sustain level SL, and the release time RT.
The multiplier 605 multiplies the second sound signal generated in the waveform reading unit 601 by the envelope waveform generated in the EV waveform generation unit 603, and outputs it to the delay unit 607.
The delay unit 607 delays the second sound signal according to the set delay time and outputs the delayed second sound signal to the amplifying unit 609. The delay time is set based on the collision sound delay time td2 determined in the delay adjustment unit 415 of the adjustment unit 313.
The amplifying unit 609 amplifies the second sound signal in accordance with the set amplification factor and outputs the amplified second sound signal to the synthesis unit 315. This amplification factor is set based on the collision volume specified value determined in the collision volume adjustment unit 413 of the adjustment unit 313 described above and is generated so that the output level (volume) becomes larger as the calculated collision speed in response to the depressing of the key 101 becomes higher.
Above, the case when j=1 (j=1˜m) is exemplified by referring to
The synthesis unit 315 syntheses the first sound signal (the string striking sound signal) output from the first sound signal generation unit 311-1 and the second sound signal (the collision sound signal) output from the second sound signal generation unit 311-2 and outputs it to the output unit 307. The configuration of the sound generator 115 has been described above.
As described above, the decay control unit 417 of the adjustment unit 313 sets the parameters of the envelope of the second sound signal to be constant independent of the second operation data, that is, the operation of the damper pedal 121. Therefore, the decay control unit 417 may omit the control of the envelope of the second sound signal. In this case, in the second sound signal generation unit 311-2, the EV waveform generation unit 603 may be omitted, and the second sound signal generated based on the collision sound waveform data read by the waveform reading unit 601 may be directly output to the delay unit 607 without envelope control.
In the keyboard instrument 100 according to the first embodiment of the present disclosure, the adjustment unit 313 of the sound generator 115 controls the envelopes for the first sound signal and the second sound signal differently based on the second operation data corresponding to the operation of the damper pedal 121. That is, the parameters of the envelope of the first sound signal are set based on the second operation data. On the other hand, the parameters of the envelope of the second sound signal are fixed regardless of the data of the second operation. This makes it possible to reproduce a sound similar to the acoustic piano.
Subsequently, the sound generation control of the first sound signal (the string striking sound) and the second sound signal (the collision sound) implemented by the control unit 111 will be described.
First, the first process implemented by the control unit 111 will be described. The control unit 111 resets various registers and flags stored in the memory device such as RAM and initializes such as setting an initial value (S1). In this S1, the control unit 111 instructs the sound generator 115 to initialize various registers and flags. Subsequently, the control unit 111 determines whether or not on/off state of the first sensor 117-1 (
Next, the control unit 111 determines whether or not the on/off state of the second sensor 117-2 has changed, and whether or not the on/off state has been turned on or off when there has been a change (S5). When the on/off state of the second sensor 117-2 has not changed (S5; NO), the process proceeds to S9. When the control unit 111 determines that the second sensor 117-2 is turned on from off (S5; ON), the control unit 111 terminates the measurement of the first time (S6). Subsequently, the control unit 111 calculates the key press speed based on the measured first time and stores the calculated key press speed in the register (S7). The key press speed may be a value corresponding to the speed obtained by the calculation as shown here and is not limited to the case where it coincides with the actual speed.
Subsequently, the control unit 111 starts the measurement of the second time required for the third sensor 117-3 to be turned on after the second sensor 117-2 is turned on (S8). Next, the control unit 111 determines whether or not the on/off state of the third sensor 117-3 has changed, and whether or not the on/off state has been turned on or off when there has been a change (S9). If the on/off state of the third sensor 117-3 has not changed (S9; NO) or turned off (S9; OFF), the control unit 111 returns the process to S2. When it is determined that the third sensor 117-3 is turned on from off (S9; ON), the control unit 111 terminates the measurement of the second time (S10).
After measuring the second time, the control unit 111 calculates the collision speed based on the first time and the second time and stores the calculated collision speed in the register (S11). The collision speed may be a value corresponding to the velocity obtained by the calculation as shown here and is not limited to the case where it coincides with the actual velocity. Subsequently, the control unit 111 calculates the pressing acceleration based on the measured time difference Δt between the first time and the second time and stores the calculated pressing acceleration in the register (S12). Calculation of the pressing acceleration may be implemented using a table associated with the time difference Δt between the first time and the second time and the pressing acceleration. The pressing acceleration may be a value corresponding to the acceleration obtained by a predetermined calculation as shown here and is not limited to the case where it coincides with the actual acceleration.
The control unit 111 generates a note-on command (S13) having the key number stored in the register in S3, the key press speed stored in the register in S7, the collision speed stored in the register in S11, and the pressing acceleration stored in the register in S12.
When the control unit 111 determines in S2 that the first sensor 117-1 has changed from on to off (S2; OFF), the control unit 111 detects the key number of the key corresponding to the first sensor 117-1 that has turned off and stores the detected key number in the register (S14). The control unit 111 generates a note-off command having the key number stored in the register (S15), and resets the first time, the second time, the key press speed, and the pressing acceleration of the corresponding key (S16).
When the control unit 111 determines in S5 that the second sensor 117-2 has changed from on to off (S5; OFF), if the second time is not being measured (S17, NO), the control unit 111 proceeds the process to S9, and if the second time is being measured (S17, YES), the control unit 111 resets the second time of the corresponding key (S18) and proceeds the process to S9.
Next, the second process implemented by the control unit 111 will be described. The control unit 111 determines whether or not the damper pedal 121 is operated (S19). When the damper pedal 121 is not operated, the process returns to S19. When the damper pedal 121 is operated (S19; YES), the control unit 111 determines whether or not the damper pedal 121 is in the ON state based on the pushing amount of the damper pedal 121 (S20). If it is ON state (S20; Yes), the control unit 111 sets pedal state flag Ps indicating the ON state to 2 (S21).
If it is not on state (S20; NO), the control unit 111 determines whether the dumper pedal 121 is the half pedal (the dumper pedal 121 is in an intermediate position excluding the rest position and the end position) based on the pushing amount of the dumper pedal 121 (S22). If it was the half pedal (S22; YES), the control unit 111 sets the pedal state flag Ps indicating that it is in the half pedal state to 1 (S23). If it is not the half pedal (S22; NO), the control unit 111 determines that the damper pedal 121 is in the off state and sets the damper pedal state flag Ps indicating that it is in the off state to 0. (S24).
Thus, the control unit 111 generates a first instruction signal (the first operation data) such as the note-on command and the note-off command based on the detection result by the first detection unit 117 (the first sensor 117-1, the second sensor 117-2 and the third sensor 117-3). The control unit 111, based on the detection result by the second detection unit 125, also generates a second instruction signal (the second operation data) indicating the state of the damper pedal.
The sound signal generation unit 303 determines whether or not a command has been generated (S25), and if it is determined that a command has been generated (S25; YES), the sound signal generation unit 303 determines whether or not the command is a note-on command (S26). Here, when it is determined that the command is a note-on command (S26: Yes), the sound signal generation unit 303 stores the data included in the note-on command, that is, the key number, the key press speed, the collision speed, and the pressing acceleration in the register (S27).
Subsequently, the sound signal generation unit 303 determines the string striking volume specified value based on the key press speed stored in the register and stores the determined value in the register (S28). Next, the sound signal generation unit 303 determines the collision volume specified value based on the collision speed and stores the collision volume specified value in the register (S29). Subsequently, the sound signal generation unit 303 determines the string striking sound delay time td1 and the collision sound delay time td2 based on the pressing acceleration and stores them in the register (S30).
Subsequently, the sound signal generation unit 303 starts counting a timer in order to measure elapsed time for obtaining timings corresponding to the string striking sound delay time td1 and the collision sound delay time td2 (S31). The sound signal generation unit 303 resets read state flag D indicating that the string striking sound waveform data is being read from the string striking sound waveform memory 305-1 (
When the sound signal generation unit 303 determines in S26 that the generated command is not a note-on command (S26; NO), the sound signal generation unit 303 determines whether or not the generated command is a note-off command (S33). When it is determined that the generated command is not the note-off command (S33; NO), the signal generation unit 303 returns the process to S25. When it is determined that the generated command is the note-off command (S33; YES), the sound signal generation unit 303 stores data such as the key number included in the note-off command in the register (S34). Subsequently, the sound signal generation unit 303 determines whether or not the damper pedal state flag Ps is 0 (S35), and if Ps is 0 (S35; YES), the sound signal generation unit 303 changes the envelope to be multiplied by the string striking sound waveform data being generated to a release waveform (S36), and sets the release state flag R indicating the key release state to 1 (S37). If it is not Ps0 (S35; NO), the sound signal generation unit 303 determines whether or not the damper pedal state flag Ps is 1 (S38). If Ps is 1 (S38; YES), the sound signal generation unit 303 changes the decay rate DR of the envelope to be multiplied by the string striking sound waveform data being generated to the half pedal state (S39). If Ps is not 1 (S38; NO), that is, if the damper pedal state flag Ps is 2, the sound signal generation unit 303 returns the process to S25.
When it is determined that no commands have been generated in the subsequent process cycles (S25; NO), the sound signal generation unit 303 determines whether or not the minimum unit time has elapsed (S40 in
Subsequently, when it is determined that the minimum unit time has elapsed (S40; YES), the sound signal generation unit 303 determines whether or not the read state flag D is 0 (S41). When it is determined that the read state flag D is 0 (S41; YES), the sound signal generation unit 303 starts decrementing of the string striking sound delay time td1 to determine the generation timing of the string striking sound (S42). Subsequently, the sound signal generation unit 303 determines whether or not the string striking sound delay time td1 has reached 0, that is, whether or not the sound generation timing has been reached (S43). When the sound signal generation unit 303 determines that the string striking sound delay td1 is not 0 (S43; NO), the process proceeds to S47. When the string striking sound delay time td1 is determined to 0 (S43; YES), the sound signal generation unit 303 refers to the string striking sound waveform memory 305-1 (
Subsequently, the sound signal generation unit 303 sets the read state flag D to 1 (S46), and determines whether or not the read state flag T is 0 (S47). When it is determined that the read state flag T is 0 (S47: YES), the sound signal generation unit 303 starts decrementing of the collision sound delay time td2 for determining the generation timing of the collision sound (S48). Subsequently, the sound signal generation unit 303 determines whether or not the collision sound delay time td2 has reached 0, that is, whether or not the sound generation timing has been reached (S49). When the sound signal generation unit 303 determines that the collision sound delay time td2 is not 0 (S49; NO), the process proceeds to S53. When the sound signal generation unit 303 determines that the collision sound delay time td2 is 0 (S49; YES), the sound signal generation unit 303 refers to the collision sound waveform memory 305-2 (
Subsequently, the sound signal generation unit 303 returns the process to S25 (
Subsequently, the sound signal generation unit 303 determines whether or not the release state flag R is set to 1, that is, whether or not the key is released (S55), and if it is determined that the release state flag R is not 1 (S55; NO), the sound signal generation unit 303 determines whether or not the read state flag T is set to 1 (S58). If the sound signal generation unit 303 determines that the read state flag T is not 1 (S58; NO), the sound signal generation unit 303 proceeds the process to S60. When it is determined that the read state flag T is 1 (S58: YES), the sound signal generation unit 303 continues to read the collision sound waveform data (S59).
Subsequently, the sound signal generation unit 303 determines whether or not the read state flag D or the read state flag T is set to 1, that is, whether or not at least one of the string striking sound waveform data and the collision sound waveform data is being read (S60). When it is determined that the read state flags D and T are not 1 (both are 0) (S60; NO), the sound signal generation unit 303 returns the process to S25 of
Subsequently, the sound signal generation unit 303 supplies the waveform data obtained by synthesizing the adjusted string striking sound waveform data and the adjusted collision sound waveform data in S61 to the output unit 307 (
In the determination process of S55 (
As described above, according to the present disclosure, the sound similar to an acoustic piano can be reproduced by differently controlling the envelope of the string striking sound signal and the collision sound signal based on the operation to the damper pedal.
In the above embodiment, the string striking sound signal and the collision sound signal are stored as separate waveform data in the string striking sound waveform memory 305-1 and the collision sound waveform memory 305-2, respectively, and the waveform data is read out according to the depressing of the key. However, one waveform data may be read in response to the key depression, and the read waveform data may be divided into the string striking sound waveform and the collision sound waveform and processed individually to generate the string striking sound signal and the collision sound signal.
In the sound generator 115A according to the second embodiment, the waveform data memory unit 1901 stores a plurality of waveform data. In the present embodiment, the waveform data is a waveform data obtained by sampling the sound of an acoustic piano. The plurality of waveform data includes waveform data of sounds including the string striking sound and the key bed collision sound accompanied with the key depression as waveform data to be read when the key 101 is depressed. The waveform data memory unit 1901 stores waveform data of respective velocity values corresponding to respective pitches. The waveform data is associated with, for example, a note number assigned to each pitch of the string striking sound.
The waveform data reading unit 1903 selects and reads the waveform data to be read from the plurality of waveform data stored in the waveform data memory unit 1901 based on the first operation data (e.g., note-on signal Non, note number Note, velocity Vel) obtained from the control signal generation unit 401. The waveform data reading unit 1903 continues to read the waveform data until the sound signal is silenced in response to the note-off signal Noff. The waveform data reading unit 1903 (1903-i, i=1˜l) outputs the read waveform data to the waveform data separating unit 1905 (1905-i, i=1˜l).
The waveform data separating unit 1905 separates the waveform data into the string striking sound waveform data and the collision sound waveform data from the acquired waveform data. The waveform data separating unit 1905 (1905-i, i=1˜l) may be composed of a combination of a band stop filter BSF (1905-ia: i=1˜l) and a band pass filter BPF (1905-ib: i=1˜l).
The band stop filter BSF decays the frequency band corresponding to the collision sound from the obtained waveform data and passes through the other frequency bands as it is. That is, the band stop filter BSF removes the data of the frequency band corresponding to the collision sound from the obtained waveform data, and outputs the data excluding the frequency band corresponding to the collision sound as the first sound signal which is the string striking sound waveform data. The first sound signal passing through the band stop filter BSF is output to the first sound signal generation unit 1909. On the other hand, the band pass filter BPF, from the obtained waveform data, passes through the frequency band corresponding to the collision sound as it is, to decay the other frequency bands. That is, the band pass filter BPF outputs the data of the frequency band corresponding to the collision sound from the obtained waveform data as the second sound signal which is the collision sound waveform data. The second sound signal passing through the band pass filter BPF is amplified based on a predetermined amplification factor in the amplifying unit 1907 (1907-i, i=1˜l) and is output to a second sound signal generation unit 1911. The amplifying unit 1907 may be omitted.
The first sound signal output from the band stop filter BSF (1905-ia: i=1˜l) of the waveform data separating unit 1905 is output to the multiplier 505 of the first sound signal generation unit 1909. The multiplier 505 multiplies the obtained first sound signal by the envelope waveform generated in the EV waveform generation unit 503, and outputs it to the delay unit 507. The function of the EV waveform generation unit 503, the delay unit 507 and the amplifying unit 509 in the first sound signal generation unit 1909 are the same as the first embodiment described referring to
The second sound signal output from the amplifying unit 1907 (if the amplifying 1907 is omitted, the second sound signal output from the band pass filter BPF of the waveform data separating unit 1905 (1905-ia: i=1 HI)) is output to the multiplier 605 of the second sound signal generation unit 1911. The multiplier 605 multiplies the obtained second sound signal by the envelope waveform generated in the EV waveform generation unit 603, and outputs it to the delay unit 607. The functions of the EV waveform generation unit 603, the delay unit 607 and the amplifying unit 609 in the second sound signal generation unit 1911 are the same as the first embodiment described referring to
The synthesis unit 315, as in the first embodiment described above, syntheses the first sound signal (the string striking sound signal) output from the first sound signal generation unit 1909 and the second sound signal (the collision sound signal) output from the second sound signal generation unit 1911, and outputs it to the output unit 307. The configuration of the sound generator 115A of the second embodiment has been described above.
In the second embodiment of the present disclosure, the sound generator 115A separates the waveform data into the string striking sound waveform data and the collision sound waveform data from the waveform data stored in the waveform data memory unit 1901 to generate the first sound signal and the second sound signal. The adjustment unit 313 controls the envelopes for the first sound signal and the second sound signal generated like this to be different based on the second operation data corresponding to the operation of the damper pedal 121 and it is possible to reproduce a sound similar to an acoustic piano.
In the first and second embodiments described above, the half pedal is not distinguished between the on-state side and the off-state side in its region (one state), the region of the half pedal is divided into a plurality, and the manner of decay of the string striking sound at each region may be changed.
In the first and the second embodiments described above, the key press speed is estimated to control the string striking sound and is based on it, it may be any physical quantity that can sound the string striking sound in an appropriate manner in accordance with the key operation. The same applies to collision sound control.
The following is a brief summary of an embodiment of this disclosure.
A sound signal generation device according to an embodiment of the present disclosure includes a signal generation unit and an adjustment unit. The signal generation unit generates a first sound signal and a second sound signal different from the first sound signal on the basis of first operation data corresponding to an operation of a key. The adjustment unit adjusts a relationship between the first sound signal and the second sound signal on the basis of the first operation data. Also, the adjustment unit controls a decay rate of the first sound signal to be different from a decay rate of the second sound signal on the basis of second operation data corresponding to an operation on a pedal. The sound signal generation device can be further configured as follows.
The adjustment unit may adjust the relationship between the first sound signal and the second sound signal to sound at respective timings according to a physical quantity of a key pressing operation of the key. Also, the adjustment unit may control the decay rate of the first sound signal to be different from the decay rate of the second sound signal on the basis of a key release operation of the key.
The pedal can be operated between a rest position and an end position. The adjustment unit may change the decay rate of the first sound signal from a first rate to a second rate, which is faster than the first rate, while may not change the decay rate of the second sound signal when the second operation data indicates that the pedal has moved from the end position to the rest position.
The adjustment unit may change the decay rate of the first sound signal from a third rate, which is faster than the first rate, to the second rate, which is faster than the second rate, while may not change the decay rate of the second sound signal when the second operation data indicates that the pedal has been moved from between the end position and the rest position to the rest position.
The adjustment unit may change the decay rate of the first sound signal from the third speed to the first speed, while may not change the decay rate of the second sound signal when the second operation data indicates that the pedal has been moved from between the end position and the rest position to the end position.
The physical quantity may be a value for a behavior of the key at a predetermined position in a pressing range of the key based on the first operation data.
The physical quantity may be a velocity or an acceleration of the key.
The relationship may include a relationship between the timing of the sound of the first sound signal and the second sound signal.
The relationship may include a relationship between a volume of the first sound signal and the second sound signal.
A sound signal generation device according to an embodiment of the present disclosure includes a signal generation unit and an adjustment unit. The signal generation unit generates a first sound signal and a second sound signal different from the first sound signal on the basis of first operation data corresponding to an operation of a key. The adjustment unit adjusts a relationship between the first sound signal and the second sound signal to sound at respective timings according to a physical quantity of a key pressing operation of the key. Also, the adjustment unit controls a decay rate of the first sound signal to be different from a decay rate of the second sound signal on the basis of a key release operation of the key.
A keyboard instrument according to an embodiment of the present disclosure includes any of the aforementioned sound signal generation device, the key, the pedal, a first detection unit and a second detection unit. The first detection unit outputs the first operation data corresponding to the operation of the key. The second detection unit outputs the second operation data corresponding to the operation on the pedal.
A sound signal generation method according to an embodiment of the present disclosure includes generating a first sound signal and a second sound signal different from the first sound signal on the basis of first operation data corresponding to an operation of a key, and adjusting a relationship between the first sound signal and the second sound signal to sound at respective timings according to a physical quantity of a key pressing operation of the key and controlling a decay rate of the first sound signal to be difference from a decay rate of the second sound signal on the basis of a key release operation of the key. The sound signal generation method can be further configured as follows.
Controlling the decay rate of the first sound signal to be difference from the decay rate of the second sound signal may include controlling the decay rate of the first sound signal to be different from the decay rate of the second sound signal when the first operation data indicates that a key has been released.
Controlling the decay rate of the first sound signal to be difference from the decay rate of the second sound signal may include controlling the decay rate of the first sound signal to be greater than the decay rate of the second sound signal when the first operation data indicates that a key has been released.
The physical quantity may be a value for a behavior of the key at a predetermined position in a pressing range of the key based on the first operation data.
The physical quantity may be a velocity or an acceleration of the key.
The relationship may include a relationship between the timing of the sound of the first sound signal and the second sound signal.
The relationship may include a relationship between a volume of the first sound signal and the second sound signal.
The physical quantity may be the acceleration of the key. The relative relationship between the timing of the sounding of the first sound signal and the second sound signal may vary based on the acceleration.
When the acceleration is relatively small, the timing of the sounding of the first sound signal may be before the timing of the sounding of the second sound signal. When the acceleration is relatively large, the timing of the sounding of the first sound signal may be later than the timing of the sounding of the second sound signal.
It is also within the scope of the present disclosure that a skill in art adds, deletes, or changes the design of a component, or adds, omits, or changes the conditions of a process as appropriate based on the configuration described as an embodiment of the present disclosure as long as the gist of the present disclosure is provided.
Even if it is other working effects which differ from the working effect brought about by the embodiment mentioned above, it is naturally understood that what is clear from the description of this Description, or what can be easily predicted by the skill in art is brought about by the present disclosure.
This application is a U.S. continuation application filed under 35 U.S.C. § 111(a), of International Application No. PCT/JP2018/034261, filed on Sep. 14, 2018, the disclosures of which are incorporated by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2018/034261 | Sep 2018 | US |
Child | 17200138 | US |