To generate motion data of a motion in synchronization with a melody of
music. As an embodiment of the present invention, when motion pattern
data corresponding to a predetermined motion pattern is stored, music
data is analyzed to detect a beat of music based on the music data, and
the music data is divided into a plurality of bar intervals based on the
detected beat, the motion pattern data is allocated to the bar intervals
of the music data being divided to generate motion data. In this manner,
when the motion data is reproduced together with the music data, the
motion pattern can be switched in synchronization with switching of first
bar intervals and second bar intervals corresponding to a bar when the
music based on music data is expressed in a musical score.