Chord
Chord represents a musical chord as a collection of notes names. Some examples of usage:
// Create chord by root note name and intervals from root
var chordByIntervals = new Chord(NoteName.A, Interval.FromHalfSteps(2), Interval.FromHalfSteps(5));
// Create A B chord
var chordByNotesNames = new Chord(NoteName.A, NoteName.B);
// Create C Major chord
var cMajorTriad = Chord.GetByTriad(NoteName.C, ChordQuality.Major);
// ... or parse it from string
var cMajorTriadFromString = Chord.Parse("C");
// Parse more complex chord from string
var cAug7Chord = Chord.Parse("Caug7");
Last chord will contain C, E, G# and A# notes as expected.
Chords parsing uses the Chord Names Table (CNT) so not all possible chords can be parsed since CNT contains a limited set of chords naming rules. If you notice that some known chord name is not parsed by DryWetMIDI, please create an issue on GitHub and CNT will be extended. See the following section for details.
Parsing
Following strings can be parsed to Chord
:
RootNote ChordCharacteristic
RootNote ChordCharacteristic BassNote
where
- RootNote is the root note of a chord, for example,
A
orC#
. - ChordCharacteristic is a combination of chord quality, altered and added tones and so on. See Chords names table section below to learn what characteristics are supported by the library.
- BassNote is an added bass note the chord will be placed over.
Examples of valid chord strings:
C
Caug7
Cm
Am
Cm7
CmM7
Csus2
C9sus4
F/G
C7b5
Chords names table
Following table shows what chords are currently supported for parsing from string and for retrieving names by chords notes. First column lists names and the second one shows intervals from root. For example, 0 1 5
for C
give us following chord: C C# E
.
Names | Intervals |
---|---|
maj M |
0 4 7 |
min m |
0 3 7 |
sus4 |
0 5 7 |
sus2 |
0 2 7 |
b5 |
0 4 6 |
dim |
0 3 6 |
aug |
0 4 8 |
min6 m6 |
0 3 7 9 |
maj6 M6 6 |
0 4 7 9 |
7 |
0 4 7 10 |
7sus4 |
0 5 7 10 |
7sus2 |
0 2 7 10 |
min7 m7 |
0 3 7 10 |
min9 min7(9) m9 m7(9) |
0 3 7 10 14 0 3 10 14 |
min11 min7(9,11) m11 m7(9,11) |
0 3 7 10 14 17 0 3 10 14 17 |
maj7 |
0 4 7 11 |
maj7(9) M7(9) |
0 4 7 11 14 0 4 11 14 |
maj7(#11) M7(#11) |
0 4 7 11 14 18 0 4 11 14 18 |
maj7(13) M7(13) |
0 4 7 11 21 0 4 11 21 |
maj7(9,13) M7(9,13) |
0 4 7 11 14 21 0 4 11 14 21 |
maj7#5 M7#5 |
0 4 8 11 |
maj7#5(9) M7#5(9) |
0 4 8 11 14 |
minMaj7 mM7 |
0 3 7 11 |
minMaj7(9) mM7(9) |
0 3 7 11 14 0 3 11 14 |
5 |
0 7 |
7b5 dom7dim5 7dim5 |
0 4 6 10 |
ø ø7 m7b5 min7dim5 m7dim5 min7b5 m7b5 |
0 3 6 10 |
aug7 7#5 7+5 |
0 4 8 10 |
dim7 |
0 3 6 9 |
add9 |
0 4 7 14 |
minAdd9 mAdd9 |
0 3 7 14 |
maj6(9) 6(9) 6/9 M6/9 M6(9) |
0 4 7 9 14 0 4 9 14 |
min6(9) m6(9) m6/9 min6/9 |
0 3 7 9 14 0 3 9 14 |
9 |
0 4 7 10 14 |
9sus2 |
0 2 7 10 14 |
9sus4 |
0 5 7 10 14 |
11 |
0 4 7 10 14 17 |
7b9 |
0 4 7 10 13 |
add11 |
0 4 7 17 |
7#11 7+11 7(#11) 7aug11 |
0 4 7 10 18 |