API / MusicTheory
VoiceLeadingRules static class
Common-practice part-writing checks. Voices are given note by note: the first chord's note, then the second chord's, for each voice. Every check is spelling-aware (a diminished 5th is not a perfect 5th).
Methods
static MotionType GetMotionType(Note voice1Note1, Note voice1Note2, Note voice2Note1, Note voice2Note2)The motion between two voices: oblique when one (or neither) moves, contrary in opposite directions, parallel by the same distance, similar otherwise.
static bool HasAugmentedInterval(Note note1, Note note2)An augmented melodic interval, of any degree, in either direction.
static bool HasHiddenFifths(Note bassNote1, Note bassNote2, Note sopranoNote1, Note sopranoNote2)Hidden (direct) fifths in the outer voices: similar or parallel motion into a perfect fifth with a leap of more than a whole step in the soprano.
static bool HasLargeMelodicLeap(Note note1, Note note2, int maxSemitones = 12)A melodic leap wider than
maxSemitones (an octave by default).static bool HasParallelFifths(Note voice1Note1, Note voice1Note2, Note voice2Note1, Note voice2Note2)Parallel perfect fifths (or compound fifths) between two voices.
static bool HasParallelOctaves(Note voice1Note1, Note voice1Note2, Note voice2Note1, Note voice2Note2)Parallel perfect octaves (or compound octaves) between two voices; two unisons are not octaves.
static bool HasParallelUnisons(Note voice1Note1, Note voice1Note2, Note voice2Note1, Note voice2Note2)Parallel perfect unisons between two voices.
static bool HasVoiceCrossing(Note lowerVoiceNote, Note higherVoiceNote)The lower voice sounds above the higher one.
static bool HasVoiceOverlap(Note voice1Note1, Note voice1Note2, Note voice2Note1, Note voice2Note2)A voice moves past the previous note of the other voice (voice 1 is the lower one).
static IReadOnlyList<VoiceLeadingViolation> ValidateVoiceLeading(Note[] chord1, Note[] chord2)Every violation between two chords given bass to soprano: parallel fifths, octaves and unisons, crossing and overlap for each pair of voices; augmented intervals and leaps over an octave in each voice; hidden fifths in the outer voices.
Throws ArgumentNullException A chord is null.
Throws ArgumentException The chords have different voice counts.