1. Field of the Invention
The present invention relates to an electronic musical sound generator used for electronic musical instruments or the like.
2. Discussion of Background
Electronic organs and electronic pianos are provided with an external interface for inputting and outputting performance data as well as a performance interface for actually giving a performance, such as a keyboard, and a panel interface for making various settings for the performance. A section having these interfaces is hereinafter called first control means.
The above-described electronic musical instruments also have multiple types of sound sources corresponding to the number of sounds stored by sampling. The sound sources are provided as a plurality of sound source boards. A plurality of sound production sequences are also provided, and the number of sounds corresponding to the number of sequences can be produced according to the tone, the key number, and the intensity of performance (including what is converted from velocity data) instructed by the interface section. Usually, the sound production sequences are provided in correspondence with the tones. A section having these functions and circuits of the sound sources is hereinafter called second control means.
In the above-described electronic organs and pianos, when a key is pressed or released on the performance interface, such as a keyboard, an instruction to start or finish producing the sound is output to the second control means, and the second control means starts or finishes producing the sound in response to the instruction within the maximum number of sound production sequences according to the tone, key number and intensity of performance.
Also since the above-described electronic musical instruments are provided with the external interface as described above, performance data is input from a sequencer or another MIDI unit and transmitted to the second control means, and the second control means starts or finishes producing the sound in response to an instruction included in the data within the maximum number of sound production sequences according to the tone, key number and intensity of performance.
The total number of output sequences of the data output from the performance interface, such as a keyboard, and the data output through the external interface should be within the maximum number of sound production sequences.
When a key is pressed or released on the keyboard, the production of the corresponding sound is started or finished. If data input through the external interface at the same time indicates the same starting point of sound production at the same tone and the same musical interval, in other words, if double key pressing occurs in the same track, the production of the sound specified through the keyboard is finished according to an instruction from the first control means when it detects the release of the key.
The production of the sound specified by data input through the external interface is finished according to an instruction included data in a gatetime or the like.
If noise occurs in a transmission path connecting the first control means and the second control means, an erroneous instruction caused by the noise may be transmitted, which may result in the inability to find a sound production sequence to be stopped with the result that the sound production sequence to be stopped continues to be produced.
The present invention has been made in view of the foregoing situation. Accordingly, an object of the present invention is to provide an electronic musical sound generator that prevents a sound production sequence to be stopped from continuing to be produced even if the key is released.
To achieve the foregoing object, the present invention provides an electronic musical sound generator including first control means for sending an instruction to start or finish producing a sound; second control means for starting or finishing producing the sound in response to the instruction; data generation means for adding identification data to a tone sequence, a key number, and the intensity of performance of a sound to be produced or stopped; storage means for storing, when a key is pressed to cause sound production to be started, the identification data added by the data generation means for each sound production sequence together with the key number and the intensity of performance; first decision means for comparing the identification data added by the data generation means with the identification data stored in the storage means, for determining a sound production sequence to be stopped, according to a result of comparison, and for sending an instruction to stop the sequence, at least when the key is released among events regarded as triggers to finish the sound production; and second decision means for determining, if a sound production sequence to be stopped cannot be determined as the result of comparison, a sound production sequence to be stopped, according to the sequence being produced and the key number, and for sending an instruction to stop the sequence.
According to the above-described configuration, first, the first decision means compares the identification data added by the data generation means with the identification data stored in the storage means, determines a sound production sequence to be stopped, according to the result of comparison, and sends an instruction to stop the sequence, when the key is released. If a sound production sequence to be stopped cannot be determined as the result of comparison performed by the first decision means, the second decision means determines a sound production sequence to be stopped, according to the sequence being produced and the key number, and sends an instruction to stop the sequence.
Therefore, even if noise occurs in a transmission path connecting the first control means and the second control means with the result that an erroneous instruction caused by the noise is transmitted, the sound production sequence to be stopped is correctly stopped to prevent the sound production sequence to be stopped from being continuously produced although the sound production sequence to be stopped cannot be found.
It is preferred that the storage means be an assignment memory usually provided for each sound production sequence. The storage means, however, is not limited to the assignment memory.
An electronic musical sound generator according to the present invention provides an advantage in that, if an erroneous instruction is transmitted through a transmission path connecting the first control means and the second control means, the sound production sequence to be stopped is correctly stopped to prevent the sound production sequence to be stopped from being continuously produced although the sound production sequence to be stopped cannot be found.
An embodiment of the present invention will be described below with reference to the drawings.
As shown in the figure, in the electronic organ, the electronic musical sound generator includes a first control unit 10 disposed on a host printed circuit board and a plurality of second control units 20 formed on a plurality of sound source printed circuit boards.
The first control unit 10 includes a CPU 11, a program ROM 12, a program RAM 13, an external interface 14, an internal interface 15, a digital signal processor (DSP) 16, a digital-to-analog converter (DAC) 17, and an amplifier and equalizer 18. These components are connected to each other by a bus, and control signals and data are input to and output from the components. The first control unit 10 has a function to instruct the second control unit 20 to start and finish producing a sound by transmitting transmission data in a format described later.
Each second control unit 20 includes a CPU 21, a program ROM 22, a program RAM 23, an internal interface 24, a waveform memory 26, and a sound source (tone generator, TG) 25 for producing a musical sound by reading the waveform data from the waveform memory 26. These components are connected to each other by a bus, and control signals and data are input to and output from the components. The second control unit 20 has a function to start and finish producing the sound in response to the transmission data received from the first control unit 10.
The first control unit 10 and the plurality of second control units 20 are connected to each other, and at least data in the format described later, shown in
The CPU 11 and the CPU 21 control each component of the first control unit 10 and the second control unit 20 according to control programs stored in the program ROM 12 and the program ROM 22, respectively. The CPU 11 and the CPU 21 also execute application programs stored in the program ROM 12 and the program ROM 22, use the program RAM 13 and the program RAM 23 as work areas, if necessary, and use various types of fixed data stored in the program ROM 12 and the program ROM 22 to perform data processing, respectively.
As described above, the program ROM 12 and the program ROM 22 store the control programs for controlling the components of the first control unit 10 and the second control unit 20, and the various types of fixed data used by the CPU 11 and the CPU 21, respectively.
The program RAM 13 and the program RAM 23 store status information of the control unit 10 and the control unit 20, and are used as the work areas by the CPU 11 and the CPU 21, respectively. Various registers and flags used to control the control unit 10 and the control unit 20 are defined in the program RAM 13 and the program RAM 23, respectively. The program RAM 13 and the program RAM 23 are accessed by the CPU 11 and the CPU 21 through the buses, respectively. The program RAM 23 is also used as an assignment memory corresponding to a storage block 27, described later, provided for each sound source printed circuit board (second control unit 20) for each tone sequence.
The external interface 14 is an interface for connecting to a keyboard (no reference numeral in the figure), a foot pedal, and a display panel of the electronic organ. Performance data in response to pressing or releasing the foot pedal or a key on the keyboard, setting information specified by panel operations, and display information data are input to or output from the bus through the external interface 14. SMF data is also exchanged with a sequencer or another external MIDI unit through the external interface 14.
The internal interface 15 and the internal interface 24 connect the bus in the first control unit 10 and the bus in the second control unit 20. Data in the format shown in
The DSP 16 applies any acoustic effect (vibrato or others) specified by the CPU 11 according to panel settings to musical sound data for each tone sequence output from the sound source (TG) 25, described later, of the second control unit 20.
The DSP 16 is connected to the DAC 17, and then, to the amplifier and equalizer 18, and further, to a speaker, which produces sounds, as shown in the figure.
The DAC 17 converts to an analog signal from the musical sound data, to which the DSP 16 has applied the acoustic effect and output in the digital format.
The amplifier and equalizer 18 includes an amplifier part which amplifies the analog acoustic signal and an equalizer part which averages the entire sound quality and clarifies the sound image by enhancing or reducing a sound signal in a particular sound range.
The sound source (TG) 25 in the second control unit 20 reads waveform data from the waveform memory 26 to produce a musical sound. The sound source (TG) 25 outputs the waveform data to the DSP 16. As described above, one or more second control units 20 are prepared for each tone sequence. When the tone sequence corresponding to a specified or selected tone is specified or selected, the sound source printed circuit board corresponding to the tone sequence is specified or selected, and the sound source (TG) 25 on that printed circuit board reads the waveform data from the waveform memory 26 and sends the data to the DSP 16 of the first control unit 10 as instructed by the CPU 21 on the board.
As shown in the figure, the electronic musical sound generator includes the first control unit 10, which sends an instruction to start or finish sound production, and the second control unit 20, which starts or finishes the sound production in response to the instruction. The electronic musical sound generator includes a data generation block 19 for adding identification data to the tone sequence, the key number, and the intensity of performance of a sound to be produced or stopped; the storage block 27, formed of an assignment memory for storing the identification data added by the data generation block 19 tougher with the key number and the intensity of performance for each sound production sequence when a key is pressed to cause sound production to be started; a first decision block 28 for comparing the identification data added by the data generation block 19 with the identification data stored in the storage block 27, determining a sound production sequence to be stopped according to the result of comparison, and for sending an instruction to stop the sequence at least when the key is released among events regarded as triggers to finish the sound production; and a second decision block 29 for determining, if a sound production sequence to be stopped cannot be determined from the result of comparison, a sound production sequence to be stopped, according to the sound production sequence being used to produce the sound and the key number, and for sending an instruction to stop the sequence.
Since the structures of the first control unit 10 and the second control unit 20 have been described above, a description thereof is omitted here. “Key status detection”, “keypress detection”, and “key release detection” shown in the figure are performed by the keyboard described in connection with
The data generation block 19 is formed by causing the CPU 11 to read a corresponding program from the program ROM 12. The data generation block 19 adds identification data to performance data formed of the tone sequence of a sound to be produced or stopped, the key number, and the intensity of performance, the performance data being formed of tone selection information included in a panel operation and performance information related to a key pressing or releasing operation, output from a key scanning circuit (not shown) mounted inside the keyboard.
The storage block 27 is an assignment memory formed in the program RAM 23 provided for each sound source printed circuit board (second control unit 20) in
The first decision block 28 is formed by causing the CPU 21 to read a corresponding program from the program ROM 22. At least when the key is released, the first decision block 28 has a function to compare the identification data added by the data generation block 19 with the identification data stored in the storage block 27, to determine a sound production sequence to be stopped according to the result of comparison, and to send an instruction to stop the sequence.
The second decision block 29 is formed by causing the CPU 21 to read a corresponding program from the program ROM 22. When a sound production sequence to be stopped could not be determined as the result of comparison made by the first decision block 28, the second decision block 29 searches data in the storage block 27, determines a sound production sequence to be stopped, according to the sequence being produced and the key number, and sends an instruction to stop the sequence.
The CPU 21 outputs a sound stop instruction by setting the corresponding sound production flag to zero. A sound production flag is specified for each sequence in the program RAM 23.
In the structure described above, as described above, “key status detection” obtained by “keypress detection” or “key release detection” is output from the first control unit 10 to the second control unit 20 as performance data. In addition, performance data sent from a sequencer or another external MIDI unit is also output from the first control unit 10 to the second control unit 20.
The data generation block 19 adds identification data to the tone sequence, the key number, and the intensity of performance of a sound to be produced or stopped, these data items being made from performance information related to a key pressing or releasing operation, and outputs these data items as performance data to the second control unit 20.
The storage block 27 stores the performance data having the identification data, output and transmitted in the format shown in
In the same way, the storage block 27 also stores performance data sent from a sequencer or another external MIDI unit for the tone sequence specified in the performance data.
When a key is pressed or released on the keyboard, the production of the corresponding sound is started or finished. Data input through the external interface at the same time may indicate the same starting point of sound production at the same tone and the same musical interval, in other words, double key pressing may occur in the same track.
Therefore, at least when the key is released, the first decision block 28 compares the identification data added by the data generation block 19 with the identification data stored in the storage block 27, determines a sound production sequence to be stopped according to the result of comparison, and sends an instruction to stop the sequence. With this, even if double key pressing occurs in the same track, the production of the musical sound can be stopped by releasing the key.
If noise occurs in a transmission path between the internal interface 15 and the internal interface 24 connecting the first control unit 10 and the second control unit 20 with the result that an erroneous instruction caused by the noise is transmitted, the sound production sequence to be stopped may not be found (it may be impossible to compare the identification data) (in that case, the sound production sequence to be stopped continues to be produced).
In such a case, the second decision block 29 searches data in the storage block 27, determines a sound production sequence to be stopped, according to the sequence being produced and the key number, and sends an instruction to stop the sequence.
As shown in the figure, when the switch for the electronic organ is turned on, each component in the first control unit 10, disposed on the host printed circuit board, is initialized, and the key scanning circuit, a pedal scanning circuit, and a panel scanning circuit connected to the first control unit 10 are also initialized (in step S100).
Then, it is determined whether an event has occurred (in step S102). If an event has not occurred (No in step S102), the procedure proceeds to step S106 (time variable process). If an event has occurred (Yes in step S102), the procedure proceeds to an event process (in step S104).
After the event process, the time variable process is executed (in step S106), and then, the procedure returns to step S102.
It is determined whether a key event has occurred in the keyboard (in step S200). If a key event has occurred (Yes in step S200), a key event transmission process is executed (in step S202).
If a key event has not occurred in the keyboard (No in step S200), it is determined whether a panel event has occurred (in step S204). If a panel event has occurred (Yes in step S204), a panel event process is executed (in step S206).
If a panel event has not occurred (No in step S204), it is determined whether a MIDI event has occurred (in step S208). When a MIDI event has occurred (Yes in step S208), a MIDI event process is executed (in step S210).
If a MIDI event has not occurred (No in step S208), a sound source (TG) event process is executed in the second control unit 20 (in step S212).
After the process in step S202, S206, S210, or S212, a MIDI out process is executed (in step S214). In the MIDI out process, an external MIDI unit is used to rewrite the waveform data. Then, the procedure proceeds to the time variable process in step S106.
As shown in the figure, it is determined in this panel event process whether a tone has been specified or changed (in step S300). If a tone has been specified or changed (Yes in step S300), a MIDI program change notice is sent to the second control unit 20 (in step S302).
If a tone has not been specified or changed (No in step S300), it is determined whether a control change has occurred (in step S304). If a control change has occurred (Yes in step S304), a MIDI control change notice is sent to the second control unit 20 (in step S306).
If a control change has not occurred (No in step S304), it is determined whether an automatic mode has been specified (in step S308). If the automatic mode has been specified (Yes in step S308), an automatic mode setting process is executed (in step S310). With this, the registered automatic mode process is executed in the time variable process, described later.
If the automatic mode has not been specified (No in step S308), it is determined whether a registration process, such as a start or stop process for the sequencer or a start or stop process for an automatic accompaniment, has been specified (in step S312). If the registration process has been specified (Yes in step S312), a registration setting process is executed (in step S314).
If the registration process has not been specified (No in step S312), a menu screen is displayed (in step S316).
After any of the processes described above, the procedure proceeds to the MIDI out process in step S214.
The time variable process obtains the elapsed time since the last process and is an interrupt process for the CPU 11 at predetermined intervals.
First, a parameter ΔTi is obtained (in step S400).
Then, it is determined whether the automatic mode has been specified (in step S402). If the automatic mode has not been specified (No in step S402), the procedure jumps to step S406. When the automatic mode has been specified (Yes in step S402), a process for generating an event automatically is executed (in step S404).
Then, it is determined whether registration data for the start or stop process for the sequencer or the start or stop process for an automatic accompaniment is being transmitted (in step S406). If the registration data is not being transmitted (No in step S406), the procedure proceeds to step S410.
If the registration data is being transmitted (Yes in step S406), a process for sending the next block (sequence data) is executed (in step S408).
Then, an expression pedal process detected in an event detection process is executed (in step s410), and a panel scanning process (in step S412) and a key scanning process (in step S414) are executed.
Core data among the stored data is five-byte data shown in
As shown in the figure, when the switch for the electronic organ is turned on, each component in the second control unit 20, disposed on the sound source printed circuit board, is initialized (in step S500), in the same way as in
Then, it is determined whether an event (my event) has occurred in the sequence specified by the track number for each sound source printed circuit board (for each track number shown in
After the event process, the time variable process is executed (in step S506), and then, the procedure returns to step S502.
It is determined whether a key event has occurred in the keyboard (in step S600). When a key event has occurred (Yes in step S600), a note process, described later, related to key pressing or key releasing is executed (in step S602).
If a key event has not occurred in the keyboard (No in step S600), it is determined whether a program change event for switching the tone or effect has occurred (in step S604). If a program change event has occurred (Yes in step S604), a program change process is executed (in step S606).
If a program change event has not occurred (No in step S604), it is determined whether a control change event for adjusting the level of each effect has occurred (in step S608). If a control change event has occurred (Yes in step S608), a control change process is executed (in step S610).
If a control change event has not occurred (No in step S608), a MIDI exclusive process is executed (in step S612).
After the process in step S602, S606, S610, or S612, a completion notice indicating that all processes have been completed in the sound source printed circuit board (sound production sequence) is sent (in step S614). Then, the procedure returns to the time variable process in step S506.
It is determined first whether a key has been pressed (in step S700). If a key has been pressed (Yes in step S700), a key pressing process is executed (in step S702). If a key has not been pressed (No in step S700), a key releasing process is executed (in step S704). Then, the procedure proceeds to the completion notice transmission process in step S614.
Since a key has been pressed, a key map updating process is executed for each track (in step S800). The key map updating process updates the preceding key map stored in the storage block 27 according to the result of comparing generated data related to the new key pressing with deleted data related to key releasing. The key map will be described later with reference to
When a new sound production sequence is required due to the key map updating, a key assignment process (for determining a sound production sequence to produce a new sound and for sending data to the assignment memory) is executed (in step S802). Then, a sound production process is executed (in step S804). In the sound production process, the CPU 21 reads data for each sound production sequence, as shown in
In the key releasing process, data (key map) stored in the storage block 27 is referenced (in step S900), and the first decision block 28 compares the identification data (data (3) in
If the same identification data has been stored (Yes in step S902), the key corresponding to the identification data is regarded as the key released (in step S904), the sound production sequence to be stopped is determined, and then the sound production is stopped. Therefore, even if data input through the external interface at the same time indicates the same starting point of sound production at the same tone and the same musical interval, in other words, if double key pressing occurs in the same track, the production of the musical sound can be stopped due to the release of the key.
If noise occurs in a transmission path between the internal interface 15 and the internal interface 24, connecting the first control unit 10 and the second control unit 20 with the result that an erroneous instruction caused by the noise is transmitted to prevent the identification data from being compared (No in step S902), in other words, if a sound production sequence to be stopped cannot be found, the second decision block 29 searches the data in the storage block 27, regards a key having identification data different from the one sent as the released key, according to the sequence being produced and the key number (in step S906), determines a sound production sequence to be stopped, and then stops the sound production. Therefore, even if the sound production sequence, which should be stopped, continues to be produced since the sound production sequence to be stopped cannot be found because of transmission of an erroneous instruction, the production of the musical sound can be stopped due to the release of the key because the second decision block 29 searches the data in the storage block 27 and determines the sound production sequence to be stopped, according to the sequence being produced and the key number.
As shown at an upper part of
Assuming that the key 00 is specified as the key number in data having the format shown in
At the start address of the buffer, the address of the area to be read next in the buffer is written in the first byte. In the next byte, the address of the area read precedingly in the buffer is written. As shown at the lower part of
In the electronic organ having the electronic musical sound generator according to the present embodiment, described above in detail, the stored data (key map) in the storage block 27 is referenced; the first decision block 28 compares the identification data (data (3) in
Even if noise occurs in a transmission path between the internal interface 15 and the internal interface 24, connecting the first control unit 10 and the second control unit 20, with the result that an erroneous instruction caused by the noise is transmitted to prevent the identification data from being compared, in other words, even if the sound production sequence to be stopped cannot be found, the second decision block 29 searches the data in the storage block 27, and regards a key having identification data different from the one sent as the released key, according to the sequence being produced and the key number. Then, the sound production sequence to be stopped is determined, and the sound production is stopped. Therefore, even if an erroneous instruction is sent and the sound production sequence to be stopped cannot be found with the result that the sound production sequence which should be stopped continues being produced, the production of the musical sound can be stopped due to the release of the key because the second decision block 29 searches the data in the storage block 27 and determines the sound production sequence to be stopped, according to the data of the sequence being produced and the key number.
An electronic musical sound generator according to the present invention is not limited to the above-described embodiment shown in the figures. Various modifications can be made within the scope of the present invention.
An electronic musical sound generator according to the present invention can be applied to electronic musical instruments, and in addition, to sound source boards used for personal computers and games.
The entire disclosure of Japanese Patent Application No. 2008-056168, filed on Mar. 6, 2008, including the specification, claims, drawings and summary, is incorporated herein by reference in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2008-056168 | Mar 2008 | JP | national |