Monday, March 2, 2015

Music Theory for Conworlders: Modular Arithmetics and Some Tricks

We will do a slight diversion into a relevant topic to prepare ourselves for a thing that I'll soon get into here. The topic is modular arithmetics.

You all probably know how the minutes wrap around at 60, and the hours at 12. These are examples of modular arithmetics. We can do modular arithmetics with any number, not just 12 and 60.
5 + 5 mod 8= 2, because 5+5 = 10, 10/8 leaves a remainder of 2.
Modulo twelve is worth considering as a first example, however, since it has certain properties that help illustrate some of the properties of modular arithmetics. I will map the tones of western tuning to the twelve numbers of modulo twelve:
01234567891011
AA#BCC#DD#EFF#GG#
Note that we could just as well have picked A# or D or Db or whichever other tone as 0. Now, as it happens, these numbers encode two things. 1) They encode individual pitches. '5' = 'D'. However, we can also consider them to be representations of intervals - i.e. 5 also is the distance from 0 to 5. In such a notation, we can start combining intervals. If we call '2' the 'second', A to B forms a second, but so does C to D, or C# to D#. G# to A# as well, due to our resetting the counter at twelve.

Let us consider what happens if we pick a number from (1, 11), and repeatedly add it, i.e. 0, 0+2, 0+2+2, 0+2+2+2. Turns out we get 0,2,4,6,8,10,(12=0,14=2,16=4, ...) and we have a cycle. We'll never break free of that cycle just by repeatingly adding twos. What happens with 3? 0, 0+3, 0+3+3, ...= 0,3,6,9,12=0,... and with 4? 0,4,8,(12). 6? 0,6(,12). How about 8? (0,8,16=4,12), And 9? 0,9,18=6, 15=3, 12. Finally, 10 gives us the same result as 2, only 'backwards': 10, 8, 6, 4, 2, 0.

Turns out only numbers that are coprime with the period (i.e. the 'size' of the set) will crank out each possible number if you keep iteratively adding it. Obviously, 1 will do that for any size. But that gives a boring structure. In 12, the only other options are 11 (which gives 1 in reverse), or 5 or 7 (which are each other's reverses as well - this due, in fact to 5+7=12). This has some further consequences: for prime-number-sized sets, any integer will generate the whole set, for composite-number-sized sets, there will be smaller 'cycles' in them. The cycles are subgroups - one can in fact do modular arithmetic on them as well, i.e. the {0,2,4,6,8,10} set basically behaves exactly like a {0,1,2,3,4,5}, mod 6 set - i.e. we map each integer in the first to its halved version in the second, and cut the period in half as well.

When we iterate over the set using such a coprime 'generator', we may get some interesting structures, as we can see for arithmetic modulo twelve. We see something that is slightly regular, slightly irregular appear:

0 ∪ (0+7) = 7
0, 7 ∪ (7+7) = 14, mod 12→2
0, 2, 7 ∪ (2+7) = 9, mod 12→9
0, 2, 7, 9 ∪ (9+7) = 16, mod 12→4
0, 2, 4, 7, 9 ∪ (4 + 7) = 11, mod 12→11
0, 2, 4, 7, 9, 11 ∪ (11+7) = 18, ... 6
... 0, 2, 4, 6, 7, 9, 11, (12)
(We can go on, obtaining along our way things like 0,1,2,4,6,7,9,11; 0,1,2,4,6,7,8,9,11; 0,1,2,3,4,6,7,9,11; 0,1,2,3,4,6,7,8,9,10,11; and finally the full set)

We can see how the first part, 0,2,4,6 in fact is common with what we'd get if we went and took '2' as our generator. This is somewhat natural: from the vantage point of, say, 0, adding two sevens in succession will obtain a '2'; repeating it twice more will add a '2' to the previously obtained '2'. In some sense, 7 is half of 2! We also notice how 7, 9, 11 form a similar - albeit shorter structure, that is 'offset' by one from the 0,2,... series; if we were to start at 7 and do the 'add two' operation, we'd obtain exactly those values first. By adding sevens, we create two 'slighly offset' two-series. However, we could have stopped at another time: we could have stopped when we had 0, 2, 4, 7, 9. At this point, we have differences of two and three; Both two-series are now one member shorter, and they are separated at both ends by a larger gap.

We could of course consider something like '4' or '3'; these divide twelve, but they can have their own internal structures that we simply repeat in the octave
0, 2, (3). → 0,2, 3, 5, 6, 8, 9, 10, 11, 12
0, 3, 4 → 0, 3, 4, 7, 8, 11, 12 
Since the period is 3, what we really have is 0, 2,3. We could fill these out all the way to twelve: 0, 2,3 5,6 8,9 11,12. In essence, we make a stencil: x-x, where x=in the set, - = not in the set, and we line these stencils up one after the other, getting x-xx-xx-xx-x. We can do the same for four, although now we have two options: x--x, x-xx. (I omit the full options xxx, xxxx since they're not all that interesting.)



Now, these are methods for scale building that more or less actually happen in western art music (the x-x scale is the dim scale much used in some styles of jazz, the x-xx scale is somewhat more difficult to find examples of, but Messiaen probably has some works. However, the stack of sevens that I elaborated a bit on above, that actually gives the lydian mode, and starting from the fifth tone of that (the one at index '7'), we obtain the regular ionian major scale, i.e. the vanilla major scale.

If the number of tones in our octave is not twelve, we may find other patterns that can be constructed like this, and we may even find that several different 'generators' generate multiple sets of interesting patterns. More of that later, however.

No comments:

Post a Comment