JuliaMusic / MusicTheory.jl

Music theory in Julia
MIT License
46 stars 1 forks source link

more modes? #17

Open stevengj opened 5 months ago

stevengj commented 5 months ago

I only see one major mode and 3 minor mode built-in here.

It would be nice to see more modes implemented (the modes of the diatonic scale, e.g. dorian, lydian, etcetera, along with ionian_scale = major_scale and aeolian_scale = natural_minor_scale synonyms), along with others (harmonic major, phrygian dominant, etcetera). But there are so many that it might be more natural to have a dictionary modes["lydian"] than a separate constant for each.

(It's also not clear to me why a Scale should be an iterator rather than something supporting getindex.)

dpsanders commented 5 months ago

That's a great idea, thanks! Do you have a reference with a list of modes?

stevengj commented 5 months ago

Wikipedia is probably a decent source — it has articles on pretty much all the common modes, I think, though I don't know if they are listed in one place? A lot of them are listed in the Mode (music) article on Wikipedia. If you google "7 diatonic modes" that would be the most basic starting point.

stevengj commented 5 months ago

Then there are also scales that have < 7 notes, like pentatonic scales, and scales that have > 7 notes, like the nonatonic blues scale (or for that matter the chromatic scale, but I don't know if people refer to the chromatic scales having particular tonic roots).