Songlib: automatic voice leading

written by: Song Li Buser

Revision Date: February 7, 2017

Printable Version


Voice leading

The songlib system can automatically choose inversions of a chord so that the travel of the notes from the previous chord to the new chord are minimized. Voice leading is under the control of the the setVoiceLeading and getVoiceLeading functions:

    int setVoiceLeading(int mode);
    int getVoiceLeading(void);

The setVoiceLeading function sets the voice leading mode and returns the previous setting. Currently there is only one mode (more are planned), so to turn on voice leading, pass a 1 to setVoiceLeading. The getVoiceLeading function returns the current voice leading mode.

Voice leading works for all chord functions, including modal chords. However, there are some limitations. Inversions are chosen only if the number of notes in the previous chord equals the number of notes in the new chord. Moreover, in figuring minimal distances, the lowest note of the previous chord is compared to the first note of the new chord, the second lowest note of the previous chord is compared to the second note of the new chord, and so on. If the new chord's notes are arranged from high to low, then travel will be minimized between the low note of the previous chord and the high note of the new chord, and so on.

In choosing inversions, the first note is only allowed to move up an octave, while the last note is only allowed to move down an octave. Notes in between are allowed to move up or down an octave in order to minimize note travel.

lusth@cs.ua.edu