ET Approximations of Just Intervals
How can we find an equal temperament interval that is a good approximation of a just inteval?
A just interval can be interpreted as a frequency ratio p/q, where p and q are positive integers.
An equal temperament inteval can be interpreted as the m-th note in a n note equal temperament. Here, n is a positive integer, and m is a non-negative integer. For convenience, we let m start at 0, so the root note is actually the "0th" note. If the equal temperament is octave equivalent, then this interval can be represented as the frequency ratio 2^(m/n).
Now the problem becomes: Given p and q, how do we find such n and m so that 2^(m/n) ~= p/q?
We can rewrite the statement like this:
2^(m/n) ~= p/q
m/n ~= log2(p/q)
Since we know p and q, we can calculate the real number log2(p/q). So we need to find a rational number m/n that approximates this real number. This is a topic in number theory: Diophantine approximation.
Looks like we can just choose a very large n to get a good approximation (if n is a power of 10, this is the same as saying use many digits after the decimal point). But we can actually find "best" approximations, in some sense.
According to number theory, to get a "best" approximation of a real number, we can convert the number to continued fraction form, choose one term and discard the rest after that, and reduce the fraction to get a rational number. The different rational numbers we get from choosing different terms are all the "best" approximation of this real number.
For example, the continued fraction form of π is [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15, 3, 13, ...]. By selecting the 1st, 2nd, 3rd... term, we can get the following results:
1 -> [3;] = 3 = 3
2 -> [3; 7] = 3 + 1 / 7 = 22 / 7 ~= 3.142857
3 -> [3; 7, 15] = 3 + 1 / (7 + (1 / 15)) = 333 / 106 ~= 3.141509
4 -> [3; 7, 15, 1] = ... = 355 / 113 ~= 3.141593
...
22 / 7 and 355 / 113 are indeed two famous approximations of π.
Back to the main topic, we can try to find the approximation of the pure fifth (3/2), one of the most important interval in Western music:
log2(3/2) = [0; 1, 1, 2, 2, 3, 1, 5, 2, 23, 2, 2, 1, 1, 55, 1, 4, 3, 1, 1, 15, 1, 9, 2, 5, 7, 1, 1, 4, 8, ...]
1 -> [0;] = 0
2 -> [0; 1] = 1
3 -> [0; 1, 1] = 1 / 2
4 -> [0; 1, 1, 2] = 3 / 5
5 -> [0; 1, 1, 2, 2] = 7 / 12
6 -> ... = 24 / 41
7 -> ... = 31 / 53
8 -> ... = 179 / 306
...
The rational number 7 / 12 means the 7th note in 12 tone equal temperament! This is the most common temperament in modern western music, and this equal temperament inteval has only a 2 cent difference to the just interval. Some music use the 41 TET and 53 TET you see after.
We can apply this procedure to other intervals as well. For example, one choice for the just third, frequency ratio 5/4, can be approximated by the 9th note in 28TET. We can even extend this to equal temperaments that are not octave equivalent: 2^(m/n) now becomes (k-1)^(m/n),which means equal division of k octaves. Many interesting and useful equal temperaments can be found this way.