Abstract: A method, operation position sensor device for an electronic musical, and musical instrument for detecting an operation position of an operation member in an electronic musical instrument. A determination is made of an amount of measured light resulting from the depression of the operation member has changed in excess of a predetermined difference value a number of times. A determination is made of a difference value of clock counts measured at a last two determinations that the measured light changed in excess of the predetermined difference value in response to determining that the amount of the measured light has changed in excess of the predetermined difference value the number of times. The difference value is converted to a key depression speed. A sound generation command is issued based on the key depression speed to a sound source.