A method for playing a song employing a song data structure is disclosed. Program
instructions are executed, and one or more music composition algorithms are applied
to song data in accordance with a song data structure to generate music output
for the song, and variables are defined during the execution of one or more of
the program instructions. A song data structure is provided, and a plurality of
parameter locations are provided in the song data structure, and data contained
in the plurality of parameter locations are made available to the program instructions.
At least a first one of the parameter locations is used by one or more of the program
instructions to store parameter data associated with one or more seed values, and
the seed values are used to initialize one or more of the variables. At least a
second one of the parameter locations may be used by one or more of the program
instructions to store parameter data associated with a version identification of
the song data structure. At least a third one of the parameter locations may be
used by one or more of the program instructions to store parameter data associated
with a musical key. At least a fourth one of the parameter locations may be used
by one or more of the program instructions to store parameter data associated with
a rhythmic tempo. At least a fifth one of the parameter locations may be used by
one or more of the program instructions to store parameter data associated with
the identification of samples. At least a sixth one of the parameter locations
may be used by one or more of the program instructions to store parameter data
associated with the timing of sample playback. At least a seventh one of the parameter
locations may be associated with the actual song data. User input may be received
during song play, and the user input may be associated with a change in the parameter
data and actual song data.