4 ms·
To be honest the math is super simple, but standard music theory piles a heap of messy terminology on top of it. For years I've been meaning to write a "program
by fenomas 6y ago
To be honest the math is super simple, but standard music theory piles a heap of messy terminology on top of it. For years I've been meaning to write a "programmer's guide to 85% of western music theory" article, but never quite gotten around to it.
The core of it boils down to stuff like:
* scales are arrays of note offsets:
* majorScale = [0, 2, 4, 5, 7, 9, 11]
* to change a scale's key, offset each note:
* dMajor = cMajor.map(n => n+2)
* "modes" typically means scales that are reindexed:
* dorian = major.map((n,i) => major[(i+1) % 7])
and so on. Obviously knowing that stuff doesn't make the music theory any more intuitive - if a textbook says "a V/ii chord", I have no idea what that sounds like. But deriving what notes it has, or writing a function to play them, is super easy once the terminology is demystified.
- uxcolumbo 6y agoWould love to read more about this. Until your article is done, can you recommend other sources that go into this?
- fenomas 6y agoI don't really remember finding any good dense sources, I mostly slogged through wikipedia articles and gradually decoded things. I really ought to get around to that article...
- jim-jim-jim 6y agoIt doesn't contain code, but "Musimathics" by Gareth Loy was way more useful to me than any vanilla theory book. I think most other musically ignorant programmers would agree.
- bambax 6y agoA book is lot of work, but a blog post would be a great start! Regarding modes, your presentation is excellent and true (AFAIK), but why some scales don't have the same modes as other scales; given scales with the same number of notes, they should have the same modes? Yet for example, while the modes of the major scale are Ionian then Dorian, Phrygian, Lydian, Mixolydian, Aeolian and Locrian, the modes of the double harmonic major scale are [name of the scale] then Lydian, Ultraphrygian, Hungarian, Oriental, Ionian and Locrian. Is it only a problem of nomenclature or is there a profound truth behind it?
- fenomas 6y agoI think the short answer is nomenclature. Much of what makes music theory difficult is that the terms and notation systems have built up over centuries, and they come from musicians who were concerned with what's useful, not from programmers who understood the math. So pretty much everything has nine different names, and pretty much every term gets used to mean nine different things. That said, for modes, AFAIK the names are all 100% arbitrary and used for historic reasons. For scales with varying numbers of modes, the first thing that jumps to mind is that some scales have modes that are identical to the scale, or to other modes, so references probably leave them out (e.g. consider the modes of the whole tone scale!). But there's probably also cases where this or that mode might get omitted because it whoever wrote the authoritative textbook about that scale thought it sounded awful, or felt it shouldn't be considered a mode for whatever reason. There could be other stuff going on I don't know about - when I was learning this stuff I ignored big swaths of material that didn't seem useful for programmatic music.
- viraptor 6y ago> That said, for modes, AFAIK the names are all 100% arbitrary This annoyed me a lot when learning the basics. One thing I noticed when I experimented with what things would be called without the traditional names is that I would lose the "namespace" of what I'm thinking about. I think the names are awful, but Dorian means something specific, C something specific, etc. You can map it to just numbers like... scale 1 for note 1, mode +1, chord 5 and it may be initially easier to "calculate" the result, but also more confusing. But then you just get used to the names with enough practice. A bit of a Stockholm syndrome. They're still awful, but familiar enough you stop caring.
- PaulDavisThe1st 6y agoOne unfortunate dangling problem with the historical nomenclature is this: "scales have modes" This is wrong. A scale is an interval series. A mode is an interval series. There is no difference between them. It just so happens that there are ways to permute some interval series to generate others. Because western music is so focused on the interval series we call the major scale, people noted that you can permute this into a series of other interval series. But none of those interval series (Aeolian, Phrygian, Lydian etc) "own" or are the basis for the others: they are all related by permutation. You could just as easily say "Modes of the Phrygian scale" and you would still be referring to the same set of interval series.
- abetusk 6y agoHere are my notes on it [0] [1]. Feel free to extend, "steal", add or whatever. I'd also love to see a book, blog post or article from someone who's more competent then myself. [0] https://github.com/abetusk/dev/blob/release/notes/MusicNotes.md https://github.com/abetusk/dev/blob/release/notes/MusicNotes... [1] https://github.com/abetusk/scratch/blob/release/notes/Music-Theory.md https://github.com/abetusk/scratch/blob/release/notes/Music-...