Detector detects movement of a hammer (driven member) that strikes a
string (abutted member) by moving in response to operation of a key. On
the basis of detection outputs of the detector and a given
abutment-presuming reference value, it is presumed that the hammer has
struck or abutted against the string. For example, performance event data
is generated on the basis of the abutment presumption. In order to
minimize errors due to variation over time or aging of a hammer action
mechanism, a determination section determines that the hammer has,
actually or with a high probability, reached an abutting position where
the hammer abuts against the string, and the abutment-presuming condition
in accordance with the determination result. It is determined that the
hammer has reached the abutting position, by comparing, on the basis of
detection outputs of the detector, movement of the hammer toward the
string and movement of the hammer away from the string. By thus making a
string-striking determination in view of operation of the hammer not only
before the string striking but also after the string striking, it is
possible to accurately determine whether or not the string has been
struck.