MusicTheory Docs API Toolbox GitHub NuGet
Contents

API / MusicTheory

ChordProgression class

Diatonic harmony in a key: the chords built by stacking the scale's thirds, Roman numerals and progressions written as numerals (ii7 - V7 - Imaj7). Minor keys use the natural minor scale.

Constructors

ChordProgression(KeySignature key)
Creates a progression context for a key.

Throws ArgumentNullException key is null.

Properties

KeySignature Key { get; }
The key.

Methods

Chord GetChordByDegree(int degree)
The diatonic triad on a degree.

Throws ArgumentOutOfRangeException degree is outside 1..7.

IEnumerable<Chord> GetDiatonicChords()
The seven diatonic triads: I ii iii IV V vi vii° in major, i ii° III iv v VI VII in minor.
IEnumerable<Chord> GetDiatonicSeventhChords()
The seven diatonic seventh chords: Imaj7 ii7 iii7 IVmaj7 V7 vi7 viiø7 in major.
string GetRomanNumeral(int degree)
The Roman numeral of a degree: upper case for major triads, lower case for minor, lower case with ° for diminished (vii° in major, ii° in minor).

Throws ArgumentOutOfRangeException degree is outside 1..7.

Chord GetSecondaryDominant(int targetDegree)
The secondary dominant (V/x): a major triad a perfect fifth above the target degree's root.

Throws ArgumentOutOfRangeException targetDegree is outside 1..7.

IReadOnlyList<Chord> ParseProgression(string progressionString)
Parses numerals separated by - or ,: I - IV - V7 - I, ii7, V7, Imaj7. Case and ° are accepted but the key decides the quality; 7 gives the diatonic seventh (V7, ii7, viiø7) and maj7 a major seventh on a major or minor triad.

Throws ArgumentNullException progressionString is null.

Throws FormatException A part is not a numeral, or maj7 sits on a diminished or augmented triad.