Patent ID: 7319187

Claim:
A computer readable medium containing a program for causing a processor to perform a method for generating tone-generation controlling key-on and key-off signals on the basis of detection signals supplied by a key operation detection device, wherein there can be applied, as said key operation detection device, 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 said first-type key operation detection device, said method comprising: a first step of receiving the detection signals from said key operation detection device applied; a second step of, on the basis of the detection signals received by said first step, generating a first key-on signal when a key has reached the lower position from the upper position; a third step of, on the basis of the received detection signals, determining whether or not particular operation has been performed for causing the key to reach the lower position from the intermediate position after generation of said first key-on signal but before generation of a key-off signal, and generating a second key-on signal if it is determined that the particular operation has been performed; and a fourth step of, on the basis of the received detection signals, generating a key-off signal 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 said first or second key-on signal.