A user is asked to perform tapping at beat positions by using a tapping
detection section while listening to the beginning of a waveform from
which beats are to be detected. When a fluctuation calculation section
determines that tapping fluctuation falls in a predetermined range, a
beat interval close in number to the tempo of the tapping is selected
from among beat-interval candidates detected by a tempo-candidate
detection section, and a tapping position where tapping becomes stable is
determined to be the starting beat position. Tapping by the user for just
some beats allows beats to be detected in the entire musical piece more
correctly.