#[Python] Scale Generator -- problem classifying octatonic scale

7 messages · Page 1 of 1 (latest)

eager lichen
#

Not sure to what extent this is a music theory or coding logic question. I'm keen on music theory and have probably an intermediate level of knowledge. I thought it was fun to think about coding and music together in this exercise.
My code passes all but the very last test which is for an octatonic scale. ("MmMmMmMm"). The tester and I disagree on whether this scale with a tonic of C should be written with sharps or flats. (I have flats, tester has sharps). To figure this out for other scales, I checked for the presence of the minor 3rd note in order to classify them as being more like a major or a minor scale so I can use the chart given in the instructions. (I realise in doing that I was using my own musical knowledge and not anything from the instructions -- I know the minor third note is what makes a minor chord sound "minor".) But this logic doesn't seem to work for this octatonic scale (with a tonic of C). When I google this scale I see it written with sharps, not flats, starting from C, so the test seems to reflect musical practice.

My question then is whether one is supposed to use different logic to classify the scales, or whether my logic is fine or mostly fine and the octatonic scale is an exception that needs to be treated separately, or if there is something else I'm missing about this exercise. Thanks!

kind pilot
#

That exercise is deprecated and shouldn't show up in the exercise list...

eager lichen
#

Huh. Well, it showed up for me.

#

I started the track in December I think, if that’s relevant.

#

I enjoyed solving (almost all of) it, in any case.

kind pilot
#

Very weird. I'm not sure why it showed up. My solution has a hard coded list of which notes use sharps vs flats but I haven't looked at that exercises in years so I don't recall what my thinking was.

eager lichen
#

No worries. I can move on with the mystery of th e octatonic scale unsolved. 🙂 Happy with my solution otherwise. (It worked better after I edited all the jikiscript out of my first draft.)