add and correct chord
sugizo opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
please add some chord like suspended chord and also correction for extended chord
Describe the solution you'd like
"Dominant Eleventh": [0, 4, 7, 10, 14, 16], // C E G B♭ D F
should be
"Dominant Eleventh": [0, 4, 7, 10, 17], // C E G B♭ F
because F' (octave higher) have semitone 17 (not 16) and no semitone 14, because 14 is 9th tone
and
"Dominant Ninth Eleventh": [0, 4, 7, 10, 14, 17], // C E G B♭ D F
because F' (octave higher) have semitone 17 (not 16), the same note but different name 'dominant ninth eleventh'
and also many more chord, will send the code, if you interest
thanks for wonderful piece of art, helpful to give a brief about chord progression sound in piano
Thanks for your suggestion! I will correct the 2 dominant chords. If you want to contribute more chords, you can either send me your code in the comment or have a pull request!
please review it first, thanks
./src/ts/music-theory/Chord.ts
export class Chord {
static readonly chordTypeSymbols: any = {
//Triads
"Major Flat Fifth": "M<sup>♭5</sup>",
"Major Triad": "",
"Minor": "m",
"Augmented": "<sup>+</sup>",
"Diminished": "<sup>o</sup>",
"Suspended Second": "sus<sup>2</sup>",
"Suspended Fourth": "sus<sup>4</sup>",
//Sixths
"Major Sixth": "maj<sup>6</sup>",
"Minor Flat Sixth": "min<sup>♭6</sup>",
"Minor Sixth": "min<sup>6</sup>",
//Sevenths
"Dominant Seventh Flat Five": "<sup>7♭5</sup>",
"Dominant Seventh": "<sup>7</sup>",
"Major Seventh": "maj<sup>7</sup>",
"Minor Seventh": "min<sup>7</sup>",
"Minor Major Seventh": "min<sup>M7</sup>",
"Diminished Seventh": "<sup>o7</sup>",
"Half Diminished Seventh": "<sup>ø7</sup>",
"Diminished Major Seventh": "<sup>oM7</sup>",
"Augmented Seventh": "<sup>+7</sup>",
"Augmented Major Seventh": "<sup>+M7</sup>",
"Seventh Sixth": "<sup>7/6</sup>",
//Extended
"Major Added Ninth": "<sup>add9</sup>",
"Minor Flat Sixth Ninth": "m<sup>♭6/9</sup>",
"Major Sixth Ninth": "<sup>6/9</sup>",
"Minor Ninth": "m<sup>9</sup>",
"Dominant Ninth": "<sup>9</sup>",
"Major Ninth": "M<sup>9</sup>",
"Minor Eleventh": "m<sup>11</sup>",
"Dominant Eleventh": "<sup>11</sup>",
"Major Eleventh": "M<sup>11</sup>",
"Minor Ninth Eleventh": "M<sup>9/11</sup>",
"Dominant Ninth Eleventh": "<sup>9/11</sup>",
"Major Ninth Eleventh": "M<sup>9/11</sup>",
"Major Seventh Sharp Eleventh": "M<sup>7♯11</sup>",
"Minor Thirteenth": "m<sup>13</sup>",
"Dominant Thirteenth": "<sup>13</sup>",
"Major Thirteenth": "M<sup>13</sup>",
//Altered
"Seventh Minor Ninth": "<sup>7♭9</sup>",
"Seventh Sharp Ninth": "<sup>7♯9</sup>"
//Others
"Fifth": "<sup>5</sup>",
};
static readonly chordFamilies: any = {
"Triads": { // chord with 3 notes
"Major Flat Fifth": [0, 4, 6],
"Major Triad": [0, 4, 7],
"Minor": [0, 3, 7],
"Augmented": [0, 4, 8],
"Diminished": [0, 3, 6],
"Suspended Second": [0, 2, 7],
"Suspended Fourth": [0, 5, 7],
},
"Sixths": { // triads with a 6th added on
"Major Sixth": [0, 4, 7, 9],
"Minor Flat Sixth": [0, 3, 7, 8],
"Minor Sixth": [0, 3, 7, 9],
},
"Sevenths": { // triads with a 7th added on
"Dominant Seventh Flat Five": [0, 4, 6, 10],
"Dominant Seventh": [0, 4, 7, 10],
"Major Seventh": [0, 4, 7, 11], // C E G B
"Minor Seventh": [0, 3, 7, 10],
"Minor Major Seventh": [0, 3, 7, 11],
"Diminished Seventh": [0, 3, 6, 9], // C E♭ G♭ B♭♭
"Half Diminished Seventh": [0, 3, 6, 10],
"Diminished Major Seventh": [0, 3, 6, 11],
"Augmented Seventh": [0, 4, 8, 10], // C E G♯ B♭
"Augmented Major Seventh": [0, 4, 8, 11],
"Seventh Sixth": [0, 4, 7, 9, 10],
},
"Extended": {
"Major Added Ninth": [0, 4, 7, 14],
"Minor Flat Sixth Ninth": [0, 3, 7, 8, 14],
"Major Sixth Ninth": [0, 4, 7, 9, 14],
"Minor Ninth": [0, 3, 7, 10, 14],
"Dominant Ninth": [0, 4, 7, 10, 14], // C E G B♭ D
"Major Ninth": [0, 4, 7, 11, 14],
"Minor Eleventh": [0, 3, 7, 10, 17],
"Dominant Eleventh": [0, 4, 7, 10, 17], // C E G B♭ F
"Major Eleventh": [0, 4, 7, 11, 17],
"Minor Ninth Eleventh": [0, 3, 7, 10, 14, 17],
"Dominant Ninth Eleventh": [0, 4, 7, 10, 14, 17],
"Major Ninth Eleventh": [0, 4, 7, 11, 14, 17],
"Major Seventh Sharp Eleventh": [0, 4, 7, 11, 18],
"Minor Thirteenth": [0, 3, 7, 10, 21],
"Dominant Thirteenth": [0, 4, 7, 10, 21],
"Major Thirteenth": [0, 4, 7, 11, 21],
},
"Altered": {
"Seventh Minor Ninth": [0, 4, 7, 10, 13], // C E G B♭ D♭
"Seventh Sharp Ninth": [0, 4, 7, 10, 15],
},
"Others": {
"Fifth": [0, 7],
},
};
Thank you! I will update the chords