This application is a non-provisional application that claims priority benefits under Title 35, Unites States Code, Section 119(a)-(d) from Japanese Patent Application entitled “ELECTRONIC MUSICAL INSTRUMENT” by Ikuo Tanaka and Yoshinori Iwamoto, having Japanese Patent Application Serial No. 2008-250238, filed on Sep. 29, 2008, which application is incorporated herein by reference in its entirety.
1. Technical Field
The present invention generally relates to electronic musical instruments, and more particularly, to electronic musical instruments capable of generating musical sounds with plural timbres in response to a sound generation instruction.
2. Related Art
Electronic musical instruments having a plurality of keys composing a keyboard, in which, upon depressing plural ones of the keys, different timbres are assigned to each of the depressed plural keys, and musical sounds at pitches designated by the depressed keys are generated with the timbres assigned to the depressed keys, are known. An example of such related art is Japanese Laid-open Patent Application SHO 57-128397.
Another electronic musical instrument known to date generates musical sounds with multiple timbres concurrently in response to each key depression. For example, musical sounds that are to be generated by different plural kinds of wind instruments (trumpet, trombone and the like) at each pitch may be stored in a memory, and when one of the keys is depressed, those of the musical sounds stored in the memory and corresponding to the depressed key are read out thereby generating the musical sounds. In this case, when one of the keys is depressed, musical sounds with plural timbres are simultaneously generated, which provides a performance that sounds like a performance by a brass band. However, when plural ones of the keys are depressed, musical sounds with plural timbres are generated in response to each of the depressed keys. Therefore, when the number of keys depressed increases, the resultant musical sounds give an impression that the number of performers has increased, which sounds unnatural.
Another known electronic musical instrument performs a method in which, when the number of the keys depressed is fewer, musical sounds with a plurality of timbres are generated in response to each of the keys depressed; and when the number of the keys depressed is greater, musical sounds with a fewer timbres are generated in response to each of the keys depressed.
However, in the electronic musical instruments of related art, timbres that can be assigned according to states of key depression are limited, and the performance sounds unnatural or artificial when the number of keys depressed changes. For example, when one of the keys is depressed, a set of multiple musical sounds is generated; and when another key is depressed in this state, the musical sounds being generated are stopped, and another set of multiple musical sounds is generated in response to the key that is newly key-depressed. Furthermore, when plural ones of the keys are depressed at the same time, timbres to be assigned to the respective keys are determined; but when other keys are newly depressed in this state, the new key depressions may be ignored, which is problematical because such performance sounds unnatural.
The invention has been made to address the problems described above. In accordance with an advantage of some aspects of the invention, there is provided an electronic musical instrument by which naturally sounding musical sounds can be generated even when the states of key depression are changed.
In accordance with an embodiment of the invention, an electronic musical instrument includes:
an input device that inputs a sound generation instruction that instructs to start generating a musical sound at a predetermined pitch and a stop instruction that instructs to stop the musical sound being generated by the sound generation instruction;
a plurality of parts that are assigned to the musical sound at the predetermined pitch whose sound generation is instructed by the sound generation instruction inputted by the input device and that generate the musical sound with set timbres;
a first sound generation control device that controls such that, when a sound generation instruction is inputted by the input device to start generation of a musical sound at a specified pitch, a predetermined number of parts among the plurality of parts are assigned to the musical sound whose sound generation is instructed, and the predetermined number of parts stop the musical sounds being generated and generate the musical sound whose sound generation is instructed;
a second sound generation control device that controls such that, when a sound generation instruction is inputted by the input device to start generation of a musical sound at a specified pitch, a predetermined number of parts among the plurality of parts are generally equally assigned to the musical sound being generated and the musical sound whose sound generation is instructed, and the respective assigned parts generate or continue generating the musical sound being generated and the musical sound whose sound generation is instructed;
an on-on time timer device that measures a time difference between a first sound generation instruction inputted by the input device and a second sound generation instruction inputted next to the first sound generation instruction; and
a switching device that changes control by the first sound generation control device to control by the second sound generation control device after the second sound generation instruction, when the second sound generation instruction is given while the musical sound whose sound generation is instructed by the first sound generation instruction is controlled and generated by the first sound generation control device, and a time difference between the first sound generation instruction and the second sound generation instruction measured by the on-on time timer device is less than a double stop judgment time having a predetermined time duration.
In the electronic musical instrument in accordance with a first aspect of the embodiment of the invention, the switching device may switch such that, after a musical sound whose sound generation is instructed by the sound generation instruction inputted by the input device is switched to be controlled and generated by the second sound generation control device, and when the number of sound generation instructions to which corresponding sound stop instructions are not inputted becomes zero, a next musical sound whose sound generation is instructed by a sound generation instruction inputted by the input device is controlled and generated by the first sound generation control device.
In the electronic musical instrument in accordance with a second aspect of the embodiment of the invention, the switching device may switch such that, after a musical sound whose sound generation is instructed by the sound generation instruction inputted by the input device is switched to be controlled and generated by the second sound generation control device, and when the number of sound generation instructions to which corresponding sound stop instructions are not inputted becomes one, a next musical sound whose sound generation is instructed by a sound generation instruction inputted by the input device is controlled and generated by the first sound generation control device.
The electronic musical instrument in accordance with a third aspect of the embodiment of the invention further includes:
a gate time timer device that measures a time difference between a sound generation instruction inputted by the input device and a stop instruction that instructs to stop a musical sound generated in response to the sound generation instruction; and
a mistouch correction device that, when the switching device has switched such that the second sound generation control device controls and generates a musical sound whose sound generation is instructed by the first sound generation instruction and a musical sound whose sound generation is instructed by the second sound generation instruction inputted next to the first sound generation instruction, a stop instruction is then inputted to instruct to stop the musical sound generated by the first sound generation instruction, and a time difference between the first sound generation instruction and the stop instruction measured by the gate time timer device is within a mistouch judgment time having a predetermined time duration, stops the musical sound generated by the first sound generation instruction, and assign parts among the predetermined number of parts which are not assigned to the musical sound whose sound generation is instructed by the second sound generation instruction to the musical sound whose sound generation is instructed by the second sound generation instruction thereby starting generation of the musical sound which is thereafter controlled by the first sound generation control device.
According to the electronic musical instrument of the embodiment of the invention described above, a performance in unison with an ample depth generated by the first sound generation control device can be switched to a chord performance that maintains a feeling of appropriateness of the number of performers generated by the second sound generation control device without special operations using switches or the like. Therefore, the embodiment can provide effects that create realistic performance with timbres which may be generated by the brass section that simultaneously plays sounds of multiple musical instruments, without artificial changes in the sound volume and abrupt sound discontinuity.
According to the electronic musical instrument of the first aspect of the embodiment, in addition to the effects provided by the electronic musical instrument of the embodiment described above, a chord performance that maintains a feeling of appropriateness of the number of performers generated by the second sound generation control device can be naturally switched to a performance in unison with an ample depth to be generated by the first sound generation control device.
According to the electronic musical instrument in accordance with the second aspect of the embodiment, in addition to the effects provided by the electronic musical instrument of the embodiment described above, a chord performance that maintains a feeling of appropriateness of the number of performers generated by the second sound generation control device can be naturally switched to a performance in unison with an ample depth to be generated by the first sound generation control device.
According to the electronic musical instrument of the third aspect of the embodiment, in addition to the effects provided by the electronic musical instrument of the embodiment described above, the following effect can be obtained. When adjacent keys are touched by mistake when playing a performance in unison with the depth by the first sound generation control device, the control may be changed to a control by the second sound generation control device, but immediately thereafter the control returns to the control by the first sound generation control device. Therefore unnatural changes in the sound volume would not occur, and a performance in unison with an ample depth by the first sound generation control device can be conducted in a manner as expected.
A first preferred embodiment of the invention is described below with reference to the accompanying drawings.
As shown in
An output of the sound source 7 is connected to the D/A converter 8, an output of the D/A converter 8 is connected to an amplifier 21 that is an external equipment, and an output of the amplifier 21 is connected to a speaker device 22 that is an external equipment. On the other hand, the MIDI interface 6 is connected to a MIDI keyboard 20 that is an external equipment.
The CPU 2 controls each of the sections of the electronic musical instrument 1 according to a control program 3a and fixed value data stored in the ROM 3. The CPU 2 includes a built-in timer 2a wherein the timer 2a counts clock signals generated by a clock signal generation circuit not shown, thereby measuring time. By the time measured by the timer 2a, an on-on time that is a time duration from an input of note-on information to an input of the next note-on information, and a gate time that is a time duration from an input of note-on information until an input of note-off information corresponding to the note-on information, and a sound generation continuation time that is a time elapsed from the time when note-on information is inputted thereby instructing the sound source 7 to start sound generation.
It is noted that the note-on information and the note-off information are information that are inputted by the MIDI keyboard 20 through the MIDI interface 6, and conform to the MIDI specification. Also, the note-on information and the note-off information may be generally referred to as note information.
Note-on information may be transmitted when a key of the MIDI keyboard 20 is depressed and instructs to start generation of a musical sound, and is composed of a status indicating that the information is note-on information, a note number indicating a pitch of the musical sound, and a note-on velocity indicating a key depression speed.
Also, note-off information may be transmitted when a key of the MIDI keyboard 20 is released and instructs to stop generation of a musical sound, and is composed of a status indicating that the information is note-off information, a note number indicating a pitch of the musical sound and a note-off velocity indicating a key releasing speed.
The ROM 3 is a read-only (non-rewritable) memory, and may include a control program memory 3a that stores a control program to be executed by the CPU 2, a musical instrument arrangement memory 3b that stores arrangements of musical instruments, and a pitch order memory 3c. The details of the control program stored in the control program memory 3a shall be described below with reference to flow charts shown in
The arrangements of musical instruments stored in the musical instrument arrangement memory 3b may include pre-set arrangements of multiple kinds of musical instruments for playing concerts, such as, for example, an orchestra that performs symphonies, sets of a musical instrument and an orchestra that perform concertos (piano concertos and violin concertos, for example), ensembles for string instruments or wind and brass instruments, big bands, small-sized combos and the like. These pre-set arrangements can be selected by the performer. It is noted that the arrangements of musical instruments may be stored in advance in the ROM 3, but may be arbitrarily modified by using operation members and stored in the RAM 4.
The pitch order memory 3c stores the pitch order defining the order of pitches of plural timbres that can be generated by the sound source 7. For example, in the case of wind and brass instruments, the order of the instruments from higher to lower pitch, namely, flute, trumpet, alto saxophone and trombone are stored. When the mode is set to a unison mode, timbres assigned to the respective parts are assigned to an inputted note according to this pitch order. It is noted that the pitch order may be stored in advance in the ROM 3, but may be arbitrarily modified by using operation members and may be stored in the RAM 4.
The RAM 4 is a rewritable memory, and includes a flag memory 4a for storing flags and a work area 4b for temporarily storing various data when the CPU 2 executes the control program stored in the ROM 3. The flag memory 4a stores mode flags. The mode flags are flags that indicate if the performance mode to assign parts to each note in the electronic musical instrument 1 is Unison 1 mode or Unison 2 mode. Unison 1 mode and Unison 2 mode shall be described below.
The work area 4b stores the time at which note-on information is inputted, corresponding to a note number indicated by the note-on information. The stored time is referred to when the next note-on information is inputted, whereby an on-on time that is a time difference between the note-on information obtained now and the note-on information inputted immediately before is obtained, and Unison 1 mode or Unison 2 mode is set according to the value of the on-on time.
The time of inputting the note-on information is also referred to when note-off information is inputted, whereby a gate time that is a time duration from the time of inputting the note-on information to the time when note-off information having the same note number as the note number of the note-on information is inputted is obtained. When the gate time is shorter than a predetermined time, processes such as a process to judge whether a mistouch occurred or not are executed.
Also, the work area 4b is provided with a note map. The note map stores note flags and reassignment flags for note numbers, respectively. The note flag is a flag that indicates if sound generation is taking place or not. When an instruction to start sound generation is given to the sound source 7, the note flag is set to 1, and when an instruction to stop sound generation is given, the note flag is set to 0.
Also, the reassignment flag is set, in Unison 2 mode, to 1 for note numbers when their associated parts are to be reassigned, and to 0 when the reassignment process is completed. When parts are assigned to a note number, part numbers indicating the assigned parts are stored corresponding to the note number.
The operation panel 5 is provided with a plurality of operation members to be operated by the performer, and a display device that displays parameters set by the operation members and the status according to each performance.
As the main operation members, a mode switch for switching between polyphonic mode and unison mode, a timbre selection switch for selecting timbres in the polyphonic mode, and an arrangement setting operation member for selecting or setting arrangements of musical instruments may be provided.
The polyphonic mode is a mode for generating musical sounds in a single timbre, whereby musical sound in a single timbre selected by the timbre selection switch is generated in response to each note-on information inputted through the MIDI keyboard 20.
The unison mode is a mode for generating musical sounds with a plurality of timbres, whereby musical sound in one or a plurality of timbres in the arrangement of musical instrument set by the arrangement setting operation member is generated in response to each note-on information inputted through the MIDI keyboard 20. The unison mode includes unison 1 mode (hereafter simply referred to as “Unison 1”) and unison 2 mode (hereafter simply referred to as “Unison 2”).
The MIDI interface 6 is an interface that enables communications of MIDI information that conforms to the MIDI standard, and a USB interface may also be used in recent years. The MIDI interface 6 is connected to the MIDI keyboard 20, wherein note-on information, note-off information and the like are inputted through the MIDI keyboard 20, and the inputted MIDI information is stored in the work area 4b of the RAM 4.
The MIDI keyboard 20 is provided with a plurality of white keys and black keys. When any of the keys are depressed, the MIDI keyboard 20 outputs note-on information corresponding to the depressed keys, and when the keys are released, the MIDI keyboard 20 outputs note-off information corresponding to the released keys.
The sound source 7 stores musical sound waveforms of a plurality of timbres of a variety of musical instruments, such as, a piano, a trumpet and the like, reads specified ones of the stored musical sound waveforms according to information sent from the CPU 2 instructing to start generation of musical sounds, and generates the musical sounds with a pitch, a volume and a timbre according to the instruction. Musical sound signals outputted from the sound source 7 are converted to analog signals by the D/A converter 8, and outputted.
The D/A converter 8 connects to an amplifier 21. The analog signal converted by the D/A converter 8 is amplified by the amplifier 21, and outputted as a musical sound from a speaker system 22 connected to the amplifier 21.
Next, referring to
In an example to be described below, the musical instrument arrangement is compose of trumpet assigned to Part 1, clarinet assigned to Part 2, alto saxophone assigned to Part 3 and trombone assigned to Part 4, and the pitch order is set in a manner that Part 1, Part 2, Part 3 and Part 4 are set in this order from higher pitch.
As indicated above, the note-on information is information indicating that a key is depressed, and the note-off information is information indicating that the depressed key is released. For example, a key corresponding to Note 1 is depressed at time t1 and is kept depressed until it is released at time t3.
As indicated in
In this manner, in Unison 1, the timbres corresponding to all the musical instruments set in the musical instrument arrangement are simultaneously generated at the same pitch in response to each sound generation instruction, and operated in a monophonic manner with a last-note-priority.
Next, referring to
As shown in
More specifically, among the four parts that are generating musical sounds at pitch n1, Part 1 (with the timbre being trumpet) and Part 2 (with the timbre being clarinet) which are higher in the pitch order continue generating the musical sound at pitch n1, and Part 3 (with the timbre being alto saxophone) and Part 4 (with the timbre being trombone) which are lower in the pitch order stop the sound generation at pitch n1, and start sound generation at pitch n2.
When note-off information of Note 1 is inputted at time t3, the musical sound of Part 1 and Part 2 being generated at pitch n1 is stopped, and when note-off information of Note 2 is inputted at time t4, the musical sound of Part 3 and Part 4 being generated at pitch n2 is stopped.
When the on-on time is within the double stop judgment time JT while the mode is in Unison 1, the mode is set to Unison 2, and the plural parts are divided, and assigned to a plurality of notes. Once the mode is set to Unison 2, the mode of Unison 2 is maintained thereafter irrespective to the on-on time, and the mode is switched to Unison 1 when all of the keys of the keyboard are released. It is noted that, as another method of switching Unison 2 to Unison 1, after the number of depressed keys becomes to be one in Unison 2 mode, the mode may be switched to Unison 1 at the next input of note-on information.
In this case, as shown in
Next, the note-on information of Note 3 at pitch n3 is inputted at time t3. At this moment, note-off information of Note 1 and Note 2 has not been inputted, such that the mode is maintained in Unison 2 without regard to the on-on time between Note 2 and Note 3, Part 1 (with the timbre being trumpet) that is generating sound at pitch n1 continues the sound generation, Part 2 (with the timbre being clarinet) stops the sound generation and starts sound generation at pitch n2, and Part 3 (with the timbre being alto saxophone) and Part 4 (with the timber being trombone) that are generating the sound at pitch n2 stop the sound generation at pitch n2, and start sound generation at pitch n3.
Next, the note-on information of Note 4 at pitch n4 is inputted at time t4. At this moment, the mode is also maintained in Unison 2 without regard to the on-on time between Note 3 and Note 4; Part 1 (with the timbre being trumpet), Part 2 (with the timbre being clarinet) and Part 3 (with the timbre being alto saxophone) continue the sound generation; and Part 4 (with the timbre being trombone) that is generating the sound at pitch n3 stops the sound generation at pitch n3, and starts sound generation at pitch n4.
Next, referring to
First,
In this manner, in Unison 2, plural parts are generally equally assigned to key-depressed notes according to the pitch order. For this reason, the number of parts that generate sounds does not drastically increase depending on the number of depressed keys, whereby musical sounds with a constant depth can be obtained. Even when the number of notes increases more than the number of parts, the key depression is not ignored, and optimum ones of the parts generate musical sounds without the sound generation being biased to particular ones of the musical instruments, balanced musical tones according to the pitch order can be obtained.
Next, the mechanism of generally equally assigning parts to notes in key-depression (hereafter referred to as key-depressed notes) according to the pitch order in Unison 2 is described.
When the number of key-depressed notes is smaller than or equal to ( < or =) the number of parts, the number of parts to be assigned (PartCnt) to each of the key-depressed notes is obtained. When the integer quotient of “the number of parts—the number of notes” is a, and the remainder is b, PartCnt for b number of the notes may be set to “a+1” and PartCnt for the other notes may be set to a. Concretely, for example, among key-depressed notes, PartCnt for the notes from highest in pitch to b-th note is set to “a+1” and PartCnt for the other notes is set to a. Alternatively, among key-depressed notes, PartCnt for the notes from lowest in pitch to b-th note may be set to “a+1” and PartCnt for the other notes may be set to a. Alternatively, without regard to the pitch, PartCnt for the notes up to b-th note randomly selected without repetition may be set to “a+1” and PartCnt for the other notes may be set to a. When PartCnt for each of the notes is decided, PartCnt for the parts from higher to lower in the pitch order are successively assigned to the notes from higher to lower pitch, respectively. It is noted that each of the parts may be assigned only once.
When the number of key-depressed notes is greater than ( >) the number of parts, the number of possible assignments (AssignCnt) for each of the parts is obtained. When the integer quotient of “the number of notes—the number of parts” is a, and the remainder is b, AssignCnt for b number of the parts may be set to “a+1” and AssignCnt for the other parts may be set to a. Concretely, for example, AssignCnt for the parts from highest in the pitch order to b-th part among the parts is set to “a+1” and AssignCnt for the other parts is set to a. Alternatively, AssignCnt for the parts from lowest in the pitch order to b-th part among the parts may be set to “a+1” and AssignCnt for the other parts may be set to a. Alternatively, without regard to the pitch, AssignCnt for the parts up to b-th part randomly selected without repetition may be set to “a+1” and AssignCnt for the other parts may be set to a. When AssignCnt for each of the parts is decided, one of the parts is assigned to each one of the key-depressed notes. In this instance, a part highest in the pitch order is selected as a part to be assigned, and this part is successively assigned to the notes from higher to lower pitch. Each of the parts can be assigned AssignCnt times. When one of the parts is assigned AssignCnt times, a part next highest in the pitch order is selected as a part to be assigned, and this part is assigned AssignCnt times.
In this manner, the parts can be generally equally assigned to each of the key-depressed notes with good balance, regardless of the number of notes or the number of parts.
Next, referring to
When the note-off information of Note 1 is inputted immediately thereafter at time t3, Part 1 and Part 2 stop the sound generation at pitch n1. However, when the gate time of Note 1 is within a mistouch judgment time MT having a predetermined duration of time, Note 1 may be judged to be a mistouch, and sound generation by Part 1 and Part 2 stopped at time t3 may be restarted. The above process is referred to as a mistouch process. The mistouch judgment time MT may be set, for example, at 100 msec.
An event of reducing the number of depressed keys from two to one is used as one of the conditions to judge the event as a mistouch. This is because such an event is a typical example of mistouch performance. Also, an event in which a pitch difference of two keys is within 5 semitones is used as one of the conditions to judge the event as a mistouch. This is because, when a key, which is separated from another key that is to be depressed, is depressed for a short time, such a key depression can be considered as an intended key depression, not a mistouch. Also, an event in which an on-on time of two keys is within the double stop judgment time JT is used as one of the conditions to judge the event as a mistouch. This is because, when an on-on time is longer than the double stop judgment time JT, such a key depression can be considered as an intended key depression, not a mistouch.
As shown in
Also, even when the gate time of a note is within the mistouch judgment time MT, if note-off information of another note is imputed immediately before the time of input of note-off information of the note, the note may not preferably be judged as a mistouch. Such an event may occur when a staccatos performance in a chord is player, and a plurality of note-off information sets are inputted generally at the same time, which is not a mistouch. The time difference among the inputs of the multiple note-off information sets, which may be considered as being generally at the same time, may be, for example, 100 msec.
Next, a mis-legato process is described with reference to
When the mode is Unison 2, and the legato performance is played, a problem may occur in which parts that should generate musical sounds are reduced.
As shown in
In this case, it is assumed that the mode is Unison 2, and Part 3 and Part 4 are generating musical sound at pitch n3 in response to an input of note-on information of Note 1, as indicated in
Next, when note-on information of Note 3 at pitch n2 is inputted at time t2, Part 1 highest in the pitch order continues the sound generation at pitch n1, and Part 2 lower in the pitch order stops the sound generation at pitch n1, and starts sound generation at pitch n2. When note-off information of Note 2 is inputted immediately thereafter at time t3, Part 1 stops the sound generation at pitch n1, and only Part 2 continues the sound generation at pitch n2. However, it can be considered that the performer plays the notes with a legato performance, and does not intend to reduce the number of parts that should generate musical sounds. Therefore, when the legato performance is executed in this manner, sound generation by Part 1 at pitch n2 may be restarted at time t3, as shown in
Next, referring to flow charts of
In the unison process, first, an initial setting is conducted (S1). As the initial setting, the mode flag stored in the flag memory 4a of the RAM 4 is set to 0, whereby setting the mode to Unison 1, and all the note flags stored in the note map are set to 0. Also, the timer 2a built in the CPU 2 is set to start time measurement.
Next, it is judged as to whether unprocessed MIDI information inputted in the MIDI interface remains (S2), and if unprocessed MIDI information remains (S2: Yes), whether the information is note-on information is judged (S3). If no unprocessed MIDI information remains (S2: No), the process waits until new MIDI information is inputted.
If the remaining information is note-on information (S3: Yes), the current time measured by the timer 2a is stored in the work area 4b corresponding to that note-on information (S4).
Next, it is judged as to whether the mode flag is set to 0 (S5), and if the mode flag is set to 0 (S5: Yes), whether the sound source 7 is generating any musical sound is judged (S6). This judgment can be done by referring to note flags stored in the note map that is stored in the work area 4b. In the note map, note flags are set corresponding to notes when start of sound generation is instructed to the sound source 7, and when stop of sound generation of notes is instructed, the corresponding note flags are reset.
If any of the musical sounds is being generated (S6: Yes), the time of input of note-on information immediately before is detected from the work area 4b, an on-on time that is a time difference with respect to the current time is calculated, and whether the on-on time is within a double stop judgment time JT is judged (S7). When the on-on time is within the double stop judgment time JT (S7: Yes), the mode flag is set to 1 (S8).
When it is judged in the judgment step S5 that the mode flag is not 0, but 1 (S5: No), or the step S8 is finished, an assignment process in Unison 2 is conducted (S9). The assignment step is described below with reference to
When it is judged in the judgment step S7 that the on-on time is not within the double stop judgment time JT (S7: No), the mode is Unison 1, and an instruction is given to the sound source 7 to stop the musical sounds of all of the parts that are generating sounds (S10). This instruction is done by referring to the note map, and sending information to the sound source 7 to stop notes whose note flags are set to 1. Then the note flags are set to 0, and part numbers stored in association with the notes are cleared.
If it is judged in the judgment step S6 that no musical sound is being generated (S6: No), or the step S10 is finished, an instruction is given to the sound source 7 to start sound generation by all the parts in the musical instrument arrangement at pitches corresponding to the note numbers included in the inputted note-on information, and note flags corresponding to the note numbers in the note map are set to 1 (S11), and the process returns to the step S2.
On the other hand, when it is judged in the judgment step S3 that the MIDI information is not note-on information (S3: No), whether the information is note-off information is judged (S21). If the information is note-off information (S21: Yes), an instruction is given to the sound source 7 to stop generation of the musical sounds at pitches corresponding to the note numbers indicated by the note-off information, and note flags corresponding to the note numbers in the note map are set to 0, and part numbers stored corresponding to the notes are cleared (S22). Next, whether or not the mode flag is set to 0 is judged (S23), and if the mode flag is not set to 0 but set to 1 (S23: No), a correction process is conducted (S24). The correction process may be a mistouch process or a mis-legato process, which are described below with reference to
When the correction process S24 is finished, the note map is referred, and a judgment is made as to whether the entire note flags are set to 0 whereby all of the keys are released (S25). When all of the keys are released (S25: Yes), the mode flag is set to 0 (S26), and the process returns to the step S2. When it is judged in the judgment step S23 that the mode flag is 0 (S23: Yes), or it is judged in the judgment step S25 that any of the keys is not released (S25: No), the process returns to the step S2. It is noted that, in the judgment step S25, by referring to the note map, it may be judged as to whether the number of depressed keys is 1 (S25), and if the number of depressed keys is 1 (S25: Yes), the mode flag may be set to 0 (S26), and the process may be returned to the step S2.
In the judgment step S21, when the unprocessed information is not note-off information (S21: No), a process corresponding to the information is executed (S27), and the process returns to the step S2.
Next, referring to
Then, to notes with reassignment flags being set to 1, parts are assigned according to note numbers of the notes and the pitch order of the parts (S33), as described above with reference to
Next, the sound generation process is described with reference to
If there are such parts that are generating sound (S42: Yes), the sound source 7 is instructed to stop generating the sound by the parts, and the part numbers stored in the note map corresponding to the selected note are cleared (S43).
When the step S43 is executed, or no part that is generating sound exists other than the parts assigned to the selected note number (S42: No), a judgment is made as to whether the parts assigned to the selected note number are generating sound (S44), and if the parts are not generating sound (S44: No), the sound source 7 is instructed to start sound generation, the note flag corresponding to the note number is set to 1, and part numbers indicating the assigned parts are stored in the note map corresponding to the note number (S45).
When the step S45 is executed, or when the parts assigned to the selected note number are generating sound (S44: Yes), the reassignment flag corresponding to the note number is set to 0 (S46), and a judgment is made as to whether the note map includes any note numbers whose reassignment flags are set to 1 (S47). If there are note numbers with reassignment flags set to 1 (S47: Yes), the process returns to the step S41. If there are no note numbers with reassignment flags set to 1 (S47: No), the sound generation process is finished.
Next, referring to
When the pitch difference is within five semitones (S53: Yes), an on-on time between the note corresponding to the note-off information and the note that is generating sound is calculated, and whether the on-on time is within a double stop judgment time JT (S54) is judged. When the on-on time is within the double stop judgment time JT (S54: Yes), it is judged that a mistouch occurs, and the mode flag is set to 0, thereby setting the mode to Unison 1 (S55). Then, the sound source 7 is instructed to start sound generation with a timber of a part that is not assigned to the note that is generating the sound at the same pitch as that of the note that is generating the sound (S56).
On the other hand, when it is judged in the judgment step S51 that the gate time is not within the mistouch judgment time MT (S51: No), it is judged in the judgment step S52 that the number of depressed keys has not changed from two keys to one key (S52: No), it is judged in the judgment step S53 that the pitch difference between two keys is not within five semitones (S53: No), or it is judged in the judgment step S54 that the on-on time is not within the double stop judgment time JT (S54: No), a time difference between the time of input of the note-off information of the note that is turned off and the time of input of the note-on information of the latest note that is currently generating sound, namely, a legato time is calculated, and whether the legato time is within a mis-legato judgment time LT (S57) is judged.
When the legato time is within the mis-legato judgment time LT (S57: Yes), an on-on time with respect to the most recent note that is currently generating sound is calculated, and whether the on-on time is within the double stop judgment time JT (S58) is judged. When the on-on time is not within the double stop judgment time JT (S58: No), it is judged that a mis-legato performance is conducted, and parts are reassigned to the notes that are generating sound by the method described with reference to
When the on-on time is within the double stop judgment time JT (S58: Yes), it is judged that a chord performance in staccatos is played, and reassignment is not conducted. Also, when it is judged in the judgment step S57 that the legato time is not within the mis-legato judgment time LT (S57: No), the performance is judged not to be a mis-legato performance, and the process returns from the correction process to the unison process.
According to the first embodiment described above, the electronic musical instrument 1 of the invention can switch the mode from Unison 1 to Unison 2 when an on-on time is within the double stop judgment time JT. Therefore, when one of the keys is depressed, the mode is set to Unison 1, wherein all the parts forming a musical instrument arrangement generated sounds at the same pitch. When plural ones of the keys are depressed within a double stop judgment time JT, the mode is set to Unison 2 wherein plural parts forming the musical instrument arrangement are divided and assigned to the plural keys depressed. Therefore it is effective in that, when plural ones of the keys are depressed at the same time like a chord performance, naturally sounding musical sounds can be generated without increasing the number of parts.
Also, when note-off information of a note is inputted, and the gate time of the note is within a mistouch judgment time MT, it is judged to be a mistouch that is not intended, the mode in Unison 2 is returned to Unison 1, and the parts whose sound generation is stopped restart sound generation. Therefore it is effective in that naturally sounding musical sounds can be generated even when a mistouch occurs.
When a legato performance is played in Unison 2, note-off information of a note that is generating sound is inputted immediately after new note-on information is inputted, such that sound generation of parts assigned to the note whose note-off information is inputted would be stopped, but if such a performance is judged as a mis-legato performance, the stopped parts are reassigned to the note that is generating sound. Therefore, a unison performance without changing the number of parts can be conducted, and unintended sound thinning can be prevented.
Next, a method in accordance with a second embodiment is described. In the first embodiment, when the mode is Unison 2, and new note-on information is inputted, reassignment is executed regardless of the presence or the absence of parts that are not used, sound generation of parts that have started sound generation is stopped, and sound generation at a different pitch is started again, such that unnatural discontinuity of musical sound may occur. In accordance with the second embodiment, stop and restart of sound generation can be reduced as much as possible and more naturally sounding musical sound can be generated.
According to the method of the second embodiment, when a new key depression occurs, a sound generation continuation time of a key-depressed note that is generating sound is obtained. When the note has a sound generation continuation time that is longer than a reassignment judgment time ST having a predetermined time duration, the note is not subject to reassignment. The reassignment judgment time ST is longer than the double stop judgment time JT, and may be set, for example, at 80 msec.
In this case, as shown in
Next, the note-on information of Note 3 at pitch n3 is inputted at time t3. At this moment, note-off information of Note 1 and Note 2 has not been inputted, such that the mode is maintained in Unison 2 without regard to the on-on time between Note 2 and Note 3. Also, as the sound generation continuation times of Note 1 and Note 2 are within the reassignment judgment time ST, Note 1 and Note 2 are subject to reassignment, whereby Part 1 (with the timbre being trumpet) that is generating sound at pitch n1 continues the sound generation, Part 2 (with the timbre being clarinet) stops the sound generation and starts sound generation at pitch n2, and Part 3 (with the timbre being alto saxophone) and Part 4 (with the timber being trombone) that are generating the sound at pitch n2 stop the sound generation at pitch n2, and start sound generation at pitch n3.
Next, the note-on information of Note 4 at pitch n4 is inputted at time t4. At this moment, the mode is also maintained in Unison 2 regardless of the on-on time between Note 3 and Note 4, but because the sound generation continuation times of Note 1, Note 2 and Note 3 are longer than the reassignment judgment time ST, Note 1, Note 2 and Note 3 are not subject to reassignment, such that the sound generation by the parts assigned to Notes 1-3 are continued. Further, because the pitch n4 of Note 4 is lower than the pitches n1, n2 and n3 of Notes 1-3, Part 4 (with the timber being trombone) that is the lowest in the pitch order is assigned to Note 4 that is a most recent key-depressed note.
Next, referring to
When the pitch of Note 2 is lower than the pitch of Note 1, parts that are unused and lower in the pitch order may be assigned in a manner described above. Similarly, when the pitch of Note 2 is higher than the pitch of Note 1, and unused parts are higher in the pitch order, the unused parts may be assigned to Note 2.
As shown in
Next, referring to
Also, part flags are stored in the work area 4B of the RAM 4. The part flags are provided corresponding to the respective parts. When a part is assigned to a note and starts sound generation, the corresponding part flag is set to 1, and when the sound generation is stopped, the part flag is set to 0. When a part is assigned to a plurality of notes, the corresponding part flag is set to 0 when all of the notes stop sound generation. It is noted that other structures and processes in the second embodiment are generally the same as those of the first embodiment.
As shown in
Next, one of the notes whose unprocessed flags are set to 1 is selected (S63). Alternatively, for example, the selection may be done by selecting a note with the largest note number or the smallest note number.
Then, a judgment is made as to whether the selected note has a sound generation continuation time within a reassignment judgment time ST having a predetermined time duration (S64). If the sound generation continuation time is within the reassignment judgment time ST (S64: Yes), the reassignment flag corresponding to the note is set to 1 whereby the note is made to be subject to reassignment (S65). If the sound generation continuation time is not within the reassignment judgment time ST (S64: No), the part flag of the part assigned to the note is set to 1 (S66).
When the step S65 or S66 is finished, the unprocessed flag of the note is set to 0 (S67), and it is then judged as to whether notes with unprocessed flags set to 1 exist (S68). If notes with unprocessed flags being set to 1 exist (S68: Yes), the process returns to the step S63. If notes with unprocessed flags set to 1 do not exist (S68: No), reassignment flags corresponding to new notes are set to 1 (S69).
Next, a judgment is made as to whether parts that can be assigned (assignable parts) exist (S70). If there are assignable parts (S70: Yes), the assignable parts are equally assigned according to the pitch order to a group of notes having reassignment flags set to 1 (S71). The assignable parts are parts having part flags set to 0. Concretely, assignable parts are any parts other than parts that are assigned to notes having a sound generation continuation time measured from note-on which is longer than the reassignment judgment time ST. If no assignable parts exist (S70: No), a note with the reassignment flag being set to 1 is assigned a part that is assigned to a note that is generating sound at a pitch closest to the pitch of the aforementioned note, and has a pitch order close to the pitch order to the pitch of the note with the reassignment flag set to 1. When the step S71 or S72 is finished, the sound generation process shown in
According to the second embodiment, when a note that is generating sound has a sound generation continuation time longer than the reassignment judgment time ST, it is judged that the note that is generating sound has being sounding for sufficiently a long time, and the note is not made to be subject to reassignment. Accordingly, since parts that are assigned to the note that is generating sound are not muted, it is effective in that unnatural discontinuation of sounds can be avoided, and naturally sounding musical sounds can be generated.
It is noted that, according to the first embodiment, when note-on information is inputted, reassignment of parts may occur if the on-on time is within the double stop judgment time JT. Accordingly, some of the parts may stop sound generation immediately after the sound generation has been started, and restart sound generation at a modified pitch. This may give an impression that the musical sounds become muddy. To address this issue, when note-on information is inputted, sound generation may be made to start after a predetermined delay time d. As a result, if another set of note-on information is inputted within the delay time d, and parts are assigned to the note, the note that was in note-on (key-depressed) earlier has not started sound generation as being in the delay time, whereby stop of sound generation immediately after it has been started can be avoided, and musical sounds can be prevented from becoming muddy.
In this case, when the delay time d is not provided, as indicated in
When the delay time d has elapsed from time t1, Part 1 and Part 2 start sound generation at pitch n1; and when note-on information of Note 3 is inputted at time t3, Part 2 that is generating sound at pitch n1 is stopped, and Part 2 is assigned to Note 3, and set with a delay time d. Then, when the delay time d has elapsed from time t2, Part 3 and Part 4 start sound generation at pitch n2; and when the delay time d has elapsed from time t3, Part 2 starts sound generation at pitch n3.
Provision of the delay time d in this manner can suppress the phenomenon in which the musical sound by Part 3 and Part 4 that started sound generation at time t1 is stopped immediately thereafter at time t2, and sound generation by them at a modified pitch is started again, whereby the musical sound can be prevented from becoming muddy.
To realize the method described above, the sound source 7 is equipped with the following functions. For example, the sound source 7 measures the delay time d from the time when an instruction to start sound generation is inputted, and starts the sound generation after the delay time d elapsed. When an instruction to stop the sound generation is inputted within the delay time d, time measurement of the delay time d is stopped, and the sound generation is not started.
Provision of the delay time d before starting sound generation can suppress the phenomenon in which generation of musical sound is stopped immediately after it has been started due to reassignment and musical sounds become muddy, even when new note-on information is inputted during the delay time d.
Embodiments of the invention are described above. However, the invention is not at all limited to the embodiments described above, and it can be readily understood that many improvements and changes can be made within the range that does not depart from the subject matter of the invention.
For example, in the embodiments described above, the sound source 7 is described as being built in the electronic musical instrument 1, and connected through the bus to the CPU 2, but may be provided as an external sound source that may be connected externally through the MIDI interface 6.
It is noted that, in the embodiments described above, although not particularly described, the system for generating musical sounds by the sound source 7 may use a system that stores waveforms of various musical instruments and reads out the waveforms to generate musical sounds with desired timbres, or a system that modulates a basic waveform such as a rectangular waveform to generate musical sounds.
Number | Date | Country | Kind |
---|---|---|---|
2008-250238 | Sep 2008 | JP | national |