MusicTheory Docs API Toolbox GitHub NuGet
Contents

API / MusicTheory

VoiceLeader static class

Chooses piano voicings for a chord progression so that each one moves the least from the previous.

Methods

static IReadOnlyList<IReadOnlyList<Note>> Lead(IEnumerable<ChordSymbol> chords, PianoVoicingStyle style, int octave = 4)
Voices the first chord with PianoVoicer.Voice; each next chord takes the candidate with the least total motion, plus 100 per parallel fifth, octave or unison. Greedy, deterministic.
chords
The progression.
style
The shape; rootless styles try both the A and B forms.
octave
The octave of the first voicing.

Throws ArgumentNullException chords is null.

Throws ArgumentException A chord cannot be voiced in style; the message names its index.

Throws InvalidOperationException A chord after the first has no voicing within MIDI 40 to 84.