An electronic musical instrument internally stores automatic performance
data. The electronic musical instrument reads automatic performance data
to perform an automatic performance, while incrementing melody tone pitch
data contained in the automatic performance data. The electronic musical
instrument obtains a valve state signal from an operated state of a
plurality of performance operators. The electronic musical instrument
automatically generates pitch data corresponding to a pitch of a voice on
the basis of the melody tone pitch data. The electronic musical
instrument extracts tone pitch candidates on the basis of the valve state
signal, and determines a tone pitch in accordance with the automatically
generated pitch data and the tone pitch candidates. The timing at which
the determined tone pitch matches the melody tone pitch data is regarded
as the timing to increment the melody tone pitch data.