diff options
author | William Carroll <wpcarro@gmail.com> | 2020-04-12T22·32+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-04-12T22·32+0100 |
commit | 3ee1b1f670c05234bbd5e76d3d62f2703c28d549 (patch) | |
tree | 91938188938e3441641d31cae2c0e4bbd78f7194 /website/sandbox | |
parent | bf460fe5acaa4183574e1466076baed58f64553c (diff) |
Support suspended chords
I'm not sure how valuable it is to study all of the inversions of the suspended chords. Maybe it is. I'll let the users decide.
Diffstat (limited to 'website/sandbox')
-rw-r--r-- | website/sandbox/chord-drill-sergeant/src/Theory.elm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/website/sandbox/chord-drill-sergeant/src/Theory.elm b/website/sandbox/chord-drill-sergeant/src/Theory.elm index 9d39a4cad5be..33137d9ffba5 100644 --- a/website/sandbox/chord-drill-sergeant/src/Theory.elm +++ b/website/sandbox/chord-drill-sergeant/src/Theory.elm @@ -169,6 +169,8 @@ may cause more problems than it solves. -} type ChordType = Major + | Sus2 + | Sus4 | Major7 | MajorDominant7 | Minor @@ -292,6 +294,12 @@ chordTypeName chordType = Major -> "major" + Sus2 -> + "suspended 2" + + Sus4 -> + "suspended 4" + Major7 -> "major 7th" @@ -388,6 +396,26 @@ intervalsForChordType chordType chordInversion = ( Major, Second ) -> [ down (NHalves 5), up MajorThird ] + -- Sus2 + ( Sus2, Root ) -> + [ up Whole, up PerfectFifth ] + + ( Sus2, First ) -> + [ down (NHalves 10), down (NHalves 5) ] + + ( Sus2, Second ) -> + [ down (NHalves 5), up Whole ] + + -- Sus4 + ( Sus4, Root ) -> + [ up (NHalves 5), up PerfectFifth ] + + ( Sus4, First ) -> + [ down (NHalves 7), down (NHalves 5) ] + + ( Sus4, Second ) -> + [ down (NHalves 5), up (NHalves 5) ] + -- Major7 ( Major7, Root ) -> [ up MajorThird, up PerfectFifth, up MajorSeventh ] @@ -816,6 +844,8 @@ allInversions = allChordTypes : List ChordType allChordTypes = [ Major + , Sus2 + , Sus4 , Major7 , MajorDominant7 , Minor |