[expr ($i1*12+$i2)/7+$i3] How does this work?
Hi,
searching for a way to build a quantizer i found the following posting by Peter Castine:
[expr ($i1*12+$i2)/7+$i3] will map chromatic MIDI values ($i1) to a diatonic scale. Use $i2 to select a different church mode (0->Lochrian, 1->Lydian, 2->Aeolian, etc). $i3 transposes.
I gave it a try and it seems to work but i have no idea why, for example, how does changing $i2 create a new scale?
Would it be possible to expand this to get more esoteric scales out of it?
Really curious, thanks.
the only real suprise is that mapping chromatic to diatonic numbers can actually be done by just truncating floating the point results. ("/7")
the rest is ... just ... how transposition and modes work.
to make Cmajor into C# major you add +1 to every value.
to change the modality you declare another key to be the root but leave the diatonic scale of C major as is. make A the root of a C major scale and voila, welcome to a minor scale.
yes, you could do it with 14 instead of 12, if you like. but the result will not be what you expect, because the math trick contained in the /7 thing only "works" with halftones represented by integer values.
Thanks, Roman.
So if understand you correctly it wouldn´t be possible to get, for instance, a harmonic minor scale out of it?
"regular" minor is 7 halftones out of 12 key per octave, in their 6th mode.
you can also take 7 out of 14, or 5 out of 29, and shift it into some alternate mode, but i am not sure it makes much sense to call it "minor" anymore. :)
(btw the "church modes" p.c. is talking above are usually to be played in just scales (except on the piano or smaller organs); this also doesnt make much sense with divisions other than 12, because you had to invent your own standard for it.)
Oh, come on, Roman. Calculating 5th limit just intonation for any N-Tone scale is a walk in the park. :-)
ask me later. i have yet to understand why there are two different b flat versions in 12 tone just tuning systems.