about summary refs log tree commit diff
path: root/website/sandbox/learnpianochords/src/State.elm
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-04-19T17·23+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-04-19T17·23+0100
commit14f11823ff9b08d627460bee96964dc64ae22dff (patch)
treec45c60625d5434d644488cdc0fcfdf0022be547f /website/sandbox/learnpianochords/src/State.elm
parentd134db700f0445e1d851904145833dbf70ed48ac (diff)
Drop support for PracticeMode
For now, I'd like to support selecting keys and whitelisting inversions.
Diffstat (limited to 'website/sandbox/learnpianochords/src/State.elm')
-rw-r--r--website/sandbox/learnpianochords/src/State.elm36
1 files changed, 2 insertions, 34 deletions
diff --git a/website/sandbox/learnpianochords/src/State.elm b/website/sandbox/learnpianochords/src/State.elm
index d81e5b26b728..0c23d3a5a988 100644
--- a/website/sandbox/learnpianochords/src/State.elm
+++ b/website/sandbox/learnpianochords/src/State.elm
@@ -16,7 +16,6 @@ type Msg
     | TogglePitchClass Theory.PitchClass
     | ToggleKey Theory.Key
     | DoNothing
-    | SetPracticeMode PracticeMode
     | SetView View
     | ToggleFlashCard
 
@@ -27,13 +26,6 @@ type View
     | Overview
 
 
-{-| Control the type of practice you'd like.
--}
-type PracticeMode
-    = KeyMode
-    | FineTuneMode
-
-
 type alias Model =
     { whitelistedChords : List Theory.Chord
     , whitelistedChordTypes : List Theory.ChordType
@@ -45,7 +37,6 @@ type alias Model =
     , tempo : Int
     , firstNote : Theory.Note
     , lastNote : Theory.Note
-    , practiceMode : PracticeMode
     , view : View
     , showFlashCard : Bool
     }
@@ -70,24 +61,9 @@ init =
 
         keys =
             [ { pitchClass = Theory.C, mode = Theory.MajorMode } ]
-
-        practiceMode =
-            KeyMode
     in
-    { practiceMode = practiceMode
-    , whitelistedChords =
-        case practiceMode of
-            KeyMode ->
-                keys |> List.concatMap Theory.chordsForKey
-
-            FineTuneMode ->
-                Theory.allChords
-                    { start = firstNote
-                    , end = lastNote
-                    , inversions = inversions
-                    , chordTypes = chordTypes
-                    , pitchClasses = pitchClasses
-                    }
+    { whitelistedChords =
+        keys |> List.concatMap Theory.chordsForKey
     , whitelistedChordTypes = chordTypes
     , whitelistedInversions = inversions
     , whitelistedPitchClasses = pitchClasses
@@ -110,14 +86,6 @@ update msg model =
         DoNothing ->
             ( model, Cmd.none )
 
-        SetPracticeMode practiceMode ->
-            ( { model
-                | practiceMode = practiceMode
-                , isPaused = True
-              }
-            , Cmd.none
-            )
-
         SetView x ->
             ( { model
                 | view = x