CA1098740A - Device for detecting a key switch operation - Google Patents
Device for detecting a key switch operationInfo
- Publication number
- CA1098740A CA1098740A CA358,207A CA358207A CA1098740A CA 1098740 A CA1098740 A CA 1098740A CA 358207 A CA358207 A CA 358207A CA 1098740 A CA1098740 A CA 1098740A
- Authority
- CA
- Canada
- Prior art keywords
- block
- signal
- note
- circuit
- key
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired
Links
- 230000015654 memory Effects 0.000 claims abstract description 91
- 239000011159 matrix material Substances 0.000 claims abstract description 17
- 238000001514 detection method Methods 0.000 claims description 108
- 239000004020 conductor Substances 0.000 claims description 69
- 238000000605 extraction Methods 0.000 claims description 28
- 238000002360 preparation method Methods 0.000 claims 2
- 210000000352 storage cell Anatomy 0.000 claims 2
- 239000000284 extract Substances 0.000 claims 1
- 238000010276 construction Methods 0.000 abstract description 10
- 238000007599 discharging Methods 0.000 abstract description 5
- 230000000875 corresponding effect Effects 0.000 description 41
- 238000010586 diagram Methods 0.000 description 10
- 238000004519 manufacturing process Methods 0.000 description 8
- 239000002699 waste material Substances 0.000 description 7
- 230000004044 response Effects 0.000 description 5
- 230000002401 inhibitory effect Effects 0.000 description 4
- 230000009467 reduction Effects 0.000 description 4
- 238000006722 reduction reaction Methods 0.000 description 4
- 230000003252 repetitive effect Effects 0.000 description 3
- 230000000994 depressogenic effect Effects 0.000 description 2
- 238000003708 edge detection Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000008054 signal transmission Effects 0.000 description 2
- 101100449397 Rattus norvegicus Gpr6 gene Proteins 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 125000003438 dodecyl group Chemical group [H]C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])* 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 231100000989 no adverse effect Toxicity 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
Abstract of the Disclosure A device for detecting a key switch operation capable of detecting an operating state of a plurality of key switches which are commonly connected with respect to each row line (block line) at one terminal thereof and commonly connected with respect to each column line at the other terminal thereof, thereby constituting a switch matrix. If a signal is provided on all column lines, the signal is transmitted to a block line through a key switch which is in operation and thereby a block including the key switch in operation is detected. A
signal is then supplied from the detected block line to a column line only through the key switch in operation in the detected block. The position of the key switch in operation is known by detecting the column line on which the signal arrives.
According to an embodiment of the invention, capacitance elements are provided both on the block lines and on the column lines for effecting delivery of the signal by charging and discharging of these capacitance elements. There is also disclosed a construction in which detected blocks are once stored in a memory and positions of key switches in operation in the detected blocks are detected and stored block by block. The stored blocks and key switch positions are codified to produce key codes identifying the key switches in operation.
signal is then supplied from the detected block line to a column line only through the key switch in operation in the detected block. The position of the key switch in operation is known by detecting the column line on which the signal arrives.
According to an embodiment of the invention, capacitance elements are provided both on the block lines and on the column lines for effecting delivery of the signal by charging and discharging of these capacitance elements. There is also disclosed a construction in which detected blocks are once stored in a memory and positions of key switches in operation in the detected blocks are detected and stored block by block. The stored blocks and key switch positions are codified to produce key codes identifying the key switches in operation.
Description
Background of the Invention This invention relates to a key switch operation detection device capable of efficiently detecting operations of a number of key switches.
Various proposals have been made for detecting an operating state (making or breaking) of one or more key switches provided in a device such as a keyboard of an electronic musical instrument which has a large number of key switches.
There is a conventional device in which conductors are individually connected to respective key switches and outputs delivered on these conductors are individually detected. This device requires a complicated wiring and therefore is uneconomical. Besides, this device requires a large number of connection terminals for connecting such wiring to a c;rcuit utilizing the result of detection of the key switch states so that it is unsuited for a circuit design employing a semiconductor integrated circuit in which the number of connection pins available for use is limited.
There is another proposal according to which key switches are arranged in a matrix circuit so that each of these key switches will be identified by a column line (input line) and a row line (output line) on which the key switch is disposed and an operating state of each key switch is detected by sequentially scanning all of the key switches.
Such proposal is disclosed in the issued U. S. Patent No. 3,882,751. The proposed device is advantageous in that the number of conductors to be connected between the outside circuit and the key switches can be saved. This devicè, however, cb/ - 2 -~G9~7~0 has a problem that an undesirable time delay sometimes occurs between the actual making or breaking of the key switches and detection thereof because all of the key switches must be scanned one by one. Further, time required for detecting the states of all of the key switches is fixed depending upon the scanning speed so that if there are only a few key switches in operation among a large number of key switches, a substantial waste of time occurs due to the fixed time for detection. To reduce such waste of time, the rate of the clock used in the system must be increased with result-ing adverse effects on the system such as increase in the power consumption.
With a view to improving the disadvantages in the above described proposal, the applicant has proposed novel key switch detection systems in its issued U. S. Patents Nos. 3,899,951 and 4,033,221, issued August 19, 1975 and July 5, 1977, respectively. These systems basically depend upon scanning of a key switch matrix circuit to detect the operating or nonoperating state of the key switches and the improvement resides in providing a device for reducing the scanning time by scanning only necessary sections from among all the key switches. Such improvement has succeeded onlx in reduction of the scanning time, but yet the unavoid-able waste of time inherent in the scanning systems has remained unsettled. Even if the scanning SectiDn is limited only to necessary section~s) in the above scanning systems, the probability that the switches in a nonoperating state are included in the scanning section(s) is fairly high.
Accordingly, such nonoperating key switches must be equally scanned and waste of time still occurs.
cb/
~(~3~740 Furthermore, if a low rate clock is desirable in a circuit utilizing the result of detection of the key switches for reasonq of simplification of the circuit design, reduc-tion of power consumption and reduction of manufacturing costs, the above described waste of time accompanying the scanning system must be eliminated. The prior art scanning system apparently has limitations in eliminating such waste of time.
Summar of the invention y It is, therefore, an object of the invention to reduce time required for detecting the operation of the key switches to a maximum possible extent.
The invention relates to a device for detecting a key switch operation comprising: a key switch matrix circuit including a plurality of key switches arranged in rows and columns, the rows representing respective blocks of the key switches; first means for detecting simultaneously all blocks in which key switches in operation exist; second means for simultaneously detecting all columns in a single one of the detected blocks on which the key switches in operation are disposed, the column detecting being carried out for one block after another, for each of the separate blocks detected by the first means; and control means for causing the second means to implement the column detection for one block at a time with respect to each of the blocks detected by the first means; each of the key switches in operation being identified by a combination key code designating the single detected block and the column on which the key switch in operation is disposed.
EaCh of the key switches is connected at one terminal thereof (e.g. a terminal on a movable contact side) to a first detection circuit and at the other terminal thereof (e.g. a terminal on a stationary contact side) to a second detection circuit. In one detection operation mode, signals are applied mb/ 4 109~3~4~
from the first detection circuit to the second detection cir-cuit in parallel through the key switches to enable the second detection circuit to perform a necessary detection operation.
In another detection operation mode, signals are applied from the second detection circuit to the first detection circuit in parallel through the key switches to enable the first detection circuit to perform a necessary detection operation.
The operating or nonoperating state of the key switches is detected in accordance with results of the detection operation in the first and second detection circuits.
The detection operation includes storage of signals and the signals are passed through key switches in operation mb/Jk - 4a ~
~ 374~
and stored in the first or the second detection circuit.
Checking of the respective key switches is made simultaneously in parallel and only signals having passed through the key switches in operation are stored in the first or the second detection circuit. If the object of detection is making of a key switch "the key switch in operation" means a key switch which is ON and if the object of detection is breaking of a key switch, "the key switch in operation" means a key switch is OFF.
Describing the basic concept of the present invention more specifically, a number of key switches are divided into blocks and block codes ~block identifying codes) are assigned to the respective blocks for identifying each block, whereas note codes (note identifying codes) are assigned to the res-pective key switches in each block for identifying each key switch. A common note code is assigned to key switches of the same note regardless of blocks to which the key switches belong.
The key switches can be individually identified by key codes ~hich are combinations of the block codes and the note codes.
The kex switches of the same note are commonly connected at one terminal thereof to constitute respective note lines which in turn are connected to a note detection circuit (i.e. the first detection cîrcuit) while the key switches of the same block are commonly connected at the other terminal thereof to con-stitute respective block lines which are connected to a block detection circuit ~i.e. the second detection circuit).
Brief description of the drawin s g Figs. 1 and 2 a~e block diagrams schematically showing the basic construction of the device according to the invention;
Fig. 3 is a block diagram showing an embodiment~of the invention in connection with a key switch circuit and a note cb/ 5 ;IL~9~3~740 detection circuit;
Figs. 4(a) and 4(b) are block diagrams showing the same embodiment in connection with a block detection circuit;
Fig. 5 is a diagram showing how each key switch is identified by a block and a note;
Fig. 6 is a diagram illustrating symbols used for designating logical circuits;
Fig. 7 is a block diagram showing an example of a device for generating mode signals designating various detection operation modes;
Figs. 8(a) through 8(n) are timing charts for explain-ing operations of the component parts shown in Figs. 3 and 4;
Fig.9 is a schematic block diagram showing another embodiment of the invention in connection with a key switch circuit;
Fig. 10 is a schematic block diagram showing still another embodiment of the invention in connection with a key switch circuit;
Fig. 11 is a block diagram showing a different example of the note detection circuit producing a start code;
Fig. 12 is a block diagram showing an operation control circuit relating to the modified embodiment; and Fig. 13~a) through 13(e) are timing charts for explain-ing production of control pulses used in the circuit shown in Fig. 12.
Description of Preferred Embodiments -As shown in Fig. 1, conductors nl - nn (note lines) representing respective notes are connected to terminals la (movable contacts) disposed on one side of each key switch in a key switch group 1, whereas conductors bl - bm (biock lines) representing respective blocks are connected to terminals lb (stationary contacts) disposed on the other side of each key b/ - 6 -~G9~7~0 switch in the key switch group 1. The conductors nl - nn are connected to a note detection circuit 2 and the conductors bl-bm to a block detection circuit 3. Accordingly, the total number of the conductors connected to the key switch group 1 is much less than the total number of the key switches. If the total number of the key switches in the present embodiment is rep-resented by n x m, the total number of the conductors required is only n + m.
Detection of all of the key switches is completed by implementation of several different detection operation modes (hereinafter briefly referred to as "operation mode" or "mode").
In the first one of these modes, a signal is supplied from a signal source 21 of the note detection circuit 2 to all the key switches in parallel via the conductors nl - nn. The signal is passed only through the closed contact of the key switch or key switches in operation to a corresponding one of the conductors bl - bm. The detected signal ~i.e. from which conductor~s) the signal~s) are delivered) is stored in a block memory 31 of the block detection circuit 3~ By this arrangement, the block or blocks in which the key switch or switches in operation exist are detected. The timing of the storing of the detected key switches is in synchronization with a first mode signal Sl designating the first mode.
In the second mode, a single block among the block or blocks stored in the memory 31 is extracted by a single block extraction unît 32 and thereupon a signal is applied through one of the conductors bl - bm corresponding to the extracted block to the stationary contacts of the respective key switches of the extracted block. The signal from the block detection circuit 3 is passed to one or more of the conductors nl - nn connected to the movable contacts of the respective key switches for notes covered by the extracted block and corresponding to the key switches in operation. This detected signal ~i.e. from cb/ 7 1(;~9~7~L0 which conductor(s) the signalts) are delivered) is stored in a note memory 22 of the note detection circuit 2. Accordingly, which one or ones of the key switches in the extracted block are in operation is detected. The extracting operation in the single block extraction unit 32 and the storing operation in the note memory 22 are performed in synchronization with a second mode signal S2 designating the second mode.
In the second mode, key switches which are in operation can be individually identified by combination of a single block name extracted by the single block extraction unit 32 and one or more note names stored in the note memory 22.
It will be understood from the foregoing that one feature of the present invention is the construction in which the key switches 1 are connected between the note detection circuit 2 and the block detection circuit 3 and detection of the key switches 1 in operation is made by transmitting signals in opposite directions through the key switches 1. According to the invention, the terminals la and lb of the key switches 1 are not fixedly used as either input terminals or output terminals but the input side and output side of both terminals are reversed depending upon the operation mode, i.e. whether the operation mode is the first mode or the second mode.
If a circuit (not shown) utilizing the result of detection of the key switches permits, the output of the single block extraction unit 32 and the parallel outputs of the respective notes from the note memory 22 may be directly supplied to the circuit for providing the circuit with the result of key switch detection. If there are blocks which still remain st~red in the block memory 31 without being extracted by the single block extraction unit 32, the above described second mode is repeated. More specifically, upon extraction of a certain block stored in the block memory 31 and completion cb/ - 8 -~39~74~
of the second mode for that block, another block stored in the block memory 31 is extracted in response to a next second mode signal S2 and the second mode is repeated. In this manner, the blocks to which the key switches in operation belong and which have been detected and stored in the memory 31 in the first mode are extracted one by one in response to the second mode signal S2, Thus, detection of all the key switches in operation is completed when the second mode is completed with respect to all of the Blocks stored in the memory 31.
Assuming, for example, that a pulse width of the mode signals Sl and S2 respectively is 1 clock time, detection of all of the key switches in operation is completed in only 2 clock times if the key switches in operation belong to a single block. Even if the key switches are in operation in all of the blocks, detection of all of the key switches is completed in "m + 1" clock times (e.g. 13 clock times if m = 12). In the prior art key scanning systems, time required for detection of all of thekey switches is 144 clock times in a case where n _ 12 and n = 12.
Eor convenience in the circuit utilizing the result of detection of the key switches, the stored notes in the note memory 22 should preferably be delivered out one by one in series.
Accordinq to the invention, for achieving the above objective, a third mode is provided for delivering out the note identifying signals of the key switches in operation from the note memory 22 one by one after the note identifying signals have been stored in the memory 22.
In the third mode, a single one among the notes (i.e.
note identifying signals) stored in the note memory 22`is extracted by a stored note extraction unit 23 as shown in Fig. 2 (in which like component parts are designated by the cb/
1~9~7~1~
same reference characters) and a signal representing the extracted note is applied to an encoder 24 to produce a code signal (note code NC) consisting of plural bits and represent-ing the note. The extracting operation in the extraction unit 23 is performed in synchronization with a third mode signal S3.
This third mode is repeated in response to the clock of the system until the note signals stored in the note memory 22 have all been extracted by the note extraction unit 23 and corresponding note code signals have all been delivered out.
Since the third mode is implemented only with respect to the notes stored in the note memory 22, there is no room for occurrence of waste of time. If, for example, three kinds of notes are stored in the note memory 22, the third mode concerning a certain block is completed in 3 clock times.
Completion of the third mode can be known by exhaustion of the contents stored in the note memory 22 due to extraction and, upon detection of the completion of the third mode, the mode is returned to the second mode, the single block extraction unit 32 extracting a next stored block and the note memory 22 memorizing the notes of the key switches in operation in that block. Then, the third mode is implemented again. In the third mode concerning a certain block, the signal representing the block is stored in a memory-and-encoder circuit 33 of the block detection circuit 3 whereby a code signal ~block code BC) consisting of plural bits and represent-in~ the block is produced by the circuit 33. Accordingly, the key switches in operation are detected by combinations of the block codes BC and the note codes NC which are generated in synchronization with each other. The codes of the key switches in operation are produced one by one in series.
As described above, the operation mode changes from the first mode to the second mode, third mode (or repetition cb/ - 10 -~(~9~74(~
thereof), second mode, third mode ....... When production of the key codes has been completed with respect to all of the blocks stored first in the block memory 31~i.e. when the third mode has been completed), the contents of storage in the block memory 31 have all been extracted and the operation mode now enters a fourth or stand-by mode. After detection of the stand-by mode, the operation mode returns to the first mode and the above described detection operation is repeated.
By repetition of the first to the fourth modes, detection of all of the key switches in operation is carried out from time to time.
According to the invention, not only key switches which are turned ON, but also those which are turned OFF may be detected by a construction similar to the above described one.
Such construction may be achieved, for example by inverting polarity of signals which are applied to or delivered from the detection circuit 2 and 3 through the key switch group 1, or by employing break contact type switches as the key switches.
One example o the device embodying the invention will now be described with reference to Figs. 3 through 9.
Fig. 3 shows an example of a key switch circuit 10 and a note detection circuit 20. Fig. 4 shows an example of a block detection circuit 30 connected to the key switch circuit 10 shown in Fig. 3.
A number of key switches ~S corresponding to the res-pective keys on the keyboard of the electronic musical instrument are provided in the key switch circuit 10. These key switches are commonly connected block by block with respect to the blocks Ul - U5, Ll - L5 and Pl, P2 at one input terminal thereof (stationary contact) and connected to block input-output terminals Tl through T12 via conductors (block lines) bl - bl2.
The key switches are connected at the other terminal thereof cb/ - 11 -1C3987~
(movable contact) to dodes DD and commonly connected by each note of C#, D, .... A#, B and C. Each of the commonly connected key switch groups is connected to corresponding one of note input-output terminals Hl - Hl2 via conductors (note lines) nl - nl2.
In the present embodiment, the key switches are divided by blocks according to octave ranges of the keyboard so that the notes in each block literally express the actual note names of the keys. Let us assume that, as shownin Fig. 5, twelve keys of C# ~ C are assigned to one octave range from the lowest note side and that the upper keyboard UK comprises 61 keys of a note C of 0th octave through a note C of the fifth octave, the lower keyboard LK comprises 61 keys in the same manner and the pedal keyboard PK comprises 25 keys of a note C of the 0th octave through a note C of the second octave.
Accordingly, the blocks Ul - U5 are assigned to the octave ranges of the upper keyboard UK, the blocks Ll - L5 to the actave ranges of the lower keyboard LK and the blocks Pl, P2 to the octave ranges of the pedal keyboard PK, res-pectively. Consequently, the notes C# - C in each of the blocks correspond to the note names in the respective octave ranges. In Fig. 3, connections of the key switches are shown in detail with respect only to the block U5 (i.e. key switches for the fifth octave of the upper keyboard UK) and the block Pl (i.e. key switches for the 0th and the first octave of the pedal keyboard PK). The key switches of the other blocks U4 -P2 are likewise connected to the respective conductors nl - nl2 for the respective notes C, B, A# ...., C# and also to con-ductors b2 ~ bll corresponding to these blocks. As will be appar-ent from Fig. 5, since the 0th octave includes only one note of C, the note C of the 0th octave (designated here as Co) is incorporated in the blocks Ul, Ll and Pl for the first octave. Accordingly, a key switch of the note Co is additionally cb/ - 12 -~9~74~
included in each of the blocks Ul, Ll and Pl. The key switches of the note Co are commonly connected and further connected to a note input-output terminal H13 through a conductor nl3 so that the note Co can be distinguished from the note C.
Since the keyboard portion (the key switch circuit 10) is spaced away from the electric circuit portion (the detection circuits 20, 30), relatively long wiring is required for the 1 13 and bl - bl2 connecting the key switch circuit 10 to the note detection circuit 20 and the block detection circuit 30, and conductor capacitances Cb, Cn are obsexved. For convenience of explanation, conductor capacitance on the block side conductors bl - bl2 is all designated by the same reference character Cb and conductor capacitance on the note side conductors nl - n13 is all designated by reference characters Cn. It should be noted, however, that conductor capacitance observed on one of the conductors bl - bl2 and nl - nl3 is different from one observed on another. The present embodiment is so constructed that the conductor capacitance Cb and Cn are positively utilized.
The note detection circuit 20 (Fig. 3) is composed of signal delivery circuits 21-1 through 21-13 corresponding to the signal source 21 (Figs. 1 and 2) and being provided res-pectively for the note C, B, ...... C# and Co, detected note memory circuits 22-1 through 22-13 corresponding to the note memory 22 (Figs. 1 and 2) and a note code production circuit 240 corresponding to the encoder 24 (Fig. 2). As to the res-pective circuits 21-1 through 21-13, 22-1 through 22-13 and 23-1 through 23-13, only the circuits 21-1, 22-1, 23-1, 21-13, 22-13 and 23-13 concerning the notes C and Co are illustrated in detail but the rest of the circuits are all of the same construction as these circuits concerning the notes C and Co .
c:/ - 13 -~C~9~740 The signal delivery circuits 21-1 through 21-13 are adapted to apply voltage VDD to the note input-output terminals Hl - H13 by switching of transistors TRA provided for each of the notes. The output from the note input-output terminals Hl - H13 are applied to the detected note memory circuits 22-1 through 22-13.
The block detection circuit 30 (Figs. 4(a), (b)) is composed of detected block memory circuits 31-1 through 31-12 corresponding to the block memory 31 ~Figs. 1 and 2) and being provided for the respective blocks U5, U4, ....... P2 and Pl, block priority gate circuits 32-1 through 32-12 corresponding to the single block extraction unit 32 (Figs. 1 and 2), a block code production circuit 330 corresponding to the memory-and-encoder circuit 33 (Fig. 2), a block code temporary memory circuit 331 ~Fig. 4~b~) for temporarily storing output Bl - K2 of the block code production circuit 330, a block code output gate circuit 332 (Fig. 4(b)) for delivering out the temporarily stored block codes in synchronization with the outputs of the note code production circuit 240 (Fig. 3), and signal delivery circuit 34-1 through 34-12 (Fig. 4(a)) for delivering the block signals extractedina certain priority order by the block priority gate circuits 32-1 through 32-12 to the note detection circuit 20 via the key switch circuit 10.
Only the circuits 31-1, 32-1, 34-1, 31-12, 32-12 and 34-12 concerning the blocks U5 and Pl are illustrated in detail but the circuits 31-2 through 31-11, 32-2 through 32-11 and 34-2 through 34-11 concerning the other blocks are of the same construction as the circuits concerning the blocks U5 and Pl. Although the circuits 21-1 through 21-13, 22-1 throug~
22-13, 23-1 through 23-13, 31-1 through 31-12, 32-1 through 32-12, 34-1 through 34~12 are different from each other, circuit elements (i.e. AND gates, OR gates etc.) of these cb/ - 14 -i~9~740 circuits are designated by the same reference characters irrespective of the kind of block or note so long as such circuit elements perform the same function.
Before describing about operation of the respective circuits, brief explanation will be made about symbols used in the accompanying drawings. Inverters are expressed by the symbol shown in Fig. 6(a), AND gate by the one shown in Figs. 6(b) and ~c), OR gate by the one shown in Figs. 6(d) and (e) and delay flip-flops by the one shown in Figs. 6(f).
An AND gate or OR gate with only a few input lines is rep-resented by the symbol shown in Fig. 6~b) or Fig. 6(d) and one with a relatively large number of input lines is rep-resented by the symbol shown in Fig. 6~c) or Fig. 6(e). In the s~mbol shown in Fig. 6(c) or Fig. 6(e), one input line is drawn on the input side of the AND or OR gate and signal transmission lines are drawn in such a manner that they cross the input line with each crossing point of the input line and the signal transmission line transmitting a signal to the input terminal of the AND or OR gate being marked by a circle.
Accordingly~ the logical formula of the AND gate shown in Fig. 6~c~ is X=A'B'D, whereas the logical formula of the OR
gate shown in Fig. 6~e~ is X=A+B+C.
In the embodiment shown in Figs. 3 and 4, all the key switches in operation are detected by implementation of the first to the fourth operation modes described above. The kind of the operation mode to be implemented is designated by the mode signals SO - S3. The stand-by mode signal So designates the fourth mode (stand-by mode), whereas the first through third mode signals Sl, S2, and S3 designate the first, second and third modes respectively. The minimum width of the signals SO - S3 is equal to the period of generation of the clock pulse ~A so that the whole instrument operates in cb/ - 15 -~9~740 synchronism with the clock pulse ~A.
The period of the clock pulse ~A can be determined as desired and set at 24 ~s in the present embodiment. Besides this clock pulse ~A~ a low frequency clock LC is used for determining a repetition rate of the key switch detection operation. The period of this clock LC can be determined as desired and should conveniently be 200 ~s - l ms for detection of the key switches.
Fig. 7 shows one example of a circuit for generating the mode signals SO - S3. In a clock edge detection circuit 41, the low frequency clock LC ~of a desired duty factor) is applied to a delay flip-flop DF3 for delaying it by one clock ~A~ and also to an AND gate Ag whereby the pulse rise of the low frequency clock LC is detected in synchronization with the clock pulse ~A. By this arrangement, a starting pulse ~differentiation pulse) TC having a pulse width equivalent to the period of the clock pulse ~A is produced with a period of the clock LC. Relationship between the clock pulse ~A
and the starting pulse TC is as shown in Figs. 8(a) and 8(b).
In a mode control circuit 42 in Fig. 7, the stand-by mode Signal So is produced by an AND gate A12 when inverted output signals Ql~ Q2 of delay flip-flops DF4, DF5 are both a signal "1". If the starting pulse TC is generated during presence of this stand-by mode signal So, i.e. during the stand-by mode, the output of an AND gate A14 becomes a signal "l". The signal "1" is applied to the delay flip-flop DF4 via an OR
gate OR5 and, consequently, the output Ql becomes a signal "1"
one clock (~A) later. Since the signal Q2 is still signal "1", and AND gate Alo is enabled to produce the first mode signal Sl.
Switching from the stand-by mode to the first mode is thus controlled by the starting pulse TC.
The operation of the embodiment shown in Figs. 3 and 4 cb/ - 16 -1~39~74~3 will now be described with reference also to Figs. 7 and 8.
In the stand-by mode shown by period tl in Fig. 8, the stand-by mode signal SO (Fig. 8(c)) is applied to the signal delivery circuits 34-1 through 34-12 of the block detection circuit (Fig. 4~a)) and thereby brings the transis-tors TRB of the circuits 34-1 through 34-12 into conduction.
As a result, wiring capacitance Cb of the block conductors bl - bl2 is discharged.
As the first mode signal Sl is produced at the period t2 ~Fig. 8(d)), the signal Sl is applied to the signal delivery circuits 21-1 through 21-13 of the note detection circuit 20 (Fig 3~ to brlng the transistors TRA into conduction. This causes voltage VDD to be applied to the key switch circuit 10 via the terminals Hl - H13 to charge the wiring capacitance Cn of the note conductors nl - nl3. The voltage signal ti.e.
the charged voltage of the capacitance Cn) is simultaneously delivered to the conductors of one or more of the blocks tU5 -Pl) to which the key switch or switches KS in operation belong via such key switches and fed from the corresponding terminals ~Tl - T12~ to the block detection circuit 30 (Fig. 4ta)).
Accordingly, a signal "1" is produced only in the terminals among the terminals Tl - T12 corresponding to the blocks in which the key switches in operation have been detected.
In Fig. 4(a), outputs TU5 - TPl of the terminals Tl -T12 are respectively applied to the corresponding ones of the detected block rnemory circuits 31-1 through 31-12 More specifically, the signals from the terminals Tl - T12 are applied to AND gates Al of the circuits 31-1 through 31-12.
The first mode signal Sl is also applied to the AND gates Al.
Accordingly, a signal "1" is stored in a delay flip-flop DFl through the AND gate Al and an OR gate ORl only in the circuits among the circuits 31-1 through 31-12 corresponding ~/ - 17 -~9~740 to the blocks in which the key switches in operation have been detected. If, for example, the blocks in which the key switches in operation have been detected are blocks U5, U4, U3 and Pl, a signal "1" is stored in the flip-flops DFl of the circuits 31~1, 31-2, 31-3 and 31-12. The above described first mode is implemented during one clock of the period t2.
If a signal "1" is applied in the first mode to any one o~ the block memory circuits 31-1 through 31-12 from the block terminals Tl - T12, this signal is detected by an OR
gate OR7 (Fig. 4(a)) and thereupon an any-block signal As ~Fig. 8(g)) representing existence of a block with respect to which a key switch in operation has been detected. This any-block signal AB is applied to an AND gate A18 of the mode control circuit 42 in Fig. 7. Since the first mode signal S
is present at this time, the signaIs Q1 and Q2 are both "1"
- and, accordingly, the AND gate A18 is enabled and input D2 of the delay flip-flop DF5 becomes "1" through an OR gate OR6.
Since input Dl of the flip-flop DF4 at this time is a signal "0", the signal Ql and Q2 become both signal "1" at the period t3 (Fig. 8) after lapse of one clock ~A). Accordingly, an AND gate All is enabled to produce the second mode signal S2.
The delay flip-flops DFl of the detected block memory circuits 31-1 through 31-12 (Fig. 4(a)) at this time contain the signal "1" and, accordingly, a signal "1" is fed from the delay flip-flops DFl storing the signal "1" to OR circuits OR2 of the corresponding block priority gate circuits among the circuits 32-1 through 32-12. The outputs of the OR gate OR2 f each of the circuits 32-1 through 32-11 is connected to the OR gate OR2 of the circuit of an immediately subsequent priority order among the circuits 32-2 through 32-12. Consequently, if there is any one block in which a signal is stored, a signal "1" is delivered out of the OR gate OR2 f the priority gate circuit cb/ - 18 -1i~9~740 32-12 for the block Pl which is of the lowest priority order and this signal constitutes a memory block signal Ms (Fig 8(h)) representing existence of the block storing the signal. This signal MB is applied to AND gates A13, A15 and A17 of the mode control circuit 42 in Fig. 7. Accordingly, the AND gate A13 is enabled simultaneously with the generation of the second mode signal S2 and thereupon another second mode signal S2' is produced.
In the above described manner, the second mode signals S2 and S2' are generated at the period t3 and the operation mode enters the second mode.
In the second mode in which a single block is extracted from among the stored blocks, the extraction is made in a pre-determined priority order in the priority gate circuits 32-1 through 32-12 ~Fig. 4(a)). In the embodiment shown in the figure, the priority is given in the order of the blocks U5, U4 ..... L5, L4 ...... P2, P1. In the circuit 32-1 for the block U5 of the highest priority order, the output of an inverter Il is always a signal "1" so that the AND gate A3 is enabled upon receipt of the signal "1" from the flip-flop DFl of the circuit 31-1. The outputs of the flip-flops DF1 of the memory circuits 31-1 through 31-11 for the blocks U5 - P2 of higher priority orders are applied to the inverters Il and the OR gates OR2 of the circuits 32-2 through 32-12 for the blocks U4 - Pl of the lower priority order. When the signal is stored in the higher order blocks U5 - P2, a signal "O" is applied to the AND gates A3 via the inverters Il of the lower order blocks U4 - Pl for inhibiting the AND gates A3. Accordingly, a signal "1" is delivered only from the AND gate A3 of a single one of the priority gate circuits 32-1 through 32-12.
Assuming that key switches in operation have been detected in the blocks U5, U4, U3 and Pl, a signal "1" is cb/ - 19 -~39~74C~
delivered only from the AND gate A3 of the circuit 32-1 for the block U5 at the period t3. The outputs of the ~ND gates A3 of the circuits 32-2 through 32-12 for the other blocks U4 - Pl are all signal "O". The outputs of the AND gates A3 of the respective circuits 32~1 through 32-12 are applied directly to AND gates A4 and also applied to AND gates A5 after being inverted by inverters I2.
The second mode signal S2 is applied to the AND gates A4 and A5 of the priority gate circuits 32-1 through 32-12, uhereas the other second mode signals S2' is applied to the detected note memory circuits 22-1 through 22-13 of the note detection circuit 20 in Fig. 3.
Accordingly, at the period t3, the output of the AND
gate A4 of the priority gate circuit 32-1 is a signal "1"
and the outputs of the AND gates A4 of the other circuits 32-2 through 32-12 are a signal "O". Thus, the storage of the block U5 only is extracted and the extracted signal is applied to a block code delivery circuit 330 and the transistor TRC of the signal delivery circuit 34-1. The output of the AND gate A4 of the circuit 32-1 is inverted by an inverter I3 of the circuit 31-1 of the same block for inhibiting the AND circuit A2 of the circuit 31-1. The storage in the flip-flop DFl of the circuit 31-1 therefore is cleared. ~owever, the outputs of the AND gates A4 of the other circuits 32-2 through 32-12 are a signal "O", so that a signal "1" from the inverter I3 is applied to the AND gates A2 of the circuits 31-2 through 31-12 of the same block whereby the output signals of the flip-flops DFl of the respective circuit 31-2 through 31-12 are self-held. Accordingly, storage in the flip-flops DFl of the blocks U4, U3 and Pl is maintained. The output`s of the AND gates A5 of the other circuits 32-12 through 32-12 become a signal "1" which is applied to transistors TRD of the corres-ponding signal delivery circuits 34-2 through 34-12.
cb/ - 20 -7~0 In the above described manner, the transistor TRC
is brought into conduction and the transistor TRD is brought out of conduction in the signal delivery circuit 34-1 for the block U5 while the transistor TRC iS broughtout of con-duction and the transistor TRD is brought into conduction in the signal delivery circuits 34-2 through 34-12 for the blocks U4 - Pl.
Accordingly, the voltage VDD is applied to the input-output terminals T2 ~ T12 of the blocks U4 - Pl in the key switch circuit 10 (Fig. 3), thereby charging the wiring capacitance Cb of the conductors b2 ~ bl2. This causes the diodes DD provided for the key switch group KS for the blocks U4 - Pl to be reversely biased with a result that the key switches KS of the blocks U4 - Pl are electrically disconnected from the note conductors nl - nl3. On the other hand, since the potential at the input-output terminal Tl of the block U5 drops to the ground potential through the transistor TRC, capacitance Cb of the conductor bl is discharged and a signal "O" is applied to the key switch RS of the block U5.
Thus, the diode DD corresponding to the key switch in operation is brought into conduction through this diode DD. Since the re~pective key switches of the block U5 correspond to the notes C, B ....... C# and the conductor capacitance Cn of the conductors nl - nl2 for the respective notes have been charged during the first mode, the conductor capacitance Cn of the note conductors tnl - nl2) corresponding to the key switches in operation is discharged via the diode DD, the key switches, the terminal T
and the transistor TRC of the circuit 34-1. If, for instance, three key switches of the notes C, B and E are ON in the block U5, the conductor capacitance Cn of the conductors nl,`n2 and n9 for the notes C, B and E is discharged and the capacitance C of the other conductors n3 - n8, nl0 13 charged condition.
cb/ - 21 -11~9~7~1D
Consequently, a signal "o" is supplied from terminals Hl, H2 and Hg to the inverters I4 of the detected note memory circuits 22-1, 22-2 and 22-9 whereas a signal "1" is supplied 3 H8 and Hlo - H13 to the detected note memories 22-3 through 22-8 and 22-10 through 22-13. Thus, a signal "O" is delivered from the block input-output terminal Tl of the extracted block U5 to the note input-output terminals corresponding to the key switches in operation through these key switches in operation, whereby the notes of the key switches in operation are detected.
In the detected note memory circuits 22-1 through 22-13, the signals from the terminals Hl - H13 are inverted by the inverters I4 and thereafter applied to AND gates A6. The AND
gates A6 also receive the second mode signal S2' so that a signal "1" is stored in the delay flip-flops DF2 via the AND
gates A6 and the OR gates OR3 in the memory circuits 22-1, 22-2 and 22-9 corresponding respectively to the notes C, B
and E of the detected key switches in operation. In the fore going manner, the second mode is implemented during the period t3, For causing the circuits 22-1 through 22-13 to store the detected notes, the second mode signal S2' which is differ-ent from the second mode signal S2 is employed so that the detected note will be stored only when a stored block exists ~B=l) and no new storage will be made in the third mode as will be described later.
The second mode finishes in one clock. In the next period t4 (Fig. 8), a signal "1" is produced in parallel from the flip-flops DF2 of the circuits 22-1, 22-2 and 22-9 storing the detected notes and supplied to the note priority gate circuits 23-1, 23-2 and 23-9. The third mode is implemented during the period t4.
In the third mode in which a single note among the cb/ - 22 -~(;;9~740 stored notes is extracted, this extraction is effected in accordance with a predetermined priority order in the note priority gate circuits 23-1 through 23-13. In the figure, the priority in extraction is given in the order of the notes C, s, A# ....... C#, Co. As in the note priority gate circuits 23-1 through 23-12, the output of an inverter I5 in the gate circuit 23-1 for the note C of the first priority order is always signal "1", and an AND gate A8 is enabled when a Signal "1" is applied thereto from the flip-flop DF2 of the memory circuit 22-1. The outputs of the flip-flops DF2 of the higher notes C - C# are applied to the inverters I5 of the lower notes B - Co through OR gates OR4 and successively inhibit the AND gates A8 of the lower order. The outputs of the flip-flops DF2 of the respective memory circuits 22-1 through 22-13 are applied to AND gates A7 of the circuits 22-1 through 22-13 while the outputs of the flip-flops DF2 of the memory circuits 22-1 through 22-12 of the notes C - C# which are of higher priority orders are successively applied to AND gates A7 of the memory circuits 22-2 through 22-13 via the OR circuits OR4 of the circuits 22-1 through 22-12. The AND gate A7 of the memory circuit 22 - 1 of the first priority order always receiyes a signal "O" and, accordingly, the stored contents of the flip-flop DF2 of the circuit 22-1 are not self-held.
However, the stored contents of the flip-flops DF2 of the memory circuits 22-2 through 22-12 of the lower priority orders are self-held by the output signal "1" of the flip-flops DF2 of the memory circuits 22-1 through 22-12 of the higher priority orders.
Accordingly, a signal "1" is supplied from the priority gate circuit 23-1 of the note C to a note code delivery circuit 240 at the period t4. At this period, the outputs of the other circuits 23-2 through 23-13 are a signal "0". Then at c~/ - 23 -~3~7~0 a period t5 (Fig. 8), the stored contents of the circuit 22-1 are cleared so that a signal "1" is delivered from the priority gate circuit 23-2 of the note s. At a next period t6 (Fig. 8) the stored contents of the memory circuit 22-2 of the note B are cleared and, accordingly the output signal "1" of the memory circuit 22-9 for the note E storing the signal "1" is applied to the note code delivery circuit 240 via the priority gate circuit 23-9. In this manner, the third mode is successively repeated during clock periods (i.e. three clock periods t4 - t6 in the above example) corresponding to the number of the stored notes in the memory circuits 22-1 through 22-13.
Since the transistor TRA can be driven by any one of the first mode signal Sl and the third mode signal S3, the transistor TRA in the present embodiment is driven by a first and third mode signal Sl+3 which can be used both for the first mode and the third mode. Since a prerequisite for entering the third mode is that the operation mode in a preceding one clock is either the second mode or the third mode, arrangements are made so that a signal Q2 is applied to AND gates A15, A16 and A17 in the mode control circuit 42. The fact that this signal ~2 is "1" signifies that the current mode is either the second mode or the third mode. When the signal Q2 and the memory block signal MB from the OR gate OR2 ~Fig. 4(a)) are generated and any note signal AN ~Fig. 8~i~) is generated upon application to the OR gate OR8 of a signal "1" which has been applied to the flip-flops DF2 of the detected note memory circuits 22-1 through 22-13, the AND gate A15 ~Fig. 7) is enabled. The any-note signal AN represents that a signal of the detected note is to be stored in any one of the memory circuits 22-1 through 22-13 Since the AND gate A17 is enabled whenever the AND gate A15 is enabled, the input signals to the flip-flops DF4 and DF5 are both signal "1" and, accordingly, the signals c~/ - 24 -~G9~3740 Ql and ~2 become signal "1" one clock later. When the signals Ql and Q2 are both signal "1", this indicates that the third mode should be implemented ~or being implemented). If the any-note signal AN is still produced after entering the third mode, the output of the AND gate A16 is a signal "1"
and this causes the signals Dl, D2 to be "1" thereby instruct-ing that the third mode is to be continued. Since the operation mode is either the first mode or the third mode when the signal Ql is "1", this signal Ql is applied to the transistor TRA
~,F,ig. 3) as the first and third mode signal Sl + 3. If the AND gate A17 ~Fig. 7) is enabled and the AND gate A15 is not enabled, the second mode signals S2 and S2' are generated again.
When the notes stored in the detected note memory circuits 22-1 through 22-12 have all been extracted by repeti-tive implementation of the third mode during the periods t4, t5 and t6, the OR gate OR8 ~Fig. 3) produces a signal "O"
and the any-note signal AN becomes "O". This signifies that the third mode should be finished with respect to the specific block. If there remain any stored blocks (i.e. the signal MB=l) the second mode must be implemented again. Accordingly, the second mode signals S2 and S2' are produced again in accordance with the output of the AND gate A17. In the above described example, signals are still stored in the memory circuits 31-2, 31-3 and 31-12 for the blocks U4, U3 and Pl so that the second mode signals S2 and S2' are produced at a period t7 (Fig. 8).
In the second mode at the period t3, the block code delivery circuit 330 to which a signal "1" has been applied from the priority gate circuit 32-1 (Fig. 4(a)) for the block U5 produces a block code K2* ~ Bl* representing the block U5 and delivers this block code to block code temporary mèmory circuit 331 shown in Fig. 4(b). In the block code delivery circuit 330, the codes for the respective blocks U5 - P
cb/ - 25 -7~
are formed by combining codes K2, Kl representing the kind of keyboard and codes s3, s2 and sl representing the kind of octave, as shown in the following Table 1.
Table I
\ key codes .
\ Column A Column B
\ block c odes note codes \ K2 K1 B3 B2 BlN4 N3 N2 N1 ~e~d ~
block 1 O O
~c ~- 1 2 ~
D# . 0 1 0 0 ;
cb/ - 26 -- ~Ci9~3740 For example, the code for the block U5 is composed of a code "01" representing the upper keyboard U and a code "101"
representing the fifth octave. In this code, the bits Kl(Kl*), B3~B3*) and sl(Bl*) are respectively signal "l" and the bits K2(K2*) and B2(B2*~ are signal "0". In the block code delivery circuit 330 an OR gate ORg produces a signal of the bit K2*, an OR gate ORlo the bit Kl*, an OR gate ORll the bit B3*,an OR gate ORl2 the bit s2*, an OR gate ORl3 the bit Bl* respectively.
Accordingly, the output signal of the priority gate circuit 32-l for the block U5 is applied to the OR gates ORlo, OR
and ORl3 and the bits Kl*, B3* and Bl* become a signal "1".
Conse~uently, a code "01101" is produced as the block code K2*, Kl*, B3*, B2*, and Bl* representing the block U5.
In Fig. 4~b), the block code temporary memory circuit 331 has memory circuits 331a - 331e for the respective bits K2* ~ Bl* of the block code. In the figure, only the memory circuit 331a for the bit K2* is shown in detail but the other memory circuits 331b - 331e for the other bits Kl* - Bl* are o~ the same construction as the memory circuit 331a. At the period t3, the block code delivered from the block code delivery circuit 330 is applied to the memory circuits 331a - 331e, each of the signals representing the bits K2* ~ Bl* being applied to its corresponding memory circuit. In the memory circuits 331a - 331e, the block code is stored in delay flip-flops DF6 via the OR gates ORl4. The stored signal in the flip-flops DF6 if produced one clock later, i.e. at the period t4 and is applied to a block code output gate circuit 332 and also self-held at the flip-flop DF6 via the OR gate ORl4. More specifically, since an AND gate Al9 receives a stand-by mode and second mode signal S0+2 through the inverter I6 and this signal S0+2 is a signal "O" in the operation modes other than the stand-by or the second mode, i.e. in the first cb/ - 27 -~9~74(~
or the third mode, an inverted signal is "1" during the periods t4, t5 and t6 and, accordingly, the AND gate Alg is enabled and the contents of the flip-flops DF6 are self-held. The signal Ql provided by the mode control circuit 42 ~Fig. 7) is utilized as the signal S0+2 because the signal Ql is "O" in the first or the third mode whereas it is "1" in the second or the stand-by mode.
In the foregoing manner, the block code X2* - Bl*
delivered from the block code delivery circuit 330 in the second mode at the period t3 as shown in Fig. 8(j) is held in the block code temporary memor~ circuit 331 as shown in Fig.
8 ~) in the third mode ranging over the periods t4 - t6. At the period t7 at which the operation mode is back in the second mode, the block code of the block U5 which has been delayed by one clock by the flip-flops DF6 of the memory circuit 331 is delivered by the circuit 331 but this block code is prevented by a block code output gate circuit 332 ~Fig. 4~b)).
The outputs of the temporary memory circuit 331a - 331e storing the signals of the respective bits of the block code are supplied to AND gates A20 - A24 in the block code output gate circuit 332. The AND gates A20 - A24 receive also a stored-note signal MN supplied from the note detection circuit 20 ~Fig. 3~, so that the AND gates are enabled in synchronization ~lth delivery of a note code. The stored-note signal MN is deliyered from the OR gate OR4 of the priority gate circuit 23-13 (Fig. 3~ for the note Co of the lowest priority order.
In the third mode, the signal MN ~Fig. 8(Q)) is produced every time the signal "1" is supplied from the flip-flops DF2 f the detected note memory circuit 22-1 through 22-13 to a note code delivery circuit 240 via the priority gate circuits 23-1 through 23-13.
The note code delivery circuit 240 in Fig. 3 is provided cb/ - 28 -17g'0 for generating codes representing note names each of which consists of a plurality of bits N4, N3, N2 and Nl. Each note C$, D ... . E, C is codified as shown in the column B
of the Table 1. In the note code delivery circuit 240, the outputs of OR gates OR15~ R16' OR17 and OR18 $ignals for the bits N4, N3, N2 and Nl. The outputs of the priority gate circuits 23-1 through 23-13 corresponding to the respective notes are applied to the OR gates OR15 - OR18 in accordance with the contents of the column B in Table 1.
Accordingly, contents of the note code N4, N3, N2, Nl delivered from the circuit 240 in the third mode are "1110" representing the note C at the period t4, "1101" representing the note B
at the period t5 and "0100" representing the note E at the period t6. These note codes are sequentially delivered out as shown in Fig. 8~m). The stored-note signal MN is also produced in synchronization with the note code as shown in Fig. 8 ~Q).
Accordingly, the AND gates A20 - A24 of the block code output gate circuit 332 ~Fig. 4~b)) are enabled only during the third mode ~i.e. periods t4 - t6) to continuously produce K2, Kl, B3, B2, Bl for the block U5 as shown in Fig. 8~n). Simultaneously, the note codes N4, N3, N2, Nl for the notes C, B and E are sequentially produced. The key switches in operation in the key switch circuit 10 can be detected by key codes which are combinations of the block code K2 ~ Bl and the note code N4 - Nl. Thus, the key codes rep-resenting the key switches in operation are utilized in a circuit (not shown) requiring such key codes.
In the above described manner, detection of the key switches in one block is completed by the repetitive imple-mentation of the third mode and only the key codes K2 ~ Nl of the key switches in operation are successively provided in series without wasting time.
cb/ - 29 -~98740 The lowest key for the O octave in the column s of Table I is included in the first octave for convenience of actual wiring arrangements of the key switches. The block code portion B3, B2, sl for the lowest key for the O octave there-fore must be provided as "O, O, O" as shown in Table I. For this purpose, a signal CoS representingthe note C of the 0th octave is applied thro~gh an inverter I17 to the third input terminal of an AND gate A24 corresponding to the bit B in the block code output gate circuit 332 ~Fig. 4Ib)). The signal CoS is the output of the note Co from the priority gate circuit 23-13 tFig. 3) and signifies that the note code for the note Co has been produced when the output of the circuit 23-13 is a ~ignal "1". Accordingly, the AND gate A24 of the circuit 332 is inhibited by application thereto of the signal CoS and the bit Bl becomes "O". The code of the O octave is thereby produced. When the note Co is not extracted, the output of the inverter I7 is a signal "1" and the AND gate A24 is not inhibited.
In case this embodiment is utilized for an electronic musical instrument, the AND A25 which receives the outputs of the block code temporary memory circuits 331a, 331b (Fig. 4(b)), i.e. the keyboard codes K2, Xl, is utilized for producing a single pedal keyboard tone. The AND gate A25 detects the code "11" which is the code K2, Kl of the pedal keyboard P and supplies a pedal keyboard detection signal PC representing that the detected block belongs to the pedal keyboard to the detected note memory circuits 22-1 through 22-13 of the detection circuit 20 (Fig. 3). This signal PC is inverted by an inverter I8 and the inverted signal "o" is used for inhibiting the AND gate A7 of the memory circuits 22-l~through 22-13. Accordingly, the flip-flops DF2 of the memory circuits 22-1 through 22-13 do not perform self-holding so that the notes ~9~37~0 of the key switches in operation of the pedal keyboard block detected in the second mode are stored only for one clock time and only a single note of the first priority order among the stored notes is extracted. Accordingly, the third mode lasts only during one clock time in the case of the pedal key-board. If the block is for a keyboard other than the pedal keyboard, the signal PC is "O" and the output of the inverter I8 is a signal "1" so that the AND gate A7 is not inhibited.
The present embodiment in which the pedal keyboard P is divided into the t~o blocks Pl and P2 has a function of giving a priority to the block P2 in the production of a single pedal tone. In the block detection circuit 30 in Fig. 4(a), a signal TP2 from the input-output terminal Tll is applied to the memory circuit 31~11 of the block P2 and also to an AND gate A26 through an inverter Ig for inhibiting the AND gate A26. The AND gate A26 also receives a signal TPl from the input-output terminal T12 o~ the block Pl and delivers this signal TPl to the memory circuit 31-12 of the block Pl only when the AND gate A26 is not inhibited. By virtue of this arrangement a detection signal is stored only in the memory circuit 31-11 of the block P2 even in a case wherein a key switch in operation has been detected in both the block Pl and the block P2 in the first mode. Consequently, the second mode is not implemented with respect to the block Pl.
At the period t7, the second mode signals S2, S2' are produced again as was previously described. Since the contents of storage in the memory circuit 31-1 ~Fig. 4(a)) for the block U5 have already become "O", the stored signal "1"
in the memory circuit 31-2 for the block U4 is extracted by the priority gate circuit 32-2 and a signal "1" is provided by the AND gate A4 of the circuit 32-2. Thus, the second mode is implemented with respect to the block U4 at the period cb/ - 31 -37~0 t7 in the same manner as at the period t3. At a next clock period t8 ~Fig. 8), the third mode is implemented with respect to the detected note of the block U4. Assume, for instance, that the key switches for the notes s and A in the block U4 the key switch for the note E in the block U3 and the key switch for the note E in the block Pl are ON, the respective component parts shown in Figs. 3 and 7 operate in the same manner as in the above described case of the block U5 to pro-duce the signals shown in Fig. 8. Then the second and the third modes are repeated and detection of all the key switches in operation is completed at a period tl3. More specifically, the codes N4 - Nl for the notes B and A are produced with the code K2 ~ Bl for the block U4 as shown in Figs. 8(m) and 8~n~. Subsequently, the code N4 - Nl for the note E is produced with the code K2 ~ Bl for the block U3 and the code N4 - Nl for the note E with the code K2 ~ Bl for the block Pl. Accord-ing to Fig. 8, the starting pulse TC is produced by the clock edge detection circuit 41 shown in Fig. 7. Since, however, the operation mode at this time is the third mode, the outputs Ql' Q2 of the flip-flop DF4, DF5 of the mode control circuit 42 are both signal "1" and the signal Ql' Q2 are both "O"
so that the pulse TC is ignored.
At the period tl3, the stored signalsin the block memory circuits 31-1 through 31-12 have all been exhausted and the stored block signal MB has therefore become "O". Besides, the stored signals in the note memory circuits 22-1 through 22-13 have all been extracted and the any-note signal AN has become "O". Accordingly, the outputs of the AND gates A14 - A18 of the mode control circuit 42 become "O" and the inputs Dl, D2 of the flip-flops DF4 and DF5 become "O". Thus, thè
- signals Ql' Q2 become "1" at a next clock period tl4 causing the AND gate A12 to produce the stand-by mode signal SO.
cb/ - 32 -1~9~3740 The operation mode therefore enters the stand-by, i.e. the fourth, mode.
If the starting pulse TC is produced in this stand-by mode, the first mode signal S1 is produced one clock later in the same manner as has previously been described ~simul-taneously with the first and third mode signal Sl+3). Accord-ingly, the first mode is implemented again and then the second and third modes are repeated. In the foregoing manner, the key codes K2, Rl, B3, ---- N4, --- Nl are successively deliver-ed from the note code delivery circuit 240 of the note detection circuit 20 and the block code output gate circuit 332 of the block detection circuit 30. The period of the low fre-quency clock LC ¢or pulse TC~ determines starting of a series of detection operation. If the detection operation prolongs exceeding the period of the clock LC, the repetitive operation is conducted by a period which is an integer multiple of the period of the clock LC.
In the above described embodiment, the voltage VDD
from the circuits 21-1 through Zl-13 of the note detection circuit 20 and the circuits 34-1 through 34-12 of the block detection circuit 30 or ground potential is applied to the conductor capacitances Cb~ Cn of the key switch circuit 10 only for a short time during which such voltage is required to charge or discharge the conductor capacitances Cb, C .
Consequently, in the key switch circuit 10 and other circuits 22-1 through 22-13, power is consumed only transiently and not constantly. This reduction in power consumption is very adyantageous in the circuit design. The invention, however, is not limited to the above embodiment but may be applied to a case wherein no conductor capacitances Cb, Cn are used.
One such example will be described below.
Fig. 9 shows another embodiment of the invention in cb/
~9~740 connection with the key switch circuit 10. In Fig. 9, illus-tration of circuits other than signal delivery circuits 21'-1 through 21' - 13 of the note detection circuit 20 and circuits 34'-1 through 34'-12 of the block detection circuit 30 is omitted because these omitted circuits are of the same con~
struction as those shown in Figs. 3 and 4. Referring to the signal delivery circuits 21'-1 through 21'-13 of the note detection circuit 20, the voltage VDD is constantly applied through resistors RR to note input-output terminals Hl-H13 of the key switch circuit 10 and also to inverters I4 of the detected note memory circuits 22-1 through 22-13. Accordingly, a signal "1" is constantly derived through note terminals Hl -H13, note conductors nl - nl3, diodes DD, key switches in operation, block conductors bl - bl2 of the blocks to which the key switches in operation belong and block input-output terminals Tl - T12, and signals TU5 - TPl tsignal 1 ) of the blocks in which the key switches in operation have been found are supplied to AND gates Al of the detected block memory circuits 31-1 through 31-12 ~Fig. 4(a)). As the first mode is implemented upon generation of the first mode signal Sl, the detected blocks are stored in the corresponding memory circuits 31 - 1 through 31 - 12 tFig. 4~a)). Then the opera-tion mode enters the second mode and signals of the blocks extracted by the block priority gate circuits 32-1 through 32-12 tFig. 4~a)~ with a certain order of priority are applied to transistors TRC of corresponding signal delivery circuits 34' -1 through 34' - 12 tFig. 9) thereby enabling these tran-sistors TRC. The circuit between one of the circuits 21' - 1 through 21' - 13 corresponding to the note of the key switch in operation and the grounded transistor TRC which is now ON
conducts through one of the terminals Tl - T12 for the block in which the transistor TRC is ON, a corresponding one of the block conductors bl - bl2, the key switch in operation of the cb/
~3~3740 block and diode DD, one of the note conductors nl-nl3 correspond-ing to the key switch in operation and a corresponding one of the note terminals Hl-H13. As the circuit conducts, a signal "o" is applied to the inverter I4 of the note memory circuit corresponding to the key switch in operation. The note of the key switch in operat;on thereby is detected and stored in one of the memory circuits 22-1 through 22-13, and the second mode is implemented. According to this embodiment, a constant power is used so that the transistors TRA and TRB for charging ~d discharging the conductor capacitances Cb, Cn are not required.
The foregoing description has been made with regard to a case where the present invention is applied to detection of the depressed key on the keyboard of an electric musical instrument.
Accordingly, a circuit utilizing thekey code K2-Nl composed of the block code and the note code provided by the note detection circuit 20 and the block detection circuit 30 is one which pro-duces a musical tone signal of a pitch designated by the detected kex code and as well as controls its tone colour and volume.
It should be noted, however, that the invention can be applied not only to an electronic musical instrument but also to an apparatus such as an input device of a computer in which many switches are employed for efficiently detecting operation of the switches without wasting time.
In the embodiment shown in Figs. 3 and Fig. 4(a), the capacitance Cn on the note side is charged in the first mode and the capacitance Cn corresponding to the key switch in operation is discharged in the second mode. The construction may be modified so that the capacitance Cn is discharged in the first mode. In this case, the signal delivery circuits 21-1 through 21-13 and 34-1 through 34-12 on the note ahd block sides must be modified to some extent.
Fig. 10 shows an example of such modified signal cb/ 35 ~591~740 delivery circuits. Transistors TRAI of signal delivery cir-cuits 21-1 through 21-13 on the note side are grounded and a first mode signal Sl (Sl+s) is applied to these transistors TRA' Transistors TRB' of signal delivery circuits 34-1 through 34-12 on the block side are connected to a power source VDD and a stand-by mode signal So is applied to these transistors TRB ' . Diodes DD are connected in a reverse direction to the embodiment shown in Fig. 3.
When the stand-by mode signal So is generated, voltage VDD is applied to block terminals Tl-T12 through the transistors TRB' thereby charging conductor capacitances Cbl - Cbl2 on the block side. Then the first mode signal Sl is generated and the transistors TRA' are brought into conduction thereby dis-charging conductor capacitance Cn on the note side. In response to this discharging, conductor capacitance (Cbl - Cbl2~ corres-ponding to the block including the key switch in operation is disch~rged. The block including the key switch in operation is detected by this discharging of the conductor capacitance.
In the detected block, a signal "O" is produced from a corres-ponding one of the terminals Tl - T12. This signal is inverted t~ "1" by an inverter lN and thereafter is applied to the detected block memory circuits 31-1 through 31-12.
In the second mode, a transistor TRC ' of one of the signal delivery circuit 34-1 through 34-12 corresponding to the single block extracted by the priority gate circuits 32-1 through 34-12 is brought into conduction and a single conductor capacitance (one of Cbl - Cbl2) corresponding to the specific block is charged. In the signal delivery circuits for the rest of the blocks transistors TRD' are brought into conduction and the rest of the conductor capacitance are all discharged.
Accordingly, a signal is delivered to the note conductors nl - nl3 through the key switch in operation in the single cb/ - 36 -~9~7~0 detected block and one of the conductor capacitances Cnl - Cnl3 corresponding to the key switch in operation is charged. Thus, the note of the key switch in operation is detected. Since a signal "1" is produced from one of terminals Hl - H13 corres-pondin~ to the detected note, the inverter I4 as shown in Fig. 2 is not required in the detected note memory circuits 22-1 through 22-13 but the output from the terminals Hl - H12 is directly ap~lied to an AND gate A6.
Even if there is a leakage resistance in the key switch circuit 10, such a leakage resistance in no way affects the operation of the circuit according to the invention. For example, if the leakage resistance is in the order of 1 MQ, and each of capacitance elements Cnl - Cn and Cbl - Cbm is about 1 nF, time constant is 1 nF x 1 M Q = lms which is sufficiently large against the frequency of the clock ~A
~about 24 ~s in the above example) so that the leakage resist-ance exercises no adverse effect to the capacitance elements.
The foregoing description has been made with respect to the example in which only key codes of keys in operation are generated. A modified embodiment of the invention in which a start code is produced in the interval of generation of the key code will now be described. The start code is a code which is clearly distinguishable from thekey code and used for detecting a key-off state.
The present embodiment is different from the previously described one in that the circuit shownin Fig. 3 is substituted by a circuit shown in Fig. 11 and that the mode signal genera-tion circuit shown in Fig. 7 is substituted by a mode signal generation circuit shown in Fig. 12. The circuit of Fig. 11 is different from the circuit of Fig. 3 in that a signal SSc is applied to OR gates OR15 - OR18 and is the same as the circuit of Fig. 3 in other respects. Description will therefore cb/ 37 1~98740 be made about the different construction particularly about generatiOn of the start code. The start code SC is produced upon application of a start code designation signal SSc to a note code delivery circuit 240 (Fig. 11). The start code designation signal SSc is applied to all of OR gates OR15, OR16, OR17 and OR18 of the note code delivery circuit 240 so that respective bits N4, N3, N2, Nl become "1". Contents of the respective bits K2, Kl, K3, B2, Bl, N4, N3, N2, Nl of the start code SC are "000001111". The contents of the start code SC are clearly distinguishable from the contents of the key code KC for the detected key switch in operation.
The start code designation signal SSc is generated in the stand-by mode as will be described later and, accordingly, the key code KC is never produced concurrently with the start code SC and the bits K2, Kl, B3, B2, Bl at this time are all "0".
Accordingly, the start code designation signal SSc need not he applied to a block code delivery circuit 330 and the contents of the bits K2-Bl are "00000" without any particular operation.
The start designation signal SSc is generated under control by a control counter 43 of an operation control circuit 40 ~Fig. 12) so that the start code SC is produced substantially regularly. The control counter 43 ~Fig. 12) is an octanary counter including three delay flip-flops DF7, DF8 and DFg corresponding respectively to each digit of a binary number of three bits, exclusive OR gates ERl, ER2 and ER3 and AND
gates A27 and A28. Since the control counter 43 is an octanary counter, counts used are eight (i.e. 0 through 7 in decimal notation~. Whether a specific count is 7 or not is detected by applying the outputs of the flip-flops DF7 - DFg to the AND
gate A29. Number 7 in decimal notation is "111" in binary nota-tion so that the output "1" of the AND gate A29 which is produced when all of the three bits are "1" represents the count 7.
cb/ - 38 -~(~91~740 When the count is 0-6 the output of the AND gate A29 is "O".
As the counting pulse for the counter 43, the starting pulse TC is utilized. If the period of the low frequency clock LC applied from outside is approximately 500 ~s, the starting pulse TC is also generated with an interval of approximately 500 ~s. This interval is about 20 times as long as that of the clock pulse ~4. The relation between the low frequency clock LC and the starting pulse TC is shown in Figs. 13~a) and 13(b). If the period of the low frequency clock LC is set at about 1 ms, the period of the starting pulse TC, i.e. the period of the driving pulse for the counter 43, is also about 1 ms.
When the count of the counter 43 is other than 7, the output of the AND gate A29 inverted by the inverter Ilo is a signal "1", and the starting pulse TC is applied to the counter 43 via the AND gate A30 and the OR gate ORlg.
The output GC of the OR gate ORlg is used as the driving pulse for the counter 43. When the count of the counter 43 is other than 7, the driving pulse GC is generated in synchroni-zation with the starting pulse TC as shown in Fig. 13(c).
The count of the counter 43 increases in response to the gener-ation of the driving pulse GC as shown in Fig. 13(d). When the count of the counter 43 is 7, the output signal "1" of the AND gate A29 is applied to the AND gate A31 while the starting pulse TC is also applied to the AND gate A31. The AND gate A31 further receives signals Ql and Q2. When the signals Ql and Q2 are both "1", the operation mode is in the stand-by mode. The output of the AND gate A31 is applied not only to the OR gate OR19 to produce the driving pulse GC, but also to the note code delivery circuit 240 (Fig. 10) as the start code designation signal SSc. Accordingly, conditions under which the start code designation cb/ 39 ~(~9~7~0 signal SSc, i.e. the start code SC, is generated are ~1) that the count of the counter 43 is 7 and ~2) that the starting pulse TC is generated in the stand-by (the fourth) mode.
As was previously described, one detection operation of all of the key switches is started by switching from the Stand-by mode to the first mode upon generation of the starting puls,e TC. Detection of all the key switches in operation is completed before a next shot of the starting pulse TC is generated and, after the operation mode enters the stand-by mode, detection of key switches in operation is started again upon generation of the next starting pulse TC. Accordingly, one detection operatian of all the key switches in operation is implemented in the interval of generation of the starting pulse TC (i.e. one period of the low frequency clock LC), and the detection of all the key switches in operation is repeat-ed in accordance with the pulse TC. However, there can be a case where one detection operation has not completed within one period of the pulse TC, if many keys are depressed simultaneously.
For example, if the detection operation has not completed at a time point tml ~Fig. 13) when the pulse TC is generated, the key detection mode is in the second or the third mode.
As a result, the AND gate A31 is not enabled and the start c,ode designation signal SSc is not generated. The driving pulse GC is not produced either so that the counter 43 maintains the count 7. If the detection operation has completed by a time point tm2 when a next shot of the starting pulse TC is generated, the start code designation signal SSc is generated as shown in Fig. 13~e) and the driving pulse GC is supplied to the counter 43.
As will be apparent from the above description, the period of generation of the start code designation signal SSc, i.e. the start code SC, is generally determined by the period of cb/ - 40 -~(39t3740 the low frequency clock LC and the number of stages of the control counter 43, but exceptionally is longer by one period of the clock LC (or two periods in an extremely rear ease).
In the case of Fig. 13, the period of generation of the start code designation signal SSc (start eode SC) is about eight times that of the period of the cloek LC and nine times in an exceptional ease. If the period of the eloek LC is 500 ~s the period of generation of the start eode SC is about 4 ms.
~he employment of the start eode is advantageous as the time dela~ from the start of key operation to the arrival of the start eode prevents the ehattering state of the key switeh from being taken out.
eb/ - 41 -
Various proposals have been made for detecting an operating state (making or breaking) of one or more key switches provided in a device such as a keyboard of an electronic musical instrument which has a large number of key switches.
There is a conventional device in which conductors are individually connected to respective key switches and outputs delivered on these conductors are individually detected. This device requires a complicated wiring and therefore is uneconomical. Besides, this device requires a large number of connection terminals for connecting such wiring to a c;rcuit utilizing the result of detection of the key switch states so that it is unsuited for a circuit design employing a semiconductor integrated circuit in which the number of connection pins available for use is limited.
There is another proposal according to which key switches are arranged in a matrix circuit so that each of these key switches will be identified by a column line (input line) and a row line (output line) on which the key switch is disposed and an operating state of each key switch is detected by sequentially scanning all of the key switches.
Such proposal is disclosed in the issued U. S. Patent No. 3,882,751. The proposed device is advantageous in that the number of conductors to be connected between the outside circuit and the key switches can be saved. This devicè, however, cb/ - 2 -~G9~7~0 has a problem that an undesirable time delay sometimes occurs between the actual making or breaking of the key switches and detection thereof because all of the key switches must be scanned one by one. Further, time required for detecting the states of all of the key switches is fixed depending upon the scanning speed so that if there are only a few key switches in operation among a large number of key switches, a substantial waste of time occurs due to the fixed time for detection. To reduce such waste of time, the rate of the clock used in the system must be increased with result-ing adverse effects on the system such as increase in the power consumption.
With a view to improving the disadvantages in the above described proposal, the applicant has proposed novel key switch detection systems in its issued U. S. Patents Nos. 3,899,951 and 4,033,221, issued August 19, 1975 and July 5, 1977, respectively. These systems basically depend upon scanning of a key switch matrix circuit to detect the operating or nonoperating state of the key switches and the improvement resides in providing a device for reducing the scanning time by scanning only necessary sections from among all the key switches. Such improvement has succeeded onlx in reduction of the scanning time, but yet the unavoid-able waste of time inherent in the scanning systems has remained unsettled. Even if the scanning SectiDn is limited only to necessary section~s) in the above scanning systems, the probability that the switches in a nonoperating state are included in the scanning section(s) is fairly high.
Accordingly, such nonoperating key switches must be equally scanned and waste of time still occurs.
cb/
~(~3~740 Furthermore, if a low rate clock is desirable in a circuit utilizing the result of detection of the key switches for reasonq of simplification of the circuit design, reduc-tion of power consumption and reduction of manufacturing costs, the above described waste of time accompanying the scanning system must be eliminated. The prior art scanning system apparently has limitations in eliminating such waste of time.
Summar of the invention y It is, therefore, an object of the invention to reduce time required for detecting the operation of the key switches to a maximum possible extent.
The invention relates to a device for detecting a key switch operation comprising: a key switch matrix circuit including a plurality of key switches arranged in rows and columns, the rows representing respective blocks of the key switches; first means for detecting simultaneously all blocks in which key switches in operation exist; second means for simultaneously detecting all columns in a single one of the detected blocks on which the key switches in operation are disposed, the column detecting being carried out for one block after another, for each of the separate blocks detected by the first means; and control means for causing the second means to implement the column detection for one block at a time with respect to each of the blocks detected by the first means; each of the key switches in operation being identified by a combination key code designating the single detected block and the column on which the key switch in operation is disposed.
EaCh of the key switches is connected at one terminal thereof (e.g. a terminal on a movable contact side) to a first detection circuit and at the other terminal thereof (e.g. a terminal on a stationary contact side) to a second detection circuit. In one detection operation mode, signals are applied mb/ 4 109~3~4~
from the first detection circuit to the second detection cir-cuit in parallel through the key switches to enable the second detection circuit to perform a necessary detection operation.
In another detection operation mode, signals are applied from the second detection circuit to the first detection circuit in parallel through the key switches to enable the first detection circuit to perform a necessary detection operation.
The operating or nonoperating state of the key switches is detected in accordance with results of the detection operation in the first and second detection circuits.
The detection operation includes storage of signals and the signals are passed through key switches in operation mb/Jk - 4a ~
~ 374~
and stored in the first or the second detection circuit.
Checking of the respective key switches is made simultaneously in parallel and only signals having passed through the key switches in operation are stored in the first or the second detection circuit. If the object of detection is making of a key switch "the key switch in operation" means a key switch which is ON and if the object of detection is breaking of a key switch, "the key switch in operation" means a key switch is OFF.
Describing the basic concept of the present invention more specifically, a number of key switches are divided into blocks and block codes ~block identifying codes) are assigned to the respective blocks for identifying each block, whereas note codes (note identifying codes) are assigned to the res-pective key switches in each block for identifying each key switch. A common note code is assigned to key switches of the same note regardless of blocks to which the key switches belong.
The key switches can be individually identified by key codes ~hich are combinations of the block codes and the note codes.
The kex switches of the same note are commonly connected at one terminal thereof to constitute respective note lines which in turn are connected to a note detection circuit (i.e. the first detection cîrcuit) while the key switches of the same block are commonly connected at the other terminal thereof to con-stitute respective block lines which are connected to a block detection circuit ~i.e. the second detection circuit).
Brief description of the drawin s g Figs. 1 and 2 a~e block diagrams schematically showing the basic construction of the device according to the invention;
Fig. 3 is a block diagram showing an embodiment~of the invention in connection with a key switch circuit and a note cb/ 5 ;IL~9~3~740 detection circuit;
Figs. 4(a) and 4(b) are block diagrams showing the same embodiment in connection with a block detection circuit;
Fig. 5 is a diagram showing how each key switch is identified by a block and a note;
Fig. 6 is a diagram illustrating symbols used for designating logical circuits;
Fig. 7 is a block diagram showing an example of a device for generating mode signals designating various detection operation modes;
Figs. 8(a) through 8(n) are timing charts for explain-ing operations of the component parts shown in Figs. 3 and 4;
Fig.9 is a schematic block diagram showing another embodiment of the invention in connection with a key switch circuit;
Fig. 10 is a schematic block diagram showing still another embodiment of the invention in connection with a key switch circuit;
Fig. 11 is a block diagram showing a different example of the note detection circuit producing a start code;
Fig. 12 is a block diagram showing an operation control circuit relating to the modified embodiment; and Fig. 13~a) through 13(e) are timing charts for explain-ing production of control pulses used in the circuit shown in Fig. 12.
Description of Preferred Embodiments -As shown in Fig. 1, conductors nl - nn (note lines) representing respective notes are connected to terminals la (movable contacts) disposed on one side of each key switch in a key switch group 1, whereas conductors bl - bm (biock lines) representing respective blocks are connected to terminals lb (stationary contacts) disposed on the other side of each key b/ - 6 -~G9~7~0 switch in the key switch group 1. The conductors nl - nn are connected to a note detection circuit 2 and the conductors bl-bm to a block detection circuit 3. Accordingly, the total number of the conductors connected to the key switch group 1 is much less than the total number of the key switches. If the total number of the key switches in the present embodiment is rep-resented by n x m, the total number of the conductors required is only n + m.
Detection of all of the key switches is completed by implementation of several different detection operation modes (hereinafter briefly referred to as "operation mode" or "mode").
In the first one of these modes, a signal is supplied from a signal source 21 of the note detection circuit 2 to all the key switches in parallel via the conductors nl - nn. The signal is passed only through the closed contact of the key switch or key switches in operation to a corresponding one of the conductors bl - bm. The detected signal ~i.e. from which conductor~s) the signal~s) are delivered) is stored in a block memory 31 of the block detection circuit 3~ By this arrangement, the block or blocks in which the key switch or switches in operation exist are detected. The timing of the storing of the detected key switches is in synchronization with a first mode signal Sl designating the first mode.
In the second mode, a single block among the block or blocks stored in the memory 31 is extracted by a single block extraction unît 32 and thereupon a signal is applied through one of the conductors bl - bm corresponding to the extracted block to the stationary contacts of the respective key switches of the extracted block. The signal from the block detection circuit 3 is passed to one or more of the conductors nl - nn connected to the movable contacts of the respective key switches for notes covered by the extracted block and corresponding to the key switches in operation. This detected signal ~i.e. from cb/ 7 1(;~9~7~L0 which conductor(s) the signalts) are delivered) is stored in a note memory 22 of the note detection circuit 2. Accordingly, which one or ones of the key switches in the extracted block are in operation is detected. The extracting operation in the single block extraction unit 32 and the storing operation in the note memory 22 are performed in synchronization with a second mode signal S2 designating the second mode.
In the second mode, key switches which are in operation can be individually identified by combination of a single block name extracted by the single block extraction unit 32 and one or more note names stored in the note memory 22.
It will be understood from the foregoing that one feature of the present invention is the construction in which the key switches 1 are connected between the note detection circuit 2 and the block detection circuit 3 and detection of the key switches 1 in operation is made by transmitting signals in opposite directions through the key switches 1. According to the invention, the terminals la and lb of the key switches 1 are not fixedly used as either input terminals or output terminals but the input side and output side of both terminals are reversed depending upon the operation mode, i.e. whether the operation mode is the first mode or the second mode.
If a circuit (not shown) utilizing the result of detection of the key switches permits, the output of the single block extraction unit 32 and the parallel outputs of the respective notes from the note memory 22 may be directly supplied to the circuit for providing the circuit with the result of key switch detection. If there are blocks which still remain st~red in the block memory 31 without being extracted by the single block extraction unit 32, the above described second mode is repeated. More specifically, upon extraction of a certain block stored in the block memory 31 and completion cb/ - 8 -~39~74~
of the second mode for that block, another block stored in the block memory 31 is extracted in response to a next second mode signal S2 and the second mode is repeated. In this manner, the blocks to which the key switches in operation belong and which have been detected and stored in the memory 31 in the first mode are extracted one by one in response to the second mode signal S2, Thus, detection of all the key switches in operation is completed when the second mode is completed with respect to all of the Blocks stored in the memory 31.
Assuming, for example, that a pulse width of the mode signals Sl and S2 respectively is 1 clock time, detection of all of the key switches in operation is completed in only 2 clock times if the key switches in operation belong to a single block. Even if the key switches are in operation in all of the blocks, detection of all of the key switches is completed in "m + 1" clock times (e.g. 13 clock times if m = 12). In the prior art key scanning systems, time required for detection of all of thekey switches is 144 clock times in a case where n _ 12 and n = 12.
Eor convenience in the circuit utilizing the result of detection of the key switches, the stored notes in the note memory 22 should preferably be delivered out one by one in series.
Accordinq to the invention, for achieving the above objective, a third mode is provided for delivering out the note identifying signals of the key switches in operation from the note memory 22 one by one after the note identifying signals have been stored in the memory 22.
In the third mode, a single one among the notes (i.e.
note identifying signals) stored in the note memory 22`is extracted by a stored note extraction unit 23 as shown in Fig. 2 (in which like component parts are designated by the cb/
1~9~7~1~
same reference characters) and a signal representing the extracted note is applied to an encoder 24 to produce a code signal (note code NC) consisting of plural bits and represent-ing the note. The extracting operation in the extraction unit 23 is performed in synchronization with a third mode signal S3.
This third mode is repeated in response to the clock of the system until the note signals stored in the note memory 22 have all been extracted by the note extraction unit 23 and corresponding note code signals have all been delivered out.
Since the third mode is implemented only with respect to the notes stored in the note memory 22, there is no room for occurrence of waste of time. If, for example, three kinds of notes are stored in the note memory 22, the third mode concerning a certain block is completed in 3 clock times.
Completion of the third mode can be known by exhaustion of the contents stored in the note memory 22 due to extraction and, upon detection of the completion of the third mode, the mode is returned to the second mode, the single block extraction unit 32 extracting a next stored block and the note memory 22 memorizing the notes of the key switches in operation in that block. Then, the third mode is implemented again. In the third mode concerning a certain block, the signal representing the block is stored in a memory-and-encoder circuit 33 of the block detection circuit 3 whereby a code signal ~block code BC) consisting of plural bits and represent-in~ the block is produced by the circuit 33. Accordingly, the key switches in operation are detected by combinations of the block codes BC and the note codes NC which are generated in synchronization with each other. The codes of the key switches in operation are produced one by one in series.
As described above, the operation mode changes from the first mode to the second mode, third mode (or repetition cb/ - 10 -~(~9~74(~
thereof), second mode, third mode ....... When production of the key codes has been completed with respect to all of the blocks stored first in the block memory 31~i.e. when the third mode has been completed), the contents of storage in the block memory 31 have all been extracted and the operation mode now enters a fourth or stand-by mode. After detection of the stand-by mode, the operation mode returns to the first mode and the above described detection operation is repeated.
By repetition of the first to the fourth modes, detection of all of the key switches in operation is carried out from time to time.
According to the invention, not only key switches which are turned ON, but also those which are turned OFF may be detected by a construction similar to the above described one.
Such construction may be achieved, for example by inverting polarity of signals which are applied to or delivered from the detection circuit 2 and 3 through the key switch group 1, or by employing break contact type switches as the key switches.
One example o the device embodying the invention will now be described with reference to Figs. 3 through 9.
Fig. 3 shows an example of a key switch circuit 10 and a note detection circuit 20. Fig. 4 shows an example of a block detection circuit 30 connected to the key switch circuit 10 shown in Fig. 3.
A number of key switches ~S corresponding to the res-pective keys on the keyboard of the electronic musical instrument are provided in the key switch circuit 10. These key switches are commonly connected block by block with respect to the blocks Ul - U5, Ll - L5 and Pl, P2 at one input terminal thereof (stationary contact) and connected to block input-output terminals Tl through T12 via conductors (block lines) bl - bl2.
The key switches are connected at the other terminal thereof cb/ - 11 -1C3987~
(movable contact) to dodes DD and commonly connected by each note of C#, D, .... A#, B and C. Each of the commonly connected key switch groups is connected to corresponding one of note input-output terminals Hl - Hl2 via conductors (note lines) nl - nl2.
In the present embodiment, the key switches are divided by blocks according to octave ranges of the keyboard so that the notes in each block literally express the actual note names of the keys. Let us assume that, as shownin Fig. 5, twelve keys of C# ~ C are assigned to one octave range from the lowest note side and that the upper keyboard UK comprises 61 keys of a note C of 0th octave through a note C of the fifth octave, the lower keyboard LK comprises 61 keys in the same manner and the pedal keyboard PK comprises 25 keys of a note C of the 0th octave through a note C of the second octave.
Accordingly, the blocks Ul - U5 are assigned to the octave ranges of the upper keyboard UK, the blocks Ll - L5 to the actave ranges of the lower keyboard LK and the blocks Pl, P2 to the octave ranges of the pedal keyboard PK, res-pectively. Consequently, the notes C# - C in each of the blocks correspond to the note names in the respective octave ranges. In Fig. 3, connections of the key switches are shown in detail with respect only to the block U5 (i.e. key switches for the fifth octave of the upper keyboard UK) and the block Pl (i.e. key switches for the 0th and the first octave of the pedal keyboard PK). The key switches of the other blocks U4 -P2 are likewise connected to the respective conductors nl - nl2 for the respective notes C, B, A# ...., C# and also to con-ductors b2 ~ bll corresponding to these blocks. As will be appar-ent from Fig. 5, since the 0th octave includes only one note of C, the note C of the 0th octave (designated here as Co) is incorporated in the blocks Ul, Ll and Pl for the first octave. Accordingly, a key switch of the note Co is additionally cb/ - 12 -~9~74~
included in each of the blocks Ul, Ll and Pl. The key switches of the note Co are commonly connected and further connected to a note input-output terminal H13 through a conductor nl3 so that the note Co can be distinguished from the note C.
Since the keyboard portion (the key switch circuit 10) is spaced away from the electric circuit portion (the detection circuits 20, 30), relatively long wiring is required for the 1 13 and bl - bl2 connecting the key switch circuit 10 to the note detection circuit 20 and the block detection circuit 30, and conductor capacitances Cb, Cn are obsexved. For convenience of explanation, conductor capacitance on the block side conductors bl - bl2 is all designated by the same reference character Cb and conductor capacitance on the note side conductors nl - n13 is all designated by reference characters Cn. It should be noted, however, that conductor capacitance observed on one of the conductors bl - bl2 and nl - nl3 is different from one observed on another. The present embodiment is so constructed that the conductor capacitance Cb and Cn are positively utilized.
The note detection circuit 20 (Fig. 3) is composed of signal delivery circuits 21-1 through 21-13 corresponding to the signal source 21 (Figs. 1 and 2) and being provided res-pectively for the note C, B, ...... C# and Co, detected note memory circuits 22-1 through 22-13 corresponding to the note memory 22 (Figs. 1 and 2) and a note code production circuit 240 corresponding to the encoder 24 (Fig. 2). As to the res-pective circuits 21-1 through 21-13, 22-1 through 22-13 and 23-1 through 23-13, only the circuits 21-1, 22-1, 23-1, 21-13, 22-13 and 23-13 concerning the notes C and Co are illustrated in detail but the rest of the circuits are all of the same construction as these circuits concerning the notes C and Co .
c:/ - 13 -~C~9~740 The signal delivery circuits 21-1 through 21-13 are adapted to apply voltage VDD to the note input-output terminals Hl - H13 by switching of transistors TRA provided for each of the notes. The output from the note input-output terminals Hl - H13 are applied to the detected note memory circuits 22-1 through 22-13.
The block detection circuit 30 (Figs. 4(a), (b)) is composed of detected block memory circuits 31-1 through 31-12 corresponding to the block memory 31 ~Figs. 1 and 2) and being provided for the respective blocks U5, U4, ....... P2 and Pl, block priority gate circuits 32-1 through 32-12 corresponding to the single block extraction unit 32 (Figs. 1 and 2), a block code production circuit 330 corresponding to the memory-and-encoder circuit 33 (Fig. 2), a block code temporary memory circuit 331 ~Fig. 4~b~) for temporarily storing output Bl - K2 of the block code production circuit 330, a block code output gate circuit 332 (Fig. 4(b)) for delivering out the temporarily stored block codes in synchronization with the outputs of the note code production circuit 240 (Fig. 3), and signal delivery circuit 34-1 through 34-12 (Fig. 4(a)) for delivering the block signals extractedina certain priority order by the block priority gate circuits 32-1 through 32-12 to the note detection circuit 20 via the key switch circuit 10.
Only the circuits 31-1, 32-1, 34-1, 31-12, 32-12 and 34-12 concerning the blocks U5 and Pl are illustrated in detail but the circuits 31-2 through 31-11, 32-2 through 32-11 and 34-2 through 34-11 concerning the other blocks are of the same construction as the circuits concerning the blocks U5 and Pl. Although the circuits 21-1 through 21-13, 22-1 throug~
22-13, 23-1 through 23-13, 31-1 through 31-12, 32-1 through 32-12, 34-1 through 34~12 are different from each other, circuit elements (i.e. AND gates, OR gates etc.) of these cb/ - 14 -i~9~740 circuits are designated by the same reference characters irrespective of the kind of block or note so long as such circuit elements perform the same function.
Before describing about operation of the respective circuits, brief explanation will be made about symbols used in the accompanying drawings. Inverters are expressed by the symbol shown in Fig. 6(a), AND gate by the one shown in Figs. 6(b) and ~c), OR gate by the one shown in Figs. 6(d) and (e) and delay flip-flops by the one shown in Figs. 6(f).
An AND gate or OR gate with only a few input lines is rep-resented by the symbol shown in Fig. 6~b) or Fig. 6(d) and one with a relatively large number of input lines is rep-resented by the symbol shown in Fig. 6~c) or Fig. 6(e). In the s~mbol shown in Fig. 6(c) or Fig. 6(e), one input line is drawn on the input side of the AND or OR gate and signal transmission lines are drawn in such a manner that they cross the input line with each crossing point of the input line and the signal transmission line transmitting a signal to the input terminal of the AND or OR gate being marked by a circle.
Accordingly~ the logical formula of the AND gate shown in Fig. 6~c~ is X=A'B'D, whereas the logical formula of the OR
gate shown in Fig. 6~e~ is X=A+B+C.
In the embodiment shown in Figs. 3 and 4, all the key switches in operation are detected by implementation of the first to the fourth operation modes described above. The kind of the operation mode to be implemented is designated by the mode signals SO - S3. The stand-by mode signal So designates the fourth mode (stand-by mode), whereas the first through third mode signals Sl, S2, and S3 designate the first, second and third modes respectively. The minimum width of the signals SO - S3 is equal to the period of generation of the clock pulse ~A so that the whole instrument operates in cb/ - 15 -~9~740 synchronism with the clock pulse ~A.
The period of the clock pulse ~A can be determined as desired and set at 24 ~s in the present embodiment. Besides this clock pulse ~A~ a low frequency clock LC is used for determining a repetition rate of the key switch detection operation. The period of this clock LC can be determined as desired and should conveniently be 200 ~s - l ms for detection of the key switches.
Fig. 7 shows one example of a circuit for generating the mode signals SO - S3. In a clock edge detection circuit 41, the low frequency clock LC ~of a desired duty factor) is applied to a delay flip-flop DF3 for delaying it by one clock ~A~ and also to an AND gate Ag whereby the pulse rise of the low frequency clock LC is detected in synchronization with the clock pulse ~A. By this arrangement, a starting pulse ~differentiation pulse) TC having a pulse width equivalent to the period of the clock pulse ~A is produced with a period of the clock LC. Relationship between the clock pulse ~A
and the starting pulse TC is as shown in Figs. 8(a) and 8(b).
In a mode control circuit 42 in Fig. 7, the stand-by mode Signal So is produced by an AND gate A12 when inverted output signals Ql~ Q2 of delay flip-flops DF4, DF5 are both a signal "1". If the starting pulse TC is generated during presence of this stand-by mode signal So, i.e. during the stand-by mode, the output of an AND gate A14 becomes a signal "l". The signal "1" is applied to the delay flip-flop DF4 via an OR
gate OR5 and, consequently, the output Ql becomes a signal "1"
one clock (~A) later. Since the signal Q2 is still signal "1", and AND gate Alo is enabled to produce the first mode signal Sl.
Switching from the stand-by mode to the first mode is thus controlled by the starting pulse TC.
The operation of the embodiment shown in Figs. 3 and 4 cb/ - 16 -1~39~74~3 will now be described with reference also to Figs. 7 and 8.
In the stand-by mode shown by period tl in Fig. 8, the stand-by mode signal SO (Fig. 8(c)) is applied to the signal delivery circuits 34-1 through 34-12 of the block detection circuit (Fig. 4~a)) and thereby brings the transis-tors TRB of the circuits 34-1 through 34-12 into conduction.
As a result, wiring capacitance Cb of the block conductors bl - bl2 is discharged.
As the first mode signal Sl is produced at the period t2 ~Fig. 8(d)), the signal Sl is applied to the signal delivery circuits 21-1 through 21-13 of the note detection circuit 20 (Fig 3~ to brlng the transistors TRA into conduction. This causes voltage VDD to be applied to the key switch circuit 10 via the terminals Hl - H13 to charge the wiring capacitance Cn of the note conductors nl - nl3. The voltage signal ti.e.
the charged voltage of the capacitance Cn) is simultaneously delivered to the conductors of one or more of the blocks tU5 -Pl) to which the key switch or switches KS in operation belong via such key switches and fed from the corresponding terminals ~Tl - T12~ to the block detection circuit 30 (Fig. 4ta)).
Accordingly, a signal "1" is produced only in the terminals among the terminals Tl - T12 corresponding to the blocks in which the key switches in operation have been detected.
In Fig. 4(a), outputs TU5 - TPl of the terminals Tl -T12 are respectively applied to the corresponding ones of the detected block rnemory circuits 31-1 through 31-12 More specifically, the signals from the terminals Tl - T12 are applied to AND gates Al of the circuits 31-1 through 31-12.
The first mode signal Sl is also applied to the AND gates Al.
Accordingly, a signal "1" is stored in a delay flip-flop DFl through the AND gate Al and an OR gate ORl only in the circuits among the circuits 31-1 through 31-12 corresponding ~/ - 17 -~9~740 to the blocks in which the key switches in operation have been detected. If, for example, the blocks in which the key switches in operation have been detected are blocks U5, U4, U3 and Pl, a signal "1" is stored in the flip-flops DFl of the circuits 31~1, 31-2, 31-3 and 31-12. The above described first mode is implemented during one clock of the period t2.
If a signal "1" is applied in the first mode to any one o~ the block memory circuits 31-1 through 31-12 from the block terminals Tl - T12, this signal is detected by an OR
gate OR7 (Fig. 4(a)) and thereupon an any-block signal As ~Fig. 8(g)) representing existence of a block with respect to which a key switch in operation has been detected. This any-block signal AB is applied to an AND gate A18 of the mode control circuit 42 in Fig. 7. Since the first mode signal S
is present at this time, the signaIs Q1 and Q2 are both "1"
- and, accordingly, the AND gate A18 is enabled and input D2 of the delay flip-flop DF5 becomes "1" through an OR gate OR6.
Since input Dl of the flip-flop DF4 at this time is a signal "0", the signal Ql and Q2 become both signal "1" at the period t3 (Fig. 8) after lapse of one clock ~A). Accordingly, an AND gate All is enabled to produce the second mode signal S2.
The delay flip-flops DFl of the detected block memory circuits 31-1 through 31-12 (Fig. 4(a)) at this time contain the signal "1" and, accordingly, a signal "1" is fed from the delay flip-flops DFl storing the signal "1" to OR circuits OR2 of the corresponding block priority gate circuits among the circuits 32-1 through 32-12. The outputs of the OR gate OR2 f each of the circuits 32-1 through 32-11 is connected to the OR gate OR2 of the circuit of an immediately subsequent priority order among the circuits 32-2 through 32-12. Consequently, if there is any one block in which a signal is stored, a signal "1" is delivered out of the OR gate OR2 f the priority gate circuit cb/ - 18 -1i~9~740 32-12 for the block Pl which is of the lowest priority order and this signal constitutes a memory block signal Ms (Fig 8(h)) representing existence of the block storing the signal. This signal MB is applied to AND gates A13, A15 and A17 of the mode control circuit 42 in Fig. 7. Accordingly, the AND gate A13 is enabled simultaneously with the generation of the second mode signal S2 and thereupon another second mode signal S2' is produced.
In the above described manner, the second mode signals S2 and S2' are generated at the period t3 and the operation mode enters the second mode.
In the second mode in which a single block is extracted from among the stored blocks, the extraction is made in a pre-determined priority order in the priority gate circuits 32-1 through 32-12 ~Fig. 4(a)). In the embodiment shown in the figure, the priority is given in the order of the blocks U5, U4 ..... L5, L4 ...... P2, P1. In the circuit 32-1 for the block U5 of the highest priority order, the output of an inverter Il is always a signal "1" so that the AND gate A3 is enabled upon receipt of the signal "1" from the flip-flop DFl of the circuit 31-1. The outputs of the flip-flops DF1 of the memory circuits 31-1 through 31-11 for the blocks U5 - P2 of higher priority orders are applied to the inverters Il and the OR gates OR2 of the circuits 32-2 through 32-12 for the blocks U4 - Pl of the lower priority order. When the signal is stored in the higher order blocks U5 - P2, a signal "O" is applied to the AND gates A3 via the inverters Il of the lower order blocks U4 - Pl for inhibiting the AND gates A3. Accordingly, a signal "1" is delivered only from the AND gate A3 of a single one of the priority gate circuits 32-1 through 32-12.
Assuming that key switches in operation have been detected in the blocks U5, U4, U3 and Pl, a signal "1" is cb/ - 19 -~39~74C~
delivered only from the AND gate A3 of the circuit 32-1 for the block U5 at the period t3. The outputs of the ~ND gates A3 of the circuits 32-2 through 32-12 for the other blocks U4 - Pl are all signal "O". The outputs of the AND gates A3 of the respective circuits 32~1 through 32-12 are applied directly to AND gates A4 and also applied to AND gates A5 after being inverted by inverters I2.
The second mode signal S2 is applied to the AND gates A4 and A5 of the priority gate circuits 32-1 through 32-12, uhereas the other second mode signals S2' is applied to the detected note memory circuits 22-1 through 22-13 of the note detection circuit 20 in Fig. 3.
Accordingly, at the period t3, the output of the AND
gate A4 of the priority gate circuit 32-1 is a signal "1"
and the outputs of the AND gates A4 of the other circuits 32-2 through 32-12 are a signal "O". Thus, the storage of the block U5 only is extracted and the extracted signal is applied to a block code delivery circuit 330 and the transistor TRC of the signal delivery circuit 34-1. The output of the AND gate A4 of the circuit 32-1 is inverted by an inverter I3 of the circuit 31-1 of the same block for inhibiting the AND circuit A2 of the circuit 31-1. The storage in the flip-flop DFl of the circuit 31-1 therefore is cleared. ~owever, the outputs of the AND gates A4 of the other circuits 32-2 through 32-12 are a signal "O", so that a signal "1" from the inverter I3 is applied to the AND gates A2 of the circuits 31-2 through 31-12 of the same block whereby the output signals of the flip-flops DFl of the respective circuit 31-2 through 31-12 are self-held. Accordingly, storage in the flip-flops DFl of the blocks U4, U3 and Pl is maintained. The output`s of the AND gates A5 of the other circuits 32-12 through 32-12 become a signal "1" which is applied to transistors TRD of the corres-ponding signal delivery circuits 34-2 through 34-12.
cb/ - 20 -7~0 In the above described manner, the transistor TRC
is brought into conduction and the transistor TRD is brought out of conduction in the signal delivery circuit 34-1 for the block U5 while the transistor TRC iS broughtout of con-duction and the transistor TRD is brought into conduction in the signal delivery circuits 34-2 through 34-12 for the blocks U4 - Pl.
Accordingly, the voltage VDD is applied to the input-output terminals T2 ~ T12 of the blocks U4 - Pl in the key switch circuit 10 (Fig. 3), thereby charging the wiring capacitance Cb of the conductors b2 ~ bl2. This causes the diodes DD provided for the key switch group KS for the blocks U4 - Pl to be reversely biased with a result that the key switches KS of the blocks U4 - Pl are electrically disconnected from the note conductors nl - nl3. On the other hand, since the potential at the input-output terminal Tl of the block U5 drops to the ground potential through the transistor TRC, capacitance Cb of the conductor bl is discharged and a signal "O" is applied to the key switch RS of the block U5.
Thus, the diode DD corresponding to the key switch in operation is brought into conduction through this diode DD. Since the re~pective key switches of the block U5 correspond to the notes C, B ....... C# and the conductor capacitance Cn of the conductors nl - nl2 for the respective notes have been charged during the first mode, the conductor capacitance Cn of the note conductors tnl - nl2) corresponding to the key switches in operation is discharged via the diode DD, the key switches, the terminal T
and the transistor TRC of the circuit 34-1. If, for instance, three key switches of the notes C, B and E are ON in the block U5, the conductor capacitance Cn of the conductors nl,`n2 and n9 for the notes C, B and E is discharged and the capacitance C of the other conductors n3 - n8, nl0 13 charged condition.
cb/ - 21 -11~9~7~1D
Consequently, a signal "o" is supplied from terminals Hl, H2 and Hg to the inverters I4 of the detected note memory circuits 22-1, 22-2 and 22-9 whereas a signal "1" is supplied 3 H8 and Hlo - H13 to the detected note memories 22-3 through 22-8 and 22-10 through 22-13. Thus, a signal "O" is delivered from the block input-output terminal Tl of the extracted block U5 to the note input-output terminals corresponding to the key switches in operation through these key switches in operation, whereby the notes of the key switches in operation are detected.
In the detected note memory circuits 22-1 through 22-13, the signals from the terminals Hl - H13 are inverted by the inverters I4 and thereafter applied to AND gates A6. The AND
gates A6 also receive the second mode signal S2' so that a signal "1" is stored in the delay flip-flops DF2 via the AND
gates A6 and the OR gates OR3 in the memory circuits 22-1, 22-2 and 22-9 corresponding respectively to the notes C, B
and E of the detected key switches in operation. In the fore going manner, the second mode is implemented during the period t3, For causing the circuits 22-1 through 22-13 to store the detected notes, the second mode signal S2' which is differ-ent from the second mode signal S2 is employed so that the detected note will be stored only when a stored block exists ~B=l) and no new storage will be made in the third mode as will be described later.
The second mode finishes in one clock. In the next period t4 (Fig. 8), a signal "1" is produced in parallel from the flip-flops DF2 of the circuits 22-1, 22-2 and 22-9 storing the detected notes and supplied to the note priority gate circuits 23-1, 23-2 and 23-9. The third mode is implemented during the period t4.
In the third mode in which a single note among the cb/ - 22 -~(;;9~740 stored notes is extracted, this extraction is effected in accordance with a predetermined priority order in the note priority gate circuits 23-1 through 23-13. In the figure, the priority in extraction is given in the order of the notes C, s, A# ....... C#, Co. As in the note priority gate circuits 23-1 through 23-12, the output of an inverter I5 in the gate circuit 23-1 for the note C of the first priority order is always signal "1", and an AND gate A8 is enabled when a Signal "1" is applied thereto from the flip-flop DF2 of the memory circuit 22-1. The outputs of the flip-flops DF2 of the higher notes C - C# are applied to the inverters I5 of the lower notes B - Co through OR gates OR4 and successively inhibit the AND gates A8 of the lower order. The outputs of the flip-flops DF2 of the respective memory circuits 22-1 through 22-13 are applied to AND gates A7 of the circuits 22-1 through 22-13 while the outputs of the flip-flops DF2 of the memory circuits 22-1 through 22-12 of the notes C - C# which are of higher priority orders are successively applied to AND gates A7 of the memory circuits 22-2 through 22-13 via the OR circuits OR4 of the circuits 22-1 through 22-12. The AND gate A7 of the memory circuit 22 - 1 of the first priority order always receiyes a signal "O" and, accordingly, the stored contents of the flip-flop DF2 of the circuit 22-1 are not self-held.
However, the stored contents of the flip-flops DF2 of the memory circuits 22-2 through 22-12 of the lower priority orders are self-held by the output signal "1" of the flip-flops DF2 of the memory circuits 22-1 through 22-12 of the higher priority orders.
Accordingly, a signal "1" is supplied from the priority gate circuit 23-1 of the note C to a note code delivery circuit 240 at the period t4. At this period, the outputs of the other circuits 23-2 through 23-13 are a signal "0". Then at c~/ - 23 -~3~7~0 a period t5 (Fig. 8), the stored contents of the circuit 22-1 are cleared so that a signal "1" is delivered from the priority gate circuit 23-2 of the note s. At a next period t6 (Fig. 8) the stored contents of the memory circuit 22-2 of the note B are cleared and, accordingly the output signal "1" of the memory circuit 22-9 for the note E storing the signal "1" is applied to the note code delivery circuit 240 via the priority gate circuit 23-9. In this manner, the third mode is successively repeated during clock periods (i.e. three clock periods t4 - t6 in the above example) corresponding to the number of the stored notes in the memory circuits 22-1 through 22-13.
Since the transistor TRA can be driven by any one of the first mode signal Sl and the third mode signal S3, the transistor TRA in the present embodiment is driven by a first and third mode signal Sl+3 which can be used both for the first mode and the third mode. Since a prerequisite for entering the third mode is that the operation mode in a preceding one clock is either the second mode or the third mode, arrangements are made so that a signal Q2 is applied to AND gates A15, A16 and A17 in the mode control circuit 42. The fact that this signal ~2 is "1" signifies that the current mode is either the second mode or the third mode. When the signal Q2 and the memory block signal MB from the OR gate OR2 ~Fig. 4(a)) are generated and any note signal AN ~Fig. 8~i~) is generated upon application to the OR gate OR8 of a signal "1" which has been applied to the flip-flops DF2 of the detected note memory circuits 22-1 through 22-13, the AND gate A15 ~Fig. 7) is enabled. The any-note signal AN represents that a signal of the detected note is to be stored in any one of the memory circuits 22-1 through 22-13 Since the AND gate A17 is enabled whenever the AND gate A15 is enabled, the input signals to the flip-flops DF4 and DF5 are both signal "1" and, accordingly, the signals c~/ - 24 -~G9~3740 Ql and ~2 become signal "1" one clock later. When the signals Ql and Q2 are both signal "1", this indicates that the third mode should be implemented ~or being implemented). If the any-note signal AN is still produced after entering the third mode, the output of the AND gate A16 is a signal "1"
and this causes the signals Dl, D2 to be "1" thereby instruct-ing that the third mode is to be continued. Since the operation mode is either the first mode or the third mode when the signal Ql is "1", this signal Ql is applied to the transistor TRA
~,F,ig. 3) as the first and third mode signal Sl + 3. If the AND gate A17 ~Fig. 7) is enabled and the AND gate A15 is not enabled, the second mode signals S2 and S2' are generated again.
When the notes stored in the detected note memory circuits 22-1 through 22-12 have all been extracted by repeti-tive implementation of the third mode during the periods t4, t5 and t6, the OR gate OR8 ~Fig. 3) produces a signal "O"
and the any-note signal AN becomes "O". This signifies that the third mode should be finished with respect to the specific block. If there remain any stored blocks (i.e. the signal MB=l) the second mode must be implemented again. Accordingly, the second mode signals S2 and S2' are produced again in accordance with the output of the AND gate A17. In the above described example, signals are still stored in the memory circuits 31-2, 31-3 and 31-12 for the blocks U4, U3 and Pl so that the second mode signals S2 and S2' are produced at a period t7 (Fig. 8).
In the second mode at the period t3, the block code delivery circuit 330 to which a signal "1" has been applied from the priority gate circuit 32-1 (Fig. 4(a)) for the block U5 produces a block code K2* ~ Bl* representing the block U5 and delivers this block code to block code temporary mèmory circuit 331 shown in Fig. 4(b). In the block code delivery circuit 330, the codes for the respective blocks U5 - P
cb/ - 25 -7~
are formed by combining codes K2, Kl representing the kind of keyboard and codes s3, s2 and sl representing the kind of octave, as shown in the following Table 1.
Table I
\ key codes .
\ Column A Column B
\ block c odes note codes \ K2 K1 B3 B2 BlN4 N3 N2 N1 ~e~d ~
block 1 O O
~c ~- 1 2 ~
D# . 0 1 0 0 ;
cb/ - 26 -- ~Ci9~3740 For example, the code for the block U5 is composed of a code "01" representing the upper keyboard U and a code "101"
representing the fifth octave. In this code, the bits Kl(Kl*), B3~B3*) and sl(Bl*) are respectively signal "l" and the bits K2(K2*) and B2(B2*~ are signal "0". In the block code delivery circuit 330 an OR gate ORg produces a signal of the bit K2*, an OR gate ORlo the bit Kl*, an OR gate ORll the bit B3*,an OR gate ORl2 the bit s2*, an OR gate ORl3 the bit Bl* respectively.
Accordingly, the output signal of the priority gate circuit 32-l for the block U5 is applied to the OR gates ORlo, OR
and ORl3 and the bits Kl*, B3* and Bl* become a signal "1".
Conse~uently, a code "01101" is produced as the block code K2*, Kl*, B3*, B2*, and Bl* representing the block U5.
In Fig. 4~b), the block code temporary memory circuit 331 has memory circuits 331a - 331e for the respective bits K2* ~ Bl* of the block code. In the figure, only the memory circuit 331a for the bit K2* is shown in detail but the other memory circuits 331b - 331e for the other bits Kl* - Bl* are o~ the same construction as the memory circuit 331a. At the period t3, the block code delivered from the block code delivery circuit 330 is applied to the memory circuits 331a - 331e, each of the signals representing the bits K2* ~ Bl* being applied to its corresponding memory circuit. In the memory circuits 331a - 331e, the block code is stored in delay flip-flops DF6 via the OR gates ORl4. The stored signal in the flip-flops DF6 if produced one clock later, i.e. at the period t4 and is applied to a block code output gate circuit 332 and also self-held at the flip-flop DF6 via the OR gate ORl4. More specifically, since an AND gate Al9 receives a stand-by mode and second mode signal S0+2 through the inverter I6 and this signal S0+2 is a signal "O" in the operation modes other than the stand-by or the second mode, i.e. in the first cb/ - 27 -~9~74(~
or the third mode, an inverted signal is "1" during the periods t4, t5 and t6 and, accordingly, the AND gate Alg is enabled and the contents of the flip-flops DF6 are self-held. The signal Ql provided by the mode control circuit 42 ~Fig. 7) is utilized as the signal S0+2 because the signal Ql is "O" in the first or the third mode whereas it is "1" in the second or the stand-by mode.
In the foregoing manner, the block code X2* - Bl*
delivered from the block code delivery circuit 330 in the second mode at the period t3 as shown in Fig. 8(j) is held in the block code temporary memor~ circuit 331 as shown in Fig.
8 ~) in the third mode ranging over the periods t4 - t6. At the period t7 at which the operation mode is back in the second mode, the block code of the block U5 which has been delayed by one clock by the flip-flops DF6 of the memory circuit 331 is delivered by the circuit 331 but this block code is prevented by a block code output gate circuit 332 ~Fig. 4~b)).
The outputs of the temporary memory circuit 331a - 331e storing the signals of the respective bits of the block code are supplied to AND gates A20 - A24 in the block code output gate circuit 332. The AND gates A20 - A24 receive also a stored-note signal MN supplied from the note detection circuit 20 ~Fig. 3~, so that the AND gates are enabled in synchronization ~lth delivery of a note code. The stored-note signal MN is deliyered from the OR gate OR4 of the priority gate circuit 23-13 (Fig. 3~ for the note Co of the lowest priority order.
In the third mode, the signal MN ~Fig. 8(Q)) is produced every time the signal "1" is supplied from the flip-flops DF2 f the detected note memory circuit 22-1 through 22-13 to a note code delivery circuit 240 via the priority gate circuits 23-1 through 23-13.
The note code delivery circuit 240 in Fig. 3 is provided cb/ - 28 -17g'0 for generating codes representing note names each of which consists of a plurality of bits N4, N3, N2 and Nl. Each note C$, D ... . E, C is codified as shown in the column B
of the Table 1. In the note code delivery circuit 240, the outputs of OR gates OR15~ R16' OR17 and OR18 $ignals for the bits N4, N3, N2 and Nl. The outputs of the priority gate circuits 23-1 through 23-13 corresponding to the respective notes are applied to the OR gates OR15 - OR18 in accordance with the contents of the column B in Table 1.
Accordingly, contents of the note code N4, N3, N2, Nl delivered from the circuit 240 in the third mode are "1110" representing the note C at the period t4, "1101" representing the note B
at the period t5 and "0100" representing the note E at the period t6. These note codes are sequentially delivered out as shown in Fig. 8~m). The stored-note signal MN is also produced in synchronization with the note code as shown in Fig. 8 ~Q).
Accordingly, the AND gates A20 - A24 of the block code output gate circuit 332 ~Fig. 4~b)) are enabled only during the third mode ~i.e. periods t4 - t6) to continuously produce K2, Kl, B3, B2, Bl for the block U5 as shown in Fig. 8~n). Simultaneously, the note codes N4, N3, N2, Nl for the notes C, B and E are sequentially produced. The key switches in operation in the key switch circuit 10 can be detected by key codes which are combinations of the block code K2 ~ Bl and the note code N4 - Nl. Thus, the key codes rep-resenting the key switches in operation are utilized in a circuit (not shown) requiring such key codes.
In the above described manner, detection of the key switches in one block is completed by the repetitive imple-mentation of the third mode and only the key codes K2 ~ Nl of the key switches in operation are successively provided in series without wasting time.
cb/ - 29 -~98740 The lowest key for the O octave in the column s of Table I is included in the first octave for convenience of actual wiring arrangements of the key switches. The block code portion B3, B2, sl for the lowest key for the O octave there-fore must be provided as "O, O, O" as shown in Table I. For this purpose, a signal CoS representingthe note C of the 0th octave is applied thro~gh an inverter I17 to the third input terminal of an AND gate A24 corresponding to the bit B in the block code output gate circuit 332 ~Fig. 4Ib)). The signal CoS is the output of the note Co from the priority gate circuit 23-13 tFig. 3) and signifies that the note code for the note Co has been produced when the output of the circuit 23-13 is a ~ignal "1". Accordingly, the AND gate A24 of the circuit 332 is inhibited by application thereto of the signal CoS and the bit Bl becomes "O". The code of the O octave is thereby produced. When the note Co is not extracted, the output of the inverter I7 is a signal "1" and the AND gate A24 is not inhibited.
In case this embodiment is utilized for an electronic musical instrument, the AND A25 which receives the outputs of the block code temporary memory circuits 331a, 331b (Fig. 4(b)), i.e. the keyboard codes K2, Xl, is utilized for producing a single pedal keyboard tone. The AND gate A25 detects the code "11" which is the code K2, Kl of the pedal keyboard P and supplies a pedal keyboard detection signal PC representing that the detected block belongs to the pedal keyboard to the detected note memory circuits 22-1 through 22-13 of the detection circuit 20 (Fig. 3). This signal PC is inverted by an inverter I8 and the inverted signal "o" is used for inhibiting the AND gate A7 of the memory circuits 22-l~through 22-13. Accordingly, the flip-flops DF2 of the memory circuits 22-1 through 22-13 do not perform self-holding so that the notes ~9~37~0 of the key switches in operation of the pedal keyboard block detected in the second mode are stored only for one clock time and only a single note of the first priority order among the stored notes is extracted. Accordingly, the third mode lasts only during one clock time in the case of the pedal key-board. If the block is for a keyboard other than the pedal keyboard, the signal PC is "O" and the output of the inverter I8 is a signal "1" so that the AND gate A7 is not inhibited.
The present embodiment in which the pedal keyboard P is divided into the t~o blocks Pl and P2 has a function of giving a priority to the block P2 in the production of a single pedal tone. In the block detection circuit 30 in Fig. 4(a), a signal TP2 from the input-output terminal Tll is applied to the memory circuit 31~11 of the block P2 and also to an AND gate A26 through an inverter Ig for inhibiting the AND gate A26. The AND gate A26 also receives a signal TPl from the input-output terminal T12 o~ the block Pl and delivers this signal TPl to the memory circuit 31-12 of the block Pl only when the AND gate A26 is not inhibited. By virtue of this arrangement a detection signal is stored only in the memory circuit 31-11 of the block P2 even in a case wherein a key switch in operation has been detected in both the block Pl and the block P2 in the first mode. Consequently, the second mode is not implemented with respect to the block Pl.
At the period t7, the second mode signals S2, S2' are produced again as was previously described. Since the contents of storage in the memory circuit 31-1 ~Fig. 4(a)) for the block U5 have already become "O", the stored signal "1"
in the memory circuit 31-2 for the block U4 is extracted by the priority gate circuit 32-2 and a signal "1" is provided by the AND gate A4 of the circuit 32-2. Thus, the second mode is implemented with respect to the block U4 at the period cb/ - 31 -37~0 t7 in the same manner as at the period t3. At a next clock period t8 ~Fig. 8), the third mode is implemented with respect to the detected note of the block U4. Assume, for instance, that the key switches for the notes s and A in the block U4 the key switch for the note E in the block U3 and the key switch for the note E in the block Pl are ON, the respective component parts shown in Figs. 3 and 7 operate in the same manner as in the above described case of the block U5 to pro-duce the signals shown in Fig. 8. Then the second and the third modes are repeated and detection of all the key switches in operation is completed at a period tl3. More specifically, the codes N4 - Nl for the notes B and A are produced with the code K2 ~ Bl for the block U4 as shown in Figs. 8(m) and 8~n~. Subsequently, the code N4 - Nl for the note E is produced with the code K2 ~ Bl for the block U3 and the code N4 - Nl for the note E with the code K2 ~ Bl for the block Pl. Accord-ing to Fig. 8, the starting pulse TC is produced by the clock edge detection circuit 41 shown in Fig. 7. Since, however, the operation mode at this time is the third mode, the outputs Ql' Q2 of the flip-flop DF4, DF5 of the mode control circuit 42 are both signal "1" and the signal Ql' Q2 are both "O"
so that the pulse TC is ignored.
At the period tl3, the stored signalsin the block memory circuits 31-1 through 31-12 have all been exhausted and the stored block signal MB has therefore become "O". Besides, the stored signals in the note memory circuits 22-1 through 22-13 have all been extracted and the any-note signal AN has become "O". Accordingly, the outputs of the AND gates A14 - A18 of the mode control circuit 42 become "O" and the inputs Dl, D2 of the flip-flops DF4 and DF5 become "O". Thus, thè
- signals Ql' Q2 become "1" at a next clock period tl4 causing the AND gate A12 to produce the stand-by mode signal SO.
cb/ - 32 -1~9~3740 The operation mode therefore enters the stand-by, i.e. the fourth, mode.
If the starting pulse TC is produced in this stand-by mode, the first mode signal S1 is produced one clock later in the same manner as has previously been described ~simul-taneously with the first and third mode signal Sl+3). Accord-ingly, the first mode is implemented again and then the second and third modes are repeated. In the foregoing manner, the key codes K2, Rl, B3, ---- N4, --- Nl are successively deliver-ed from the note code delivery circuit 240 of the note detection circuit 20 and the block code output gate circuit 332 of the block detection circuit 30. The period of the low fre-quency clock LC ¢or pulse TC~ determines starting of a series of detection operation. If the detection operation prolongs exceeding the period of the clock LC, the repetitive operation is conducted by a period which is an integer multiple of the period of the clock LC.
In the above described embodiment, the voltage VDD
from the circuits 21-1 through Zl-13 of the note detection circuit 20 and the circuits 34-1 through 34-12 of the block detection circuit 30 or ground potential is applied to the conductor capacitances Cb~ Cn of the key switch circuit 10 only for a short time during which such voltage is required to charge or discharge the conductor capacitances Cb, C .
Consequently, in the key switch circuit 10 and other circuits 22-1 through 22-13, power is consumed only transiently and not constantly. This reduction in power consumption is very adyantageous in the circuit design. The invention, however, is not limited to the above embodiment but may be applied to a case wherein no conductor capacitances Cb, Cn are used.
One such example will be described below.
Fig. 9 shows another embodiment of the invention in cb/
~9~740 connection with the key switch circuit 10. In Fig. 9, illus-tration of circuits other than signal delivery circuits 21'-1 through 21' - 13 of the note detection circuit 20 and circuits 34'-1 through 34'-12 of the block detection circuit 30 is omitted because these omitted circuits are of the same con~
struction as those shown in Figs. 3 and 4. Referring to the signal delivery circuits 21'-1 through 21'-13 of the note detection circuit 20, the voltage VDD is constantly applied through resistors RR to note input-output terminals Hl-H13 of the key switch circuit 10 and also to inverters I4 of the detected note memory circuits 22-1 through 22-13. Accordingly, a signal "1" is constantly derived through note terminals Hl -H13, note conductors nl - nl3, diodes DD, key switches in operation, block conductors bl - bl2 of the blocks to which the key switches in operation belong and block input-output terminals Tl - T12, and signals TU5 - TPl tsignal 1 ) of the blocks in which the key switches in operation have been found are supplied to AND gates Al of the detected block memory circuits 31-1 through 31-12 ~Fig. 4(a)). As the first mode is implemented upon generation of the first mode signal Sl, the detected blocks are stored in the corresponding memory circuits 31 - 1 through 31 - 12 tFig. 4~a)). Then the opera-tion mode enters the second mode and signals of the blocks extracted by the block priority gate circuits 32-1 through 32-12 tFig. 4~a)~ with a certain order of priority are applied to transistors TRC of corresponding signal delivery circuits 34' -1 through 34' - 12 tFig. 9) thereby enabling these tran-sistors TRC. The circuit between one of the circuits 21' - 1 through 21' - 13 corresponding to the note of the key switch in operation and the grounded transistor TRC which is now ON
conducts through one of the terminals Tl - T12 for the block in which the transistor TRC is ON, a corresponding one of the block conductors bl - bl2, the key switch in operation of the cb/
~3~3740 block and diode DD, one of the note conductors nl-nl3 correspond-ing to the key switch in operation and a corresponding one of the note terminals Hl-H13. As the circuit conducts, a signal "o" is applied to the inverter I4 of the note memory circuit corresponding to the key switch in operation. The note of the key switch in operat;on thereby is detected and stored in one of the memory circuits 22-1 through 22-13, and the second mode is implemented. According to this embodiment, a constant power is used so that the transistors TRA and TRB for charging ~d discharging the conductor capacitances Cb, Cn are not required.
The foregoing description has been made with regard to a case where the present invention is applied to detection of the depressed key on the keyboard of an electric musical instrument.
Accordingly, a circuit utilizing thekey code K2-Nl composed of the block code and the note code provided by the note detection circuit 20 and the block detection circuit 30 is one which pro-duces a musical tone signal of a pitch designated by the detected kex code and as well as controls its tone colour and volume.
It should be noted, however, that the invention can be applied not only to an electronic musical instrument but also to an apparatus such as an input device of a computer in which many switches are employed for efficiently detecting operation of the switches without wasting time.
In the embodiment shown in Figs. 3 and Fig. 4(a), the capacitance Cn on the note side is charged in the first mode and the capacitance Cn corresponding to the key switch in operation is discharged in the second mode. The construction may be modified so that the capacitance Cn is discharged in the first mode. In this case, the signal delivery circuits 21-1 through 21-13 and 34-1 through 34-12 on the note ahd block sides must be modified to some extent.
Fig. 10 shows an example of such modified signal cb/ 35 ~591~740 delivery circuits. Transistors TRAI of signal delivery cir-cuits 21-1 through 21-13 on the note side are grounded and a first mode signal Sl (Sl+s) is applied to these transistors TRA' Transistors TRB' of signal delivery circuits 34-1 through 34-12 on the block side are connected to a power source VDD and a stand-by mode signal So is applied to these transistors TRB ' . Diodes DD are connected in a reverse direction to the embodiment shown in Fig. 3.
When the stand-by mode signal So is generated, voltage VDD is applied to block terminals Tl-T12 through the transistors TRB' thereby charging conductor capacitances Cbl - Cbl2 on the block side. Then the first mode signal Sl is generated and the transistors TRA' are brought into conduction thereby dis-charging conductor capacitance Cn on the note side. In response to this discharging, conductor capacitance (Cbl - Cbl2~ corres-ponding to the block including the key switch in operation is disch~rged. The block including the key switch in operation is detected by this discharging of the conductor capacitance.
In the detected block, a signal "O" is produced from a corres-ponding one of the terminals Tl - T12. This signal is inverted t~ "1" by an inverter lN and thereafter is applied to the detected block memory circuits 31-1 through 31-12.
In the second mode, a transistor TRC ' of one of the signal delivery circuit 34-1 through 34-12 corresponding to the single block extracted by the priority gate circuits 32-1 through 34-12 is brought into conduction and a single conductor capacitance (one of Cbl - Cbl2) corresponding to the specific block is charged. In the signal delivery circuits for the rest of the blocks transistors TRD' are brought into conduction and the rest of the conductor capacitance are all discharged.
Accordingly, a signal is delivered to the note conductors nl - nl3 through the key switch in operation in the single cb/ - 36 -~9~7~0 detected block and one of the conductor capacitances Cnl - Cnl3 corresponding to the key switch in operation is charged. Thus, the note of the key switch in operation is detected. Since a signal "1" is produced from one of terminals Hl - H13 corres-pondin~ to the detected note, the inverter I4 as shown in Fig. 2 is not required in the detected note memory circuits 22-1 through 22-13 but the output from the terminals Hl - H12 is directly ap~lied to an AND gate A6.
Even if there is a leakage resistance in the key switch circuit 10, such a leakage resistance in no way affects the operation of the circuit according to the invention. For example, if the leakage resistance is in the order of 1 MQ, and each of capacitance elements Cnl - Cn and Cbl - Cbm is about 1 nF, time constant is 1 nF x 1 M Q = lms which is sufficiently large against the frequency of the clock ~A
~about 24 ~s in the above example) so that the leakage resist-ance exercises no adverse effect to the capacitance elements.
The foregoing description has been made with respect to the example in which only key codes of keys in operation are generated. A modified embodiment of the invention in which a start code is produced in the interval of generation of the key code will now be described. The start code is a code which is clearly distinguishable from thekey code and used for detecting a key-off state.
The present embodiment is different from the previously described one in that the circuit shownin Fig. 3 is substituted by a circuit shown in Fig. 11 and that the mode signal genera-tion circuit shown in Fig. 7 is substituted by a mode signal generation circuit shown in Fig. 12. The circuit of Fig. 11 is different from the circuit of Fig. 3 in that a signal SSc is applied to OR gates OR15 - OR18 and is the same as the circuit of Fig. 3 in other respects. Description will therefore cb/ 37 1~98740 be made about the different construction particularly about generatiOn of the start code. The start code SC is produced upon application of a start code designation signal SSc to a note code delivery circuit 240 (Fig. 11). The start code designation signal SSc is applied to all of OR gates OR15, OR16, OR17 and OR18 of the note code delivery circuit 240 so that respective bits N4, N3, N2, Nl become "1". Contents of the respective bits K2, Kl, K3, B2, Bl, N4, N3, N2, Nl of the start code SC are "000001111". The contents of the start code SC are clearly distinguishable from the contents of the key code KC for the detected key switch in operation.
The start code designation signal SSc is generated in the stand-by mode as will be described later and, accordingly, the key code KC is never produced concurrently with the start code SC and the bits K2, Kl, B3, B2, Bl at this time are all "0".
Accordingly, the start code designation signal SSc need not he applied to a block code delivery circuit 330 and the contents of the bits K2-Bl are "00000" without any particular operation.
The start designation signal SSc is generated under control by a control counter 43 of an operation control circuit 40 ~Fig. 12) so that the start code SC is produced substantially regularly. The control counter 43 ~Fig. 12) is an octanary counter including three delay flip-flops DF7, DF8 and DFg corresponding respectively to each digit of a binary number of three bits, exclusive OR gates ERl, ER2 and ER3 and AND
gates A27 and A28. Since the control counter 43 is an octanary counter, counts used are eight (i.e. 0 through 7 in decimal notation~. Whether a specific count is 7 or not is detected by applying the outputs of the flip-flops DF7 - DFg to the AND
gate A29. Number 7 in decimal notation is "111" in binary nota-tion so that the output "1" of the AND gate A29 which is produced when all of the three bits are "1" represents the count 7.
cb/ - 38 -~(~91~740 When the count is 0-6 the output of the AND gate A29 is "O".
As the counting pulse for the counter 43, the starting pulse TC is utilized. If the period of the low frequency clock LC applied from outside is approximately 500 ~s, the starting pulse TC is also generated with an interval of approximately 500 ~s. This interval is about 20 times as long as that of the clock pulse ~4. The relation between the low frequency clock LC and the starting pulse TC is shown in Figs. 13~a) and 13(b). If the period of the low frequency clock LC is set at about 1 ms, the period of the starting pulse TC, i.e. the period of the driving pulse for the counter 43, is also about 1 ms.
When the count of the counter 43 is other than 7, the output of the AND gate A29 inverted by the inverter Ilo is a signal "1", and the starting pulse TC is applied to the counter 43 via the AND gate A30 and the OR gate ORlg.
The output GC of the OR gate ORlg is used as the driving pulse for the counter 43. When the count of the counter 43 is other than 7, the driving pulse GC is generated in synchroni-zation with the starting pulse TC as shown in Fig. 13(c).
The count of the counter 43 increases in response to the gener-ation of the driving pulse GC as shown in Fig. 13(d). When the count of the counter 43 is 7, the output signal "1" of the AND gate A29 is applied to the AND gate A31 while the starting pulse TC is also applied to the AND gate A31. The AND gate A31 further receives signals Ql and Q2. When the signals Ql and Q2 are both "1", the operation mode is in the stand-by mode. The output of the AND gate A31 is applied not only to the OR gate OR19 to produce the driving pulse GC, but also to the note code delivery circuit 240 (Fig. 10) as the start code designation signal SSc. Accordingly, conditions under which the start code designation cb/ 39 ~(~9~7~0 signal SSc, i.e. the start code SC, is generated are ~1) that the count of the counter 43 is 7 and ~2) that the starting pulse TC is generated in the stand-by (the fourth) mode.
As was previously described, one detection operation of all of the key switches is started by switching from the Stand-by mode to the first mode upon generation of the starting puls,e TC. Detection of all the key switches in operation is completed before a next shot of the starting pulse TC is generated and, after the operation mode enters the stand-by mode, detection of key switches in operation is started again upon generation of the next starting pulse TC. Accordingly, one detection operatian of all the key switches in operation is implemented in the interval of generation of the starting pulse TC (i.e. one period of the low frequency clock LC), and the detection of all the key switches in operation is repeat-ed in accordance with the pulse TC. However, there can be a case where one detection operation has not completed within one period of the pulse TC, if many keys are depressed simultaneously.
For example, if the detection operation has not completed at a time point tml ~Fig. 13) when the pulse TC is generated, the key detection mode is in the second or the third mode.
As a result, the AND gate A31 is not enabled and the start c,ode designation signal SSc is not generated. The driving pulse GC is not produced either so that the counter 43 maintains the count 7. If the detection operation has completed by a time point tm2 when a next shot of the starting pulse TC is generated, the start code designation signal SSc is generated as shown in Fig. 13~e) and the driving pulse GC is supplied to the counter 43.
As will be apparent from the above description, the period of generation of the start code designation signal SSc, i.e. the start code SC, is generally determined by the period of cb/ - 40 -~(39t3740 the low frequency clock LC and the number of stages of the control counter 43, but exceptionally is longer by one period of the clock LC (or two periods in an extremely rear ease).
In the case of Fig. 13, the period of generation of the start code designation signal SSc (start eode SC) is about eight times that of the period of the cloek LC and nine times in an exceptional ease. If the period of the eloek LC is 500 ~s the period of generation of the start eode SC is about 4 ms.
~he employment of the start eode is advantageous as the time dela~ from the start of key operation to the arrival of the start eode prevents the ehattering state of the key switeh from being taken out.
eb/ - 41 -
Claims (7)
OR PRIVILEGE IS CLAIMED ARE DEFINED AS FOLLOWS:
1. A device for detecting a key switch operation comprising:
a key switch matrix circuit including a plurality of key switches arranged in rows and columns each connected via a unidirectional element between row conductors and column conductors, said rows representing respective blocks of the key switches;
first means for detecting simultaneously all blocks in which key switches in operation exist;
second means for simultaneously detecting all columns in a single one of said detected blocks on which the key switches in operation are disposed, said column detecting being carried out for one block after another, for each of the separate blocks detected by said first means; and control means for causing said second means to implement the column detection for one block at a time with respect to each of the blocks detected by said first means;
each of said key switches in operation being identi-fied by a combination key code designating the single detected block and the column on which said key switch in operation is disposed.
a key switch matrix circuit including a plurality of key switches arranged in rows and columns each connected via a unidirectional element between row conductors and column conductors, said rows representing respective blocks of the key switches;
first means for detecting simultaneously all blocks in which key switches in operation exist;
second means for simultaneously detecting all columns in a single one of said detected blocks on which the key switches in operation are disposed, said column detecting being carried out for one block after another, for each of the separate blocks detected by said first means; and control means for causing said second means to implement the column detection for one block at a time with respect to each of the blocks detected by said first means;
each of said key switches in operation being identi-fied by a combination key code designating the single detected block and the column on which said key switch in operation is disposed.
2. A device for detecting a key switch operation as defined in claim 1 which further comprises:
third means including block memory means for storing signals indicative of the blocks detected by said first means, and block extraction means for extracting one by one in sequence the detected block-indicative signals stored in said block memory means; and fourth means including note memory means for temporarily storing signals indicating the columns which contain key switches in operation in each block detected by said second means, and column extraction means for extracting the temporarily stored column indicating signals one by one in sequence;
whereby the key switches in operation are detected one by one in sequence.
third means including block memory means for storing signals indicative of the blocks detected by said first means, and block extraction means for extracting one by one in sequence the detected block-indicative signals stored in said block memory means; and fourth means including note memory means for temporarily storing signals indicating the columns which contain key switches in operation in each block detected by said second means, and column extraction means for extracting the temporarily stored column indicating signals one by one in sequence;
whereby the key switches in operation are detected one by one in sequence.
3. A device for detecting a key switch operation as defined in claim 2 which further comprises:
means for producing block code signals representing the blocks extracted by said block extraction means; and means for producing note code signals representing the columns of the key switches in operation extracted by said column extraction means;
whereby key codes identifying the key switches in operation are sequentially produced by said means for producing block and note codes.
means for producing block code signals representing the blocks extracted by said block extraction means; and means for producing note code signals representing the columns of the key switches in operation extracted by said column extraction means;
whereby key codes identifying the key switches in operation are sequentially produced by said means for producing block and note codes.
4. A device for detecting a key switch operation as defined in claim 3 wherein said first means comprises:
a first signal delivery circuit for supplying signals to said matrix circuit in parallel via conductors corresponding to columns, said supplied signals passing through the respective key switches in operation and leaving the matrix circuit via conductors corresponding to the blocks; and a block detection circuit responsive to the signals supplied by said first signal delivery circuit for simultane-ously detecting in a certain period of time all the blocks in which the key switches in operation exist;
wherein said second means comprises:
a second signal delivery circuit for supplying a signal to said matrix circuit via the conductor corresponding to a single one of the detected blocks, said signal going through the operated key switches in said single block and leaving the matrix circuit in parallel via the conductors corresponding to rows containing operated key switches in that single block; and a column detection circuit responsive to the signals supplied by said second signal delivery circuit for simultaneously detecting all notes of the key switches in operation in said single block, said fourth means being connected to said column detection circuit;
wherein said third means comprises a circuit for operating said second signal delivery circuit every time one of the blocks is extracted; and wherein said control means comprises a control circuit which performs the control operation in such a manner that whenever said column extraction means has completed extraction of all column indicating signals of one block, said block detection circuit extracts a next block.
a first signal delivery circuit for supplying signals to said matrix circuit in parallel via conductors corresponding to columns, said supplied signals passing through the respective key switches in operation and leaving the matrix circuit via conductors corresponding to the blocks; and a block detection circuit responsive to the signals supplied by said first signal delivery circuit for simultane-ously detecting in a certain period of time all the blocks in which the key switches in operation exist;
wherein said second means comprises:
a second signal delivery circuit for supplying a signal to said matrix circuit via the conductor corresponding to a single one of the detected blocks, said signal going through the operated key switches in said single block and leaving the matrix circuit in parallel via the conductors corresponding to rows containing operated key switches in that single block; and a column detection circuit responsive to the signals supplied by said second signal delivery circuit for simultaneously detecting all notes of the key switches in operation in said single block, said fourth means being connected to said column detection circuit;
wherein said third means comprises a circuit for operating said second signal delivery circuit every time one of the blocks is extracted; and wherein said control means comprises a control circuit which performs the control operation in such a manner that whenever said column extraction means has completed extraction of all column indicating signals of one block, said block detection circuit extracts a next block.
5. A device for detecting a key switch operation as defined in claim 1 which further comprises means for producing a finish signal when detection of all of the key switches in operation has been finished.
6. A device for detecting a key switch operation as defined in claim 1 which further comprises:
first capacitance means provided between each row conductor and ground;
first voltage applying means connected to said first capacitance means to apply thereto a first level voltage which would forward bias said unidirectional elements for a first predetermined period as preparation for the block detection;
second capacitance means provided between each column conductor and ground; and second voltage applying means connected to said column conductors to apply thereto a second level voltage which would forward bias said unidirectional elements for a second predetermined period so that the voltage of such row conductor that is connected to key switches in operation is changed from said first level voltage to said second level voltage, and this change being detected by said first means;
said second level voltage being applied also to said second capacitance means for this second predetermined period as preparation for the note detection, said first means being arranged to apply said first level voltage to the row conductors of the detected blocks one at a time for a third predetermined period so that the voltage of such column conductor that is connected to a key switch in operation is changed from said second level voltage to said first level voltage, and this change being detected by said second means.
7. A system for detecting actuated key switches in a matrix, comprising:
source means for providing signals in parallel to all columns of said matrix, a block memory having a storage cell associated with each row of said matrix, said block memory storing the signals received from said source means through said matrix so as to indicate which rows contain at least one actuated switch, single block extraction means for reading out row-indicating signals stored in said block memory one at a time, in sequence, and for providing a signal to said matrix along the single row corresponding to the currently read-out row-indicating signal,
first capacitance means provided between each row conductor and ground;
first voltage applying means connected to said first capacitance means to apply thereto a first level voltage which would forward bias said unidirectional elements for a first predetermined period as preparation for the block detection;
second capacitance means provided between each column conductor and ground; and second voltage applying means connected to said column conductors to apply thereto a second level voltage which would forward bias said unidirectional elements for a second predetermined period so that the voltage of such row conductor that is connected to key switches in operation is changed from said first level voltage to said second level voltage, and this change being detected by said first means;
said second level voltage being applied also to said second capacitance means for this second predetermined period as preparation for the note detection, said first means being arranged to apply said first level voltage to the row conductors of the detected blocks one at a time for a third predetermined period so that the voltage of such column conductor that is connected to a key switch in operation is changed from said second level voltage to said first level voltage, and this change being detected by said second means.
7. A system for detecting actuated key switches in a matrix, comprising:
source means for providing signals in parallel to all columns of said matrix, a block memory having a storage cell associated with each row of said matrix, said block memory storing the signals received from said source means through said matrix so as to indicate which rows contain at least one actuated switch, single block extraction means for reading out row-indicating signals stored in said block memory one at a time, in sequence, and for providing a signal to said matrix along the single row corresponding to the currently read-out row-indicating signal,
claim 7 cont'd.......
a note memory having a storage cell associated with each column of said matrix, said note memory storing signals received from said block extraction means via said matrix so as to indicate which columns in said single row contain actuated switches, note extraction means for reading-out column-indicating signals from said note memory one at a time, in sequence, each such read-out column-indicating signal and the concurrently read-out row-indicating signal together uniquely identifying a corresponding actuated switch in said matrix, and timing control means connected to said block extraction means and to said note extraction means, for causing said single block extraction means to read out the next sequential row-indicating signal only after all of the column-indicating signals for said single row have been read out by said note extraction means.
a note memory having a storage cell associated with each column of said matrix, said note memory storing signals received from said block extraction means via said matrix so as to indicate which columns in said single row contain actuated switches, note extraction means for reading-out column-indicating signals from said note memory one at a time, in sequence, each such read-out column-indicating signal and the concurrently read-out row-indicating signal together uniquely identifying a corresponding actuated switch in said matrix, and timing control means connected to said block extraction means and to said note extraction means, for causing said single block extraction means to read out the next sequential row-indicating signal only after all of the column-indicating signals for said single row have been read out by said note extraction means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CA358,207A CA1098740A (en) | 1975-08-15 | 1980-08-13 | Device for detecting a key switch operation |
Applications Claiming Priority (8)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP50099151A JPS5941197B2 (en) | 1975-08-15 | 1975-08-15 | Key switch operation detection method |
| JP50099152A JPS5223324A (en) | 1975-08-15 | 1975-08-15 | Key coder |
| JP99152/1975 | 1975-08-15 | ||
| JP99151/1975 | 1975-08-15 | ||
| JP100877/1975 | 1975-08-20 | ||
| JP50100877A JPS5224516A (en) | 1975-08-20 | 1975-08-20 | Key switch operation detection circuit |
| CA258,932A CA1086539A (en) | 1975-08-15 | 1976-08-12 | Device for detecting a key switch operation |
| CA358,207A CA1098740A (en) | 1975-08-15 | 1980-08-13 | Device for detecting a key switch operation |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CA1098740A true CA1098740A (en) | 1981-04-07 |
Family
ID=27508070
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CA358,207A Expired CA1098740A (en) | 1975-08-15 | 1980-08-13 | Device for detecting a key switch operation |
Country Status (1)
| Country | Link |
|---|---|
| CA (1) | CA1098740A (en) |
-
1980
- 1980-08-13 CA CA358,207A patent/CA1098740A/en not_active Expired
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4148017A (en) | Device for detecting a key switch operation | |
| US3986423A (en) | Polyphonic music synthesizer | |
| JPH0137752B2 (en) | ||
| US4788896A (en) | Tone Generator having a variable number of channels with a variable number of operating units | |
| US3950743A (en) | Keying input apparatus having a reduced number of output terminals | |
| US3715746A (en) | Keyboard input device | |
| GB1430297A (en) | Keyboard entry system with n-key rollover and n-key lockout protection | |
| US4144788A (en) | Bass note generation system | |
| US4192211A (en) | Electronic musical instrument | |
| GB1274639A (en) | Display apparatus incorporating a gas discharge panel | |
| US4287802A (en) | Electronic musical instrument of time division multiplexed type | |
| US4119005A (en) | System for generating tone source waveshapes | |
| US3760358A (en) | Latching selector for selectively drawing out a single signal from among a plurality thereof | |
| GB1159891A (en) | Keyboard Terminal | |
| GB1274801A (en) | Electronic chord selection device for a musical instrument | |
| CA1098740A (en) | Device for detecting a key switch operation | |
| US3387269A (en) | Information display system | |
| US4300430A (en) | Chord recognition system for an electronic musical instrument | |
| US3778815A (en) | Keyboard encoder | |
| US4218948A (en) | Electronic musical instrument of key code processing type | |
| GB2110456A (en) | Electronic musical instrument | |
| US4235142A (en) | Electronic musical instrument of time-shared digital processing type | |
| US3407260A (en) | Electric organ polyphonic percussion system having multiple use keyers | |
| US4223584A (en) | Electronic musical instrument | |
| GB1506272A (en) | Monophonic electronic musical instrument |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MKEX | Expiry |