An automatic player piano has a feedback control loop for each of the black/white
keys; the controller firstly determines a reference trajectory, i.e., a target
key position varied with time for each key to be moved in the play-back, and calculates
a target key velocity, and compares a true key position reported from a key sensor
and a true key velocity calculated from the true key position with the target key
position and target key velocity for optimizing the duty ratio of the driving signal;
the positional difference and the velocity difference are independently multiplied
by a positional gain and a velocity gain so as to determine the optimum duty ratio;
since the ratio of the velocity gain to the positional gain is 1 to 3, the key
travels along the reference trajectory without oscillation and overshoot.