Using Scala to transform just intonation

From Xenharmonic Wiki
Jump to navigation Jump to search

Scala seq files

Suppose we have a piece in Just intonation which we want to put into the Scala seq file format, which is Scala's musical score format. We can enclose the pitch values in parenthesis, so that they have the form (5/4) for a major third or (7/6) for a subminor third. Another form is monzo format, where (|-2 0 1>) can be used in place of (5/4), and (|-1 -1 0 1>) in place of (7/6). An alternative is to use Scala degree numbers. This involves using lines like "4564 note 61 47" in the seq file, where the number right after "note" is the degree or note number. Scala needs additional information in the form of a scale or a declaration of what equal division is being used to interpret the note number, but one of the advantages is that by changing the scale, you can change the music Scala outputs in the form of a midi file.

5-limit transformations

Suppose we have a scale in 5-limit JI. One of the most basic transformations we can apply to such a scale is the major-minor involution. This changes major triads such as 1-5/4-3/2 to minor triads such as 1-6/5-3/2, and vice-versa. Suppose, for example, our scale is the Ellis duodene: 16/15 9/8 6/5 5/4 4/3 45/32 3/2 8/5 5/3 9/5 15/8 2. Going to "Project" under the "Modify" pull-down menu, and putting "5 24/5" into the box called "Factor pair(s)", the resulting scale will be 10/9 9/8 5/4 6/5 4/3 27/20 3/2 5/3 8/5 15/8 9/5 2. If we use this scale in place of the duodene (be sure not to change the ordering!) using the "Tools" pull-down menu at "Transform sequence to midi file", we will get our original 5-limit duodene piece, only with major and minor switched about. If we put "5 24/5" in the Project command again, we get the duodene back again, which is why this transformation is called an involution.

An alternative method of accomplishing basically the same thing is to use monzo notation for the notes, only without parenthesis. That is, a major third is represented, not by (|-2 0 1>), but by |-2 0 1> with no parentheses. To get this seq file to produce a midi, you need to put both a val command and a corresponding equal command at the top of the file, such as "0 val <612 970 1421|" together with "0 equal 612". This has the advantage of not requiring a scale file. To produce a midi file with the major-minor involution, replace the mapping for 5 with one for 24/5 in 612edo or whatever equal division you choose to use; in this case "0 val <612 970 1385|".

A more exotic transformation is obtained by putting "3 16/5 5 24/5" into the Project box. If we put 3 5 in as our scale using New Scale under the File pull-down menu, then applying this once gives 16/5 24/5 of course, but applying it twice gives 10/3 16/3, which is a new transformation we can obtain directly by "3 10/3 5 16/3". Applying it three times brings us back to 3 5 again. The transformation is of order three, not order two like the major-minor involution. If we apply it first and then major-minor, we obtain 10/3 5, which gives us yet another transformation; on the other hand, applying major-minor first, we end up at 16/5 16/3. This means that the group of transformations is nonabelian. In fact, it is the smallest of all nonabelian groups, the group of the triangle or dihedral group of order six. In total, counting the identity transformation, we get these six transformations:

3->3 5->5

3->16/5 5->24/5

3->10/3 5->16/3

3->3 5->24/5

3->16/5 5->16/3

3->10/3 5->5

If we apply the Quantize command under the Modify pull-down menu, putting 3 in the box for resolution, we get the 3edo versions of all of these, which turn out to be the same: the 3edo "skeleton", as we might call it, of 5-limit just intonation is left invariant by these transformations.

Do Wah Diddy Diddy 3 16/5 5 24/5 3 10/3 5 16/3

7-limit transformations

The native 7-limit transformations work very much the same as the 5-limit transformations. Instead of triads we have tetrads, instead of invariance under 3edo we have invariance under 4edo, and instead of the group of the triangle we have the group of the square.

We first note that the major-minor involution extends to the 7-limit, with the projection being "5 24/5 7 48/7". Instead of a transformation of order three, we get one of order four, by "3 14/5 5 24/5 7 32/5". Applying this twice leads to "3 8/3 5 14/3 7 20/3" and three times to "3 20/7 5 32/7 7 48/7", and applying it once again leads back to 3 5 7. Since "3 14/5 5 24/5 7 32/5" is of order four, "3 8/3 5 14/3 7 20/3" is another involution. We end up with a total of eight transformations:

3->3 5->5 7->7

3->14/5 5->24/5 7->32/5

3->8/3 5->14/3 7->20/3

3->20/7 5->32/7 7->48/7

3->3 5->24/5 7->48/5

3->14/5 5->14/3 7->7

3->8/3 5->32/7 7->32/5

3->20/7 5->5 7->20/3

Just as the 5-limit transformations are left invariant by <3 5 7|, these native 7-limit transformations are left invariant by <4 6 9 11|. However, we can increase the number of 7-limit transformations by no longer requiring that <4 6 9 11| be left invariant, and extending the 5-limit transformations to the 7-limit. If we extend "3 16/5 5 24/5" to the 7-limit as "3 16/5 5 24/5 7 28/5", then applying it twice leads to "3 10/3 5 16/3 7 14/3" and three times to "7 7/2"; the transformation is of finite order modulo octave equivalence, but not absolutely. We can cure this by using it together with its inverse transformation, "3 10/3 5 16/3 7 28/3". If we do this, we get a cycle of order two from major-minor, of order three from transformations lifted from the 5-limit, and of order four from "3 14/5 5 24/5 7 32/5", for a group of order 24, the group of the tetrahedron. If we add to our transformations the inversion, "2 1/2 3 1/3 5 1/5 7 1/7", we end up with a group of order 48, the group of the octahedron, the full set of symmetries of a hexany. This is illustrated by the piece hexany phrase.

The transformations listed above do not exhaust the interesting 7-limit transformations. If we put "5 36/7 7 36/5" into the Factor pairs box, we interchange major with supermajor tetrads, and minor with subminor tetrads. Doing it twice restores the orginal scale; this is another involution. Doing major-minor first, followed by major-supermajor, leads to "5 14/3 7 20/3", which sends major tetrads to subminor tetrads and minor tetrads to supermajor tetrads. It isn't an involution, but it is invertible, with inverse transformation "5 21/4 7 15/2" which is what you get by doing major-supermajor first, then major-minor.

Other transformations

Many other interesting transformations can be performed using Scala. For one example, "5 56/11 7 80/11 11 128/11" is another involution, this time of the 11-limit. "5 44/9 7 22/3" on the other hand projects the 11-limit down to its 2.3.11 subgroup, and "5 24/5 7 36/5 11 52/5 13 64/5" projects the 13-limit down to the 2.3.5.13 subgroup.