diff --git a/website/sandbox/learnpianochords/src/State.elm b/website/sandbox/learnpianochords/src/State.elm index 3b9d29c34..764c8b256 100644 --- a/website/sandbox/learnpianochords/src/State.elm +++ b/website/sandbox/learnpianochords/src/State.elm @@ -63,7 +63,9 @@ init = [ { pitchClass = Theory.C, mode = Theory.MajorMode } ] in { whitelistedChords = - keys |> List.concatMap Theory.chordsForKey + keys + |> List.concatMap Theory.chordsForKey + |> List.filter (\chord -> List.member chord.chordInversion inversions) , whitelistedChordTypes = chordTypes , whitelistedInversions = inversions , whitelistedPitchClasses = pitchClasses @@ -200,7 +202,9 @@ update msg model = ( { model | whitelistedKeys = keys , whitelistedChords = - keys |> List.concatMap Theory.chordsForKey + keys + |> List.concatMap Theory.chordsForKey + |> List.filter (\chord -> List.member chord.chordInversion model.whitelistedInversions) , selectedChord = Nothing } , Cmd.none