A method for embedding algorithmic musical data into MIDI format using pitch
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. User input is received for one or more musical
components, and musical data in accordance with the song data structure corresponding
to the musical components are modified in accordance with the user input. Musical
rules are applied to the modified musical data, and the music output for the song
is modified in accordance with the modified musical data. In response to the user
input a modified song is created based on user modifications to the song, and a
modified MIDI representation of music is employed in which musical rule information
is embedded in MIDI pitch data. User input may be received, and the user input
may be used to modify music output corresponding to one or a plurality of instruments,
audio samples or microphone input. The song may be stored for subsequent playback
and/or played in real time as a live performance.