There is provided a procedure for generating tone-generation controlling
key-on and key-off signals, which is applicable to either a first-type
key operation detection device that, in response to depressing operation
of a key, generates detection signals in correspondence with at least
predetermined upper and lower positions or a second-type key operation
detection device that, in response to depressing operation of a key, not
only generates detection signals in correspondence with at least
predetermined upper and lower positions but also generates a detection
signal of an intermediate position unobtainable by the first-type key
operation detection device. On the basis of the detection signals
received from the key operation detection device applied, a first key-on
signal is generated when a key has reached the lower position from the
upper position. Further, on the basis of the detection signals, a
determination is made as to whether or not particular operation has been
performed for causing the key to reach the lower position from the
intermediate position after generation of the first key-on signal but
before generation of a key-off signal, and, if so, a second key-on signal
is generated. Furthermore, on the basis of the received detection
signals, a key-off signal is generated in correspondence with the
generated first or second key-on signal when the key has returned to a
predetermined key-off position after generation of the first or second
key-on signal.