## Wednesday, August 26, 2015

### Twisted Telemann

My friend J.-S. Truchy pointed me to some interesting microtonal software: tune.js. This software got me thinking in several directions.

The first puzzle for me was: what is a .js file? What programming language is that? Easy enough to do a quick search and discover that it is java script. I have heard of java script! But I have never looked at any! This really underscored for me my situation. I have been writing computer programs since 1970, i.e. for 45 years. My first programs were in IBM 1401 Autocoder. The first programs I ran were in IITRAN (from the Illinois Institute of Technology). From there I got into Fortran, IBM 360 Assembler, etc. In short, I am a dinosaur! I can still read JCL in my sleep, but this was my first look at java script!

The second puzzle was: what exactly does this tune.js program do? I see that I can click on the image of the keyboard and adjust its tuning. But that seems to be merely the tip of the iceberg! Somehow there are many microtonal scales made available by this program, but I can't fathom how to access them!

Rather than getting stuck in my frustration over things I can't figure out how to do, I often like simply to forge ahead with things that I can figure out how to do! With luck I can pick up a little inspiration from the abandoned route whose first handhold proved already beyond my grasp.

So, in this case, what might I do to adapt my current favorite scale, Hanson[11], to a conventional keyboard? To start with, a conventional keyboard really wants 12 notes per octave. Hanson[11] can easily be extended to Hanson[12], so that is easy. What would that look like, just to put that scale on the keys? The only issue is, which note of the Hanson[12] scale to assign to the keyboard C? Here is what I came up with:

The numbers on the keys are based on the equal division of the octave into 53 equal parts, the microtonal system that I have been exploring and in which the Hanson[12] scale works well. The particular numbers are not meaningful: it is the differences between the numbers that matter. So, for example, the lowest C has the number 0 and the lowest D has the number 11. So the frequency ratio between D and C is 2^(11/53). This doesn't correspond very well to any just tuned interval. The truth is, this is a rather warped tuning for a conventional keyboard! But it might be fun, anyway!

The Hanson scales are based on minor thirds. Dividing an octave into 53 equal parts gives a good approximation for a minor third of 14 microsteps. This is to say that 6/5, the frequency ratio of a just tuned minor third, is very close to 2^(14/53). Almost every key on the keyboard has some other key which is 14 microsteps higher and another key which is 14 microsteps lower. Only the E has no key 14 microsteps lower, and only the Eb has no key 14 microsteps higher. These are the notes at the two ends of the stack of minor thirds from which the Hanson[12] scale is constructed.

These minor third relationships can be marked on the keyboard:

Most of the 14 microstep minor thirds appear where they should on a conventional keyboard. For example, C to Eb is a conventional minor third, and with this tuning the notes are indeed 14 microsteps apart. But the fit is not perfect. Some intervals of 3 conventional half-steps are not 14 microsteps apart, e.g. D to F. Instead, it is D to F# that is 14 half-steps. In the above diagram, I used dashed arrows to indicate intervals of 14 microsteps that do not appear 3 conventional half steps apart on the keyboard.

What makes the Hanson scale interesting is that it takes advantage of the tempering of the Kleisma by the underlying microtonal system. Even though the Hanson scale is built out of minor thirds, intervals of a perfect fifth appear. When the octave is divided into 53 equal parts, a perfect fifth is represented as 31 microsteps. It is the very close approximation of 3/2 by 2^(31/53) that makes 53 interesting musically.

The perfect fifths in the Hanson scale appear as follows on the keyboard:

Here again solid arrows are used when the perfect fifth appears in a conventional way, i.e. separated by 7 conventional half steps. Dashed arrows are used when a perfect fifth appears unconventionally.

Given a conventional keyboard, conventional music can easily be played in this unconventional tuning, e.g. a minuet.