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 } ] | ||||
|     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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue