A method of generating music includes steps of specifying a note sequence
and a chord progression against which the note sequence is played. The
notes of the note sequence are defined relative to chord elements, and
melodic runs are identified within the note sequence. Each melodic run
consists of a series of notes. Inversion conditions are specified in terms
of inversion boundaries and in terms of legal inversion notes relative to
the individual chords of the chord progression. When interpreting the note
sequence in conjunction with the chord progression to generate output
notes, the output notes are compared against the inversion conditions and
inverted if appropriate. If a note belongs to an identified melodic run,
the run is evaluated against the inversion conditions as a whole. More
specifically, one note of the melodic run is compared against the
inversion conditions. If the one note satisfies the inversion conditions,
the entire run is inverted. If the one note does not satisfy the inversion
conditions, none of the notes of the run are inverted.