Ensure only whitelisted chord inversions present in initial state
Whoops...
This commit is contained in:
parent
a059c32403
commit
541c40cd2f
1 changed files with 6 additions and 2 deletions
|
@ -63,7 +63,9 @@ init =
|
||||||
[ { pitchClass = Theory.C, mode = Theory.MajorMode } ]
|
[ { pitchClass = Theory.C, mode = Theory.MajorMode } ]
|
||||||
in
|
in
|
||||||
{ whitelistedChords =
|
{ whitelistedChords =
|
||||||
keys |> List.concatMap Theory.chordsForKey
|
keys
|
||||||
|
|> List.concatMap Theory.chordsForKey
|
||||||
|
|> List.filter (\chord -> List.member chord.chordInversion inversions)
|
||||||
, whitelistedChordTypes = chordTypes
|
, whitelistedChordTypes = chordTypes
|
||||||
, whitelistedInversions = inversions
|
, whitelistedInversions = inversions
|
||||||
, whitelistedPitchClasses = pitchClasses
|
, whitelistedPitchClasses = pitchClasses
|
||||||
|
@ -200,7 +202,9 @@ update msg model =
|
||||||
( { model
|
( { model
|
||||||
| whitelistedKeys = keys
|
| whitelistedKeys = keys
|
||||||
, whitelistedChords =
|
, whitelistedChords =
|
||||||
keys |> List.concatMap Theory.chordsForKey
|
keys
|
||||||
|
|> List.concatMap Theory.chordsForKey
|
||||||
|
|> List.filter (\chord -> List.member chord.chordInversion model.whitelistedInversions)
|
||||||
, selectedChord = Nothing
|
, selectedChord = Nothing
|
||||||
}
|
}
|
||||||
, Cmd.none
|
, Cmd.none
|
||||||
|
|
Loading…
Reference in a new issue