I'm getting stuck with [dict] objects, not sure if this is the right objects for the job.
I'm trying to program a scale identifier: User enters 3/4 notes, max then outputs a visual message identifying the scale.
I'm trying to keep it basic at the moment, just using the pentatonic major scales.
If the user enters A, it appears in 7 scales.
If the user enters A + B it appears in 4 scales.
If the user enters A + B + C, it appears in 2 scales.
I need a way of programming this, Dictionaries maybe the answer?
In the dict there will be lists of each scales midi note numbers.
At the moment I can't even load my saved dictionary txt file.
I was thinking process of elimination, eg: If A entered, then not in the scale of: G#, B, C#, etc...
if B, then not . .. .. ..
Then accumulate the results of the subtractions, thus narrow down the possibilities. (Haven't yet worked out how to get a single result without the user entering all seven notes. EG: Scales C & G are only separated by F or F#.)
1) how do I set up a dictionary properly? can you point me towards a tutorial?
2) how do I subtract possible lists from a dictionary?
3) Ideally I need some sort of memory bank to store each note input, this is so that the user doesn't have to hold down 3/4 keys at once. I've started this under 'note storage and display' in the attached patch.
Any input on the above will be greatly appreciated, thanks.