From 3ee1b1f670c05234bbd5e76d3d62f2703c28d549 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sun, 12 Apr 2020 23:32:00 +0100 Subject: [PATCH] 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. --- .../chord-drill-sergeant/src/Theory.elm | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/website/sandbox/chord-drill-sergeant/src/Theory.elm b/website/sandbox/chord-drill-sergeant/src/Theory.elm index 9d39a4cad..33137d9ff 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