This is some mathematical detail on how to define 2-D scales, or linear temperaments. The example is for meantones, but the same method can easily be applied to schismic and diaschismic as well. This document uses my matrix formalism, so you'll need to study the exposition of that in order to understand this.

A general 2-D approximation, or linear temperament, can be defined:

H' = H + (k2)p (k3)

H' is a matrix that behaves like H, but isn't, p is a real number corresponding to the pitch difference of a comma, and k2 and k3 are parameters.

Using this equation , once you've defined an interval in terms of H', you can find its corresponding pitch difference. However, the inverse problem also deserves attention: how to approximate an interval (w x y)H to (w' x')H'. This requires a conversion matrix, C, such that (w x y)C = (w' x'). In the case of syntonic meantone, where p=(-4 4 -1)H, C can be defined by the following equation:

( 1 0 0) (1 0) ( 0 1 0)C = (0 1) (-4 4 -1) (0 0)

This will work for any comma (i j k)H where |k|=1. For a 2-D scale approximating 4-D (7 prime limit) harmony, you need to define two commas (i j k l)H and (i' j' k' l')H where |kl' - k'l| = 1. Otherwise, the temperament can be defined, but not purely in terms of a fifth and an octave. Dischismic scales, for example, can be defined in terms of a

As the matrix here is unitary, we can solve for C really easily:

( 1 0 0)(1 0) ( 1 0) C = ( 0 1 0)(0 1) = ( 0 1) (-4 4 -1)(0 0) (-4 4)

With this matrix, any just interval can be converted into any
syntonic meantone expressed using the 2-D matrix H'.

Another application of matrix formalism to 2-D scales is the method of defining the scale from a comma being zero and two intervals being perfect. As an example, set the octave and the major 7th (-3 1 1)H to be perfect, and zero the syntonic comma. These conditions can be summarised:

( 1 0 0) ( 1 0 0) (-3 1 1)H' = (-3 1 1)H (-4 4 -1) ( 0 0 0)

Another comma needs to be defined for each new dimension, but the general method is the same.

To solve for H':

( 1 0 0)-1( 1 0 0) 1( 5 0 0) H' = (-3 1 1) (-3 1 1)H = -( 4 1 1)H (-4 4 -1) ( 0 0 0) 5(-4 4 4)

My computer did the inverting and multiplication, which would take a while by hand. If you're expecting a fractional comma meantone, you can go straight to the denominator by calculating the determinant of the matrix on the left. Rearranging for the form above:

( 5 0 0)H (1 0 0) 1( 0 0 0) ( 0 ) H'= ( 4 1 1)- = (0 1 0)H + -( 4 -4 1)H = H + (-1/5)(-4 4 -1)H (-4 4 4)5 (0 0 1) 5(-4 4 -1) ( 1/5)

It's quite alright to throw away the third dimension: it means taking the first two prime to dimensions to be a basis. Then, this is 1/5 comma meantone from the general form: k2=0, k3=-1/5, p(k) = (-4 4 -1)H.

As in this case octaves are perfect, the calculation can be simplified by using the octave invariant matrix h:

h' = (1 1)-1(1 1)h = (-1 -1)(1 1)h= (1 1)h(4 -1) (0 0) (-4 1)(0 0)-1-4 (4 4)5

Inverting 2*2 matrices is really easy if you know how. The only dimension we're now interested in is then (1 1)h/5 = (1 0)h + k(4 -1)h, or (1 1) = (5 0) + k(20 -5). The solution of this is k=-1/5, consistent with k3 above. Again, this is the determinant of the defining matrix.

Once you've got all that sorted out, have a look at my page on equal temperaments for some simpler applications of matrices.

my microtonal documents