using a light beam to detect key, pedal or note actuation