ELECTRONIC MUSICAL INSTRUMENT USED IN CONNECTION WITH COMPUTER
Technical Field The present invention relates to electronic musical instrument, and more particularly, to electronic musical instrument used in connection with a computer, in which a key input portion which is used to input musical sounds, is connected to a parallel port of the computer.
Background Art
In general, conventional electronic musical instruments, for example, an electronic keyboard, generates sounds by using a central processing unit (CPU) installed in the instrument itself. Thus, the musical instrument occupies a large amount of space and is costly. Also, because the CPU cannot be upgraded, the kinds of sounds that can be generated thereby are limited.
Disclosure of the Invention
To solve the problem, it is an object of the present invention to provide an electronic musical instrument used in connection with a computer, in which instrumental sounds are generated by connecting a key input portion which is used to input instrumental sounds, to a parallel port of the computer.
To achieve the object, there is provided an electronic musical instrument used in connection with a computer, comprising: a key input portion for inputting rxc keys relating to generation or adjustment of musical sounds; a speaker for outputting sound corresponding to the key input by the key input portion, to the outside; a circuit portion for selectively outputting keys input by the key input portion; and a computer for storing data of the instrumental sound corresponding each of rxc keys, continuously outputting test values corresponding to the data of the instrumental sound through the output terminal of a parallel port to the circuit portion, to check which key is
depressed by a user, converting data of the instrument sound which corresponds to the depressed key, into an analog signal through a sound card, and outputting the analog signal to the speaker.
Brief Description of the Drawings
FIG. 1 is a block diagram of an electronic musical instrument used in connection with a computer according to a preferred embodiment of the present invention;
FIG. 2 is a detailed diagram showing the structure of the circuit portion of FIG. 1;
FIG. 3 is a detailed circuit diagram of the 32x10 switch array shown in FIG. 2;
FIG. 4A is a detailed circuit diagram of an example of the column of switches indicated by dashed lines in FIG. 3; FIG. 4B is a detailed circuit diagram of another example of the column of switch indicated by dashed lines in FIG. 3;
FIG. 5 is a detailed circuit diagram of the portion indicated by the circled portion in FIG. 4A; and
FIG. 6 is a flowchart illustrating a key checking program stored in the program storing portion of FIG. 1.
Best mode for carrying out the Invention
Referring to FIG. 1, an electronic musical instrument used in connection with a computer according to a preferred embodiment of the present invention, comprises a key input portion 10, a circuit portion 20, a computer 40 and a speaker 50. The circuit portion 20 and the computer 40 are connected by a parallel port 30. The parallel port 30 has an output terminal Pout from the computer 40 and an input terminal Pin to the computer 40. The parallel port 30 is generally attached to the case of the computer 40.
The key input portion 10 allows a user to input rxc keys which generate instrumental sounds. The key input portion 10 may have a similar
shape to other musical instrument. However, the shape of the key input portion 10 can be varied. The circuit portion 20 selects keys input by the key input portion 10 and outputs signals corresponding to the selected keys to the input terminal Pin of the parallel port 30. The speaker 50 outputs instrumental sounds corresponding to the input keys.
The computer 40 stores data of instrumental sounds corresponding to each of rxc keys in a program storing portion 48 and continuously outputs test values corresponding to data of instrumental sounds through the output terminal Pout of the parallel port 30 to the circuit portion 20, to check which key is depressed by a user. Here, the program stored in the program storing portion 38 can manage sound data by itself and generate sounds using a sound chip provided by a sound card 42. Also, data of instrumental sounds corresponding to the key depressed by the user, which has been identified by the computer 40, is input through the input terminal Pin of the parallel port 30 and then an interface (l/F) 44 to a central processing unit (CPU) 46. When the CPU 46 reads the corresponding data of instrumental sound using the program stored in the program storing portion 48 and sends the data to a sound card 43, the sound card 42 converts the input signal into an analog signal and outputs the analog signal to the speaker 50. Alternatively, the sound can be generated using a musical instrument digital interface (MIDI) output function provided by the sound card 42. In this case, the CPU 46 sends MIDI message about the kind of instrument, pitch and volume to the sound card through MIDI and sounds of the corresponding instrument are generated by the sound card 42. Here, the test value refers to address of switch array which is output to the circuit portion 20 in order to check which key of the key input portion 10 is depressed by the user, and is programed with respect to all instrumental sounds corresponding to each row and column.
The key checking program will be described in detail with reference to FIG. 6. First, V is set to zero (step 602) and "c" is set to zero (step 604). The "r" and "c" values are output through the output port Pout of the parallel port 30 to the circuit portion 20. The value set by the circuit portion 20 is
read through the input pin Pin (step 608). Then, a determination as to whether a (r, c) key is depressed, is made using the read value (step 610). If a (r, c) key is depressed, the sound card 42 generates a sound corresponding to the (r, c) key and outputs the sound to the speaker 50 (step 612).
In step 614, It is determined whether a user has stopped using the program. If the user has not terminated use of the program, step 616 sets "c" to c+1. In step 618, it is determined that "c" is less than 10, the process moves to the step 606. These steps are repeated until "c" reaches 10. If "c" is equal to 10, "r" is set to r+1 (step 620). Then, a determination of whether V is less than 32, is made (step 622). If "r" is less than 32, the process moves to the step 604. These steps are repeated until "r" equals 32.
That is, a determination as to whether a key is depressed or not, is made on all keys corresponding to cells from (0, 0) to (31, 9). In this embodiment, a key input portion having 32x10 keys is illustrated. However, the present invention is not limited to such a key input portion. Theoretically, the maximum multiplexer capable of being implemented with 8 bits is 255x1. The above described key checking program is stored in a memory of a computer system, so that it can be upgraded.
FIG. 2 is a detailed diagram of the structure of the circuit portion 20 shown in FIG. 1. In FIG. 2, assuming that the computer 40 outputs a 12-bit test value through the output terminal Pout of the parallel port 30 in order to check whether a (i, j) key of the key input portion 10 is depressed. A binary- coded decoder 202 converts 4 bits of a 12-bit test value, which are used to check whether jth column is depressed, into a decimal data value, and outputs a low voltage, for example, 0V, with respect to the jth column, and a high voltage, for example, 5V, with respect to the remaining columns, to a 32x10 switch array 204. A 32x1 multiplexer (MUX) 206 receives 8 bits of the 12-bit test value output from the computer 40, selects the ith row signal of the jth column signal, and outputs the selected signal to the input terminal Pin of the
parallel port 30. That is, the 32χ1 MUX 206 outputs a low voltage in the case where a (i, j) key of the key input portion 10 is depressed, and a high voltage in the case where the (i, j) key is not depressed, to the input port Pin of the parallel port 30. Because the computer 40 stores the number of bits of the test value with respect to each row at the initial state, when an input value to the input terminal Pin, among the values with respect to each switch of the corresponding column, is given, it can be noticed whether the corresponding key is depressed or not. Also, because data of instrumental sound are stored corresponding to the number of bits of the test value, a sound corresponding to the depressed key can be generated.
When a (i, j) key is input by the key input portion 10, the 32χ10 switch array 204 transfers the low voltage with respect to the jth column, output from the binary-coded decimal decoder 202, to the 32x1 MUX 206. If a key is not depressed, a high voltage with respect to the remaining columns or a high voltage with respect to the ith row is transferred to the 32x1 MUX 206. Here, if none of the keys is depressed, a high voltage Vcc is transferred through a resistor to the 32x1 MUX 206.
Thus, because the computer 40 continuously checks which key is depressed, through the output terminal Pout of the parallel port 30, a key depressed by the user can be identified. A volume adjusting pedal 210 adjusts the volume of the instrumental sound by working the pedal. That is, when the user steps on a pedal deeply, the volume is higher, while when the user steps on the pedal slightly, the volume is lower. A variable resistor 212 outputs the resistance which varies according to the depth of pedaling of the volume adjusting pedal 210 to an analog-to-digital converter (ADC) 208. The ADC 208 converts the analog voltage from the variable resistor 212 to a digital value and inputs a digital value to the input terminal Pin of the parallel port 30.
A sustain pedal switch 212 is connected between the power voltage Vcc and ground, and inputs a value for adjusting echoing or no-echoing according to the use of a sustain pedal to the input terminal Pin of the parallel port 30. The function of the sustain pedal switch 214 can be varied
in a program by a user.
When a 5-bit input terminal Pin of the parallel port 30 is used, preferably, the signal selected by the 32χ1 MUX 206, the sustain pedal signal, is 1 bit and the signal output from the ADC 208 is 3 bits. However, these values are merely illustrative and the number of bits can be varied. FIG. 3 is a detailed circuit diagram of the 32x10 switch array 204 shown in FIG. 2. As shown in FIG. 3, the number of switches in the switch array 204 totals 320, and each switch is connected one-to-one to each diode shown in FIGs. 4A and 4B. FIG. 4A is a detailed circuit diagram of the column of switches indicated by a dashed line in FIG. 3. For convenience, FIG. 4A illustrates only one column and thus only 32 diodes are shown in FIG. 4A. Thus, the total number of diodes with respect to 10 columns is 320. Also, one end of each of the 32 diodes shown in FIG. 4A is connected to the binary-coded decimal decoder 202 and the other end thereof is connected to each switch. Thus, the corresponding diode is connected through a resistor to Vcc only when a user depresses a switch. Alternatively, the column of switches can be implemented as shown in FIG. 4B. That is, among 32 diodes arranged in a columnar (longitudinal) direction, neighboring two diodes are connected, so that the number of diodes connected to one end of the binary-coded decimal decoder 202 is reduced to 16. In detail, as shown in FIG. 4B, neighboring two diodes in a column direction and neighboring two switches in a row direction are integrated, respectively. That is, for example, diodes 0 and 1 are integrated to be diode 0, diodes 2 and 3 are integrated to be diode 1 , and diodes 30 and 31 are integrated to be diode 15. Each integrated switch is located at portions indicated by the solid line when a user does not depress any key of the key input portion 10 (for example, a piano keyboard) connected to the switches. In this case, the even rows (switches), for example, 0th, 2th, ... 30th rows, are connected to the diodes. Meanwhile, when a user depresses a key of the key input portion 10, each integrated switch is located at portions indicated by dashed lines. That is, the odd rows, for example, 1st, 3rd, 5th, ... 31th rows, are connected to the diodes. Thus, when a user
quickly depresses a keyboard, the switches are shifted from the positions indicated by solid lines to the positions indicted by dashed lines within a short time. Meanwhile, when a user depresses a key of the keyboard slowly, such shifting of the switches occurs slowly. Also, the volume can be adjusted by measuring the shifting time using the program stored in the program storing portion.
FIG. 5 is a detailed circuit diagram of the circled portion in FIG. 4A.
In FIG. 5, Sij indicates a (i, j) switch. When Sij is depressed, a low voltage of the jth row input from the binary-coded decimal decoder 202 is transferred to the 32 x 1 MUX 206. The 32 x 1 MUX 206 selects a low voltage of the Sij according to a row select signal (Sr), and the transferred low voltage, which is indicated by Sk in FIG. 3, to the input terminal Pin of the parallel port 30.
While this invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. In the present invention, the sustain pedal portion and the volume adjustment pedal portion are implemented in the circuit portion. However, these portions can be implemented as keys of the key input portion if desired. Also, the key input portion can provide a function of recording and reproducing a musical performance, a function of adjusting volume and a function of serving accompaniment, other than the function of adjusting the pitch or of selecting types of musical instrument, according to the function of the program storing portion. That is, the key input portion can be implemented to provide various functions according to how the function of each key is programed.
Industrial Applicability
According to the present invention, the key input portion used to input instrumental sound is connected to the parallel port of a computer, to generate instrumental sound, thereby providing the following effects.
First, the electronic musical instrument according to the present
invention generates sound using a sound card installed in the computer whereas a conventional electric keyboard generates sound using a sound generating circuit installed therein, so that musical instrument can be implemented at low cost by using the popularized computer. Second, the program capable of analyzing depression of keys and of generating sound can be upgraded easily, so that the function of program can be diversified and the user can choose the program he likes.
Third, because the keyboard including the key input portion and the circuit portion can be detached from the parallel port when there is no need to use the musical instrument, so that the space occupied by the instrument can be reduced compared to a conventional electronic keyboard.
Fourth, it is convenient to carry the electronic musical instrument, because it can be used in connection with a notebook or laptop computer.