Musical keyboard
DESCRIPTION OF THE INVENTION 
     2. Technical Field 
     The present invention relates, in general, to the electronic production of music and, in particular, to a musical keyboard having inductance coil sensors which sense the positions of the keys and transmit signals representative of key position, velocity and pressure. 
     2. Background Art 
     The prior art includes many electronic musical instruments which are played by striking keys. These instruments are arranged to simulate conventional keyed instruments, such as pianos and organs, or to create musical sounds which cannot be produced by conventional keyed instruments. 
     With the advent of microprocessors, many musical effects, not otherwise producible by conventional musical instruments, can be created by electronic musical instruments. For example, a key of an electronic musical instrument can be manipulated in more ways to produce a greater variety of effects than a key of a conventional piano or organ. Also, it is possible to simulate instruments, such as violins and cellos, with a keyed electronic musical instrument. 
     Among the factors which contribute to the overall musical effect produced by a keyed electronic musical instrument are the touch of the musician, the velocity and force with which the keys are struck, the duration that the keys are depressed, and the after-touch or key pressure. Consequently, the components which sense the way in which the keys are manipulated and the circuitry which processes the signals developed by the sensor components are all-important in the design of such instruments. 
     Generally, electronic musical instruments having keyboards use mechanical switches or other contacting devices to sense the striking of the keys. In its simplest form, the depression of a key is sensed by the opening or closing of the sensor. More sophisticated versions of such instruments are able to sense the velocity at which the keys are struck and the after-touch or key pressure. 
     Mechanical sensing of key manipulation has a number of shortcomings. The musician can feel the connection and disconnection of mechanical sensors as the keys are being struck and this can be bothersome. Such an effect is not produced when the keys of a conventional piano or organ are struck. 
     As a practical matter, mechanical sensors also limit the versatility and flexibility of electronic musical instruments, particularly if cost of manufacture is a consideration. The mechanical components and the processing circuitry tends to be complex and, therefore, expensive as more of the features contributing to the desired musical effect are incorporated into the instrument. 
     Mechanical sensing also suffers from the inherent shortcoming of wear and tear. The making and breaking of contacts eventually leads to the need to repair the instruments and to replace parts. 
     DISCLOSURE OF THE INVENTION 
     Accordingly, it is an objective of the present invention to provide a new and improved electronic musical keyboard. 
     It is another objective of the present invention to provide an electronic musical keyboard which permits the musician to achieve a wide variety of musical effects. 
     It is a further objective of the present invention to provide an electronic musical keyboard which uses non-contacting inductance coil sensors and, therefore, is not subject to the wear and tear of mechanical sensors. 
     It is yet another objective of the present invention to provide an electronic musical keyboard which is reliable in operation, relatively simple in construction, and relatively inexpensive to fabricate. 
     These and other objectives are achieved, in accordance with the present invention, by a musical keyboard having a plurality of movable keys positioned side-by-side and an inductance coil sensor system for sensing the position of each of the keys. The inductance coil sensor system has a plurality of sensor tank circuits. Each sensor tank circuit has a sensor inductance coil associated with one of the keys and positioned in the path of movement of its associated key. Each key carries a metal spoiler which moves toward and away from its associated sensor inductance coil to change the resonance frequency of its associated sensor tank circuit, the amplitude of the resonance peak of its associated sensor tank circuit, and the phase about the resonance peak of the associated sensor tank circuit. 
     The musical keyboard of the present invention further includes first circuit means responsive to a selected one of the changing characteristics of the sensor tank circuits for developing indications of the positions of the keys. Means are included for supplying to the first circuit means a reference signal in a domain corresponding to the selected changing characteristic from which the position indications are developed. The reference signal represents a predetermined value against which the position indications are referenced. Also included in the present invention are second circuit means for sequentially connecting the reference tank circuit and the sensor tank circuits to the first circuit means. 
     In a preferred embodiment of the present invention, a single capacitor is switched sequentially between the inductance coil in the reference tank circuit and the sensor inductance coils of the sensor tank circuits. In this way, a single capacitor serves the purpose of a plurality of capacitors and there is no need to provide a plurality of matched capacitors. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Referring to the drawings: 
     FIG. 1 is a schematic diagram of a musical key assembly which can be used in the present invention; 
     FIG. 1A is a plan view, on an enlarged scale, of a sensor inductance coil which can be used in the present invention; 
     FIG. 2 is a circuit diagram of a preferred embodiment of a musical keyboard constructed in accordance with the present invention; and 
     FIG. 3 is a series of waveform diagrams useful in understanding the operation of the FIG. 2 circuit. 
    
    
     BEST MODE OF CARYING OUT THE INVENTION 
     Referring to FIG. 1, a musical key assembly which can be used in the present invention has a key 10 which is mounted to pivot about an axis 12. As key 10 is depressed and moves in the direction of arrow 14, the key moves against a restoring spring 16 which returns the key to its rest position when the force moving the key is removed. A suitable damping component, which is not shown, would be included in the key assembly to prevent key 10 from oscillating under the influence of restoring spring 16 after the force depressing the key is removed. 
     The key assembly also includes a sensor inductance coil 18 positioned in the path of pivotal movement of key 10. Sensor inductance coil 18 can be formed in a number of ways and can have various configurations. A preferred way of forming sensor inductance coil 18 is by conventional printed circuit techniques and FIG. 1A shows a preferred planar winding configuration of the sensor inductance coil mounted on an insulating board 20. 
     The key assembly further includes a metal spoiler 22 mounted on the underside of key 10 and movable with the key toward and away from sensor inductance coil 18 to vary the inductance of the sensor inductance coil in accordance with the position of the key relative to the sensor inductance coil. Metal spoiler 22 can be a coil, similar to sensor inductance coil 18, or a solid, planar part. 
     A musical keyboard, constructed in accordance with the present invention, includes a plurality of key assemblies, such as the one shown in FIGS. 1 and 1A, positioned side-by-side. This is represented in FIG. 2 by a plurality of sensor inductance coils 32 and a plurality of metal spoilers 34. Only four key assemblies are represented in FIG. 2. However, a large number, such as sixteen or forty-eight, would be included in a commercial version of the present invention. 
     Also included in the circuit of FIG. 2 are a reference inductance coil 36 and a capacitor 38 which form a reference tank circuit. Sensor inductance coils 32 and capacitor 38 form a plurality of sensor tank circuits. The position of each spoiler 34, relative to its associated sensor inductance coil 32, determined the resonance frequency of its associated sensor tank circuit, the amplitude of the resonance peak of its associated sensor tank circuit, and the phase about the resonance peak of the associated sensor tank circuit. The reference tank circuit supplies a reference signal representative of a predetermined value of a selected parameter such as a predetermined nominal position of spoilers 34. For the embodiment of the invention being described, the resonance frequency of each sensor tank circuit is the selected changing characteristic which is measured to indicate the positions of the keys. By using a tank circuit to supply the reference signal, the domain of the reference signal may be selected to correspond to the domain of the selected changing characteristic of the sensor tank circuits. Accordingly, the reference tank circuit supplies a reference signal having a resonance frequency dependent upon the value of capacitor 38 and the value of reference inductance coil 36 as established by the position of a reference spoiler 39. 
     The reference tank circuit and the sensor tank circuits are formed by sequentially connecting reference inductance coil 36 and sensor inductance coils 32 across capacitor 38. This is accomplished by switching means which include a plurality of transistors 40, one connected in series with each sensor inductance coil 32; a plurality resistors 42, one associated with each transistor 40; a transistor 44 connected in series with reference inductance coil 36; a resistor 46 associated with transistor 44; and a computer 48. 
     Computer 48 controls the on/off operation of transistor 44 and transistors 40 to sequentially connect the reference tank circuit and the sensor tank circuits to frequency sensing means composed of a pulse generator 50 and a counter 52. In particular, reference inductance coil 36 and sensor inductance coils 32 are switched sequentially to the input of pulse generator 50 according to the sequential activation of transistor 44 and transistors 40 by computer 48. Capacitor 38 is permanently connected to the input of pulse generator 50. 
     The resonance frequency of the reference tank circuit is set by adjusting the position of reference spoiler 39 relative to the position of reference inductance coil 36. The positions of metal spoilers 34, relative to the positions of their associated sensor inductance coils 32, establish the resonance frequencies of the sensor tank circuits. Waveform (A) of FIG. 3 represents the resonance frequency of the reference tank circuit. Waveforms (B), (C) and (D) of FIG. 3 represent the resonance frequencies of three sensor tank circuits. The first series of oscillations of waveforms (B) and (C), having the same frequency, indicate that the associated keys have been depressed to the same degree, while the first series of oscillations of waveform (D), having a higher frequency, indicates a different degree of depression of the associated key. The second series of oscillations of waveforms (B), (C) and (D) indicate that the associated keys have moved during the time period between the first series of oscillations and the second series of oscillations of each waveform. 
     At any particular time, the reference tank circuit or one of the sensor tank circuits is connected to the input of pulse generator 50. The repetition rate of the output of pulse generator 50 corresponds to the resonant frequency of the particular tank circuit connected to the pulse generator at that time. Waveform (E) of FIG. 3 represents the output of pulse generator 50 and shows groups of pulses having repetition rates corresponding to the resonance frequency of the particular tank circuit connected to the input of the pulse generator. During those periods when reference inductance coil 36 is connected to pulse generator 50, the repetition rate of the output of the pulse generator corresponds to the resonance frequency of the reference tank circuit. During those periods when one of the sensor inductance coils is connected to pulse generator 50, the repetition rate of the output of the pulse generator corresponds to the resonance frequency of the particular sensor tank circuit connected to the pulse generator. 
     The output of pulse generator 50 is supplied to counter 52 which counts the number of pulses which it receives during known periods of time. Computer 48 turns pulse generator 50 on and off to establish the known periods of time during which counter 52 counts pulses supplied by the pulse generator. The pulse count during any such known period of time is dependent upon the rate at which the pulses are supplied from pulse generator 50 which, in turn, is dependent upon the resonance frequency of the particular tank circuit connected to the pulse generator. Thus, the pulse count developed by counter 52 represents the position of the key associated with the tank circuit which produced the pulses. The numbers beneath waveform (E) of FIG. 3 represent the number of positive-going and negative-going pulses counted during the indicated time periods. By referencing the pulse counts produced by the sensor tank circuits against the pulse count produced by the reference tank circuit, the pulse counts produced by the sensor tank circuits provide accurate indications of the positions of spoilers 34 relative to their associated sensor inductance coils 32 and, therefore, the movements of the associated keys. 
     Counter 52 is reset by computer 48 at the end of each time period during which pulses are counted. It should be understood that in actual operation of the FIG. 2 circuit, there are very brief periods of time between the groups of pulses produced by pulse generator 50 to permit resetting of counter 52 after each fixed period during which pulses are counted. As a result, wave form (E) actually would have brief time periods between the groups of pulses during which no pulses are present. 
     Computer 48, in response to the count developed by counter 52, controls a musical sound production system according to which keys have been depressed and the manner in which the keys have been depressed. The musical sound production system is not a part of the present invention. 
     Referring now to Pseudo Code Listing 1, there is shown an overview of the computer-implemented process of the present invention. General-purpose computer 48, which is connected to the plurality of tank circuits as previously described, and is connected to a serial data port 54 capable of transmitting signals conforming to the Musical Instrument Digital Interface (MIDI) specification, performs the depicted steps repetitively to provide a substantially continuous data flow to serial port 54. MIDI Specification 1.0, published by the International MIDI Association is incorporated herein by reference. The functions of the computer-implemented process include the sequential addressing of each of the tank circuits associated with keys 10 on the keyboard, enablement of the counter circuit 52 to determine the position of each key 10, storage of the key position, comparison of the newly determined key position with the last stored key position available, formatting of a serial data stream indicative of key position and other information (in MIDI format), and transmission of the digital serial data to remote devices such as sequencers, recorders, and musical synthesizers (not shown). 
     Because aftertouch and velocity are two subtle factors in the tonal characteristics of keyboard instruments, the keyboard of the present invention provides a mechanism for determination of this information. Specifically, key positions are sampled rapidly (for example, at a rate of 10,000 keys/second) and key positions are stored in a &#34;key state record&#34; for comparison with subsequent position information. By comparison of two positions separated by the known length of time (at a minimum, that required to scan all other keys on the keyboard,) key velocity (speed and direction) can be determined. Similarly, by establishing an arbitrary &#34;fully depressed&#34; position, any degree of aftertouch sensitivity can be permitted. In normal operation, the fully depressed position will correspond to the point at which the key travel is physically limited (by, for example, an elastomeric stop (not shown)). Compression of the stop will permit limited key travel past this point and be encoded as aftertouch. 
     Referring to Listing 1, there is shown a PseudoCode representation of the process steps performed by computer 48 of the present invention. Initialization processing includes resetting of the system hardware, such as input/output ports, counters, and enablement of system interrupts. Further initialization sets up threshold values for the &#34;key up&#34; position, the &#34;key down&#34; position, and the &#34;pressure point&#34;, beyond which aftertouch will be endoded. Data structures such as the MIDI Queue, and the LastTime array are initialized with zero values and base positions. Before beginning to scan the key array, the oscillator tank circuits are &#34;quenched&#34; to reset them, and the counters are reset to zero. 
     Finally, the period used to count pulses from the sensor oscillator tank circuits is normalized with respect to the reference oscillator tank circuit. A timer is used to determine the period required for the reference oscillator tank circuit to produce a predetermined number of pulses. This period is then used for the subsequent scan of the key array. The period is renormalized after each scan, thereby allowing a close approximation of the best resolution of the system: ##EQU1## Where: N is the desired count 
     f ref  is the frequency of the reference oscillator tank circuit 
     Period is the time used to measure the pulses produced by a given key sensor oscillator tank circuit 
     The scan of the key array comprising the keyboard is dependent on an index which assumes the value of each ordinal key location in the array. For each key, the associated tank circuit is enabled, and counter 52 allowed to accumulate pulses for a known time period. After this time, the total counts are read and scaled to a non-linear key position range. This position is then saved for further processing. 
     Based upon the current position of the key being addressed and its position on the last scan of the keyboard, there are several possible events which can occur. These events may be summarized as a list of possible key state transitions: 
     
         ______________________________________                                    
Last         New        MIDI Event*                                       
______________________________________                                    
InActive     InActive   None                                              
InActive     Active     NoteOn (Velocity)                                 
Active       Active     None (AfterTouch)                                 
Active       InActive   NoteOff (Velocity)                                
______________________________________                                    
 *Note:                                                                   
 MIDI Events are fully described in the MIDI Specification 1.0            
 (International MIDI Association, 1983) which is incorporated herein by   
 reference.                                                               
 
    
     Of course, various indications (e.g. absolute position, velocity, pressure) may be derived from the keyboard of the present invention and these may be applied to parameters beyond those specified by the MIDI standard as well as the MIDI messages detailed in The MIDI Specification. 
     Because of timing constraints and differences in data rates between keyboard scanning operations and transmission of MIDI data over the serial port, MIDI messages are enqueued to a preallocated MIDI queue, and are transmitted on an interrupt-driven basis. 
     Finally, the index is incremented (with tests for out-of-range conditions) and the next key is processed. 
     The foregoing has set forth an exemplary and preferred embodiment of the present invention. It will be understood, however, that various alternatives will occur to those of ordinary skill in the art without departure from the spirit and scope of the present invention. ##SPC1##