An electronic system, which serves as a recorder and an automatic player,
is installed in an automatic player piano, and hammer sensors, which are
implemented by photo couplers, report current hammer positions through
analog signals to a data processor so that the data processor analyzes
pieces of hammer data for recording the performance in a set of music
codes; the analog signals are amplified through an operational amplifier
and, thereafter, converted to discrete values of digital hammer signals
so that an offset voltage is unavoidably introduced into the analog
signals; when the photo couplers vary the light-to-photocurrent
converting characteristics due to the aged deterioration, the data
processor takes the offset voltage into account, and calibrates the
hammer sensors, thereby making the digital hammer signals correctly
express the current hammer positions.