In the previous chapter, we saw that Pythagorean frequency ratios were paired with interval names like the major second and diminished fourth. They were also paired with coordinates like the M2 had coordinates (2, -1) in the (P5, P8) representation. The coordinates and the interval names are basically equivalent - an interval has a name and it has coordinates, and there is a method for converting between them.
That tells you a little bit about what intervals are in terms of what you've already seen in this book. Intervals are pretty fundamental to western music theory - we use intervals to talk about melodic motions and harmonic relations and tuning theory. This chapter won't be about melodic motions or harmonic relations, and will only touch a little bit on tuning theory. First, we're just going to learn a lot about intervals.
If you're still not intrigued, let me just say that you probably already have some half-formed or half-mistaken notions about intervals from being taught music in the dominant grade school 12-EDO paradigm, and if you want to break out of that paradigm and into microtonal music, simply expanding and correcting your understanding of intervals will get you most of the way out of the box. I hope you like math and music theory? I don't think I should have to warn you, but that's what we're doing in this post.
Intervals as a concept arose as an abstraction of frequency ratios, but we can define them without reference to history by their properties and relationships, ignoring frequency ratios entirely.
Intervals are a group of mathematical objects that we can add and subtract from each other. They have names consisting of an interval quality like (Perfect, Major, Minor, Augmented, Diminished, ...) and an ordinal number, like (First, Second, Third, ...). Intervals can be thought of as the signed distance between pitches (like the distance between middle C and the Bb above it), but I'll try to define an algebra of intervals here without reference to pitches.
Intervals are not names for frequency ratios: an interval can be associated to frequency ratio within a tuning system, but e.g. frequency ratios are real valued numbers, whereas intervals are more like vectors. People working in a given tuning system often forget that the associated things are not identical, but we will do better.
The perfect unison, P1, is the identity element of interval addition, so you might be tempted to say that P1 is at least a name for the frequency ratio (1/1), but I'm here to dissuade you of the notion. They're just different things. Keep them separate or you'll start saying mathematical nonsense like "The 19-EDO tuning systems equates 81/80 and 1/1." An interval normally tuned to 81/80 can instead by tuned to 1/1, which is a bit like making them equal, but two frequency ratios can not be made equal, and if you conflate the two notions, people will look at you funny on account of your grade school arithmetic mistakes. I wan to emphasize this a lot because most of the microtonal music community regularly makes this mistake.
Not all intervals are made the same - in so much as they are like vectors, you won't be surprised to learn that you can have two, three, four-dimensional intervals and so on. The intervals associated with Pythagorean frequency ratios in the previous chapter, e.g. the ones in the (P5, P8) representation, were 2D intervals, which all together I'll call the "rank-2 interval space". I will use "rank" and "dimension" fairly interchangeably in this text when referring to intervals. My apologies if that doesn't match your usage.
Just as we generated rank-2 intervals by combining two intervals as basis elements, with three independent basis elements, we could generate rank-3 intervals. With four independent basis elements, we could define rank-4 intervals. And so fourth. Independent here roughly means that you can't get any one basis element by combinations of the others. We also generally don't allow the unison, P1, to be a basis element.
The Pythagorean tuning system associates the basis intervals P5 and P8 to the frequency ratios (3/2) and (2/1) respectively, and from that association (and from the rules of naming and manipulating intervals that we'll talk about in this chapter), we can generate frequency ratios for every other rank-2 interval. Pythagorean tuning happens to be a just intonation system, meaning that every interval is associated with a rational frequency ratio. This won't always be the case: some tuning systems will associate intervals to irrational values, or to a mix of rational and irrational values.
I was taught about intervals by Edward Lilley, who knows more math than me and says that interval spaces are abelian groups, with members representable as tuples of integers. A vector space, I believe, is an abelian group where you can also scale the elements. This does not mean that interval spaces are not vector spaces - they might have more structure. I think they are in fact vector spaces, but I don't know much abstract math like group theory, so instead of comparing intervals to other mathematical objects, we'll just learn directly about intervals, which I know pretty well. Okay? Okay.
Intervals are representable as tuples of integers. The coordinates that we used in the post on Pythagorean tuning, like (-1, 1) for P4, are just such tuples of integers. You can do arithmetic on those integers just like vectors, so that e.g.
P4 + P4 = (-1, 1) + (-1, 1) = (-2, 2)
in the (P5, P8) basis. You just work with the columns positionally and independently, first column with first column, second column with second column.
Let's talk about how to name and manipulate intervals.
For this, we're not going to work in the (P5, P8) basis; there's a really cool basis made up of the augmented unison and the diminished second, (A1, d2), that Edward Lilley uses to teach rank-2 interval algebra, and we shall use it as well.
Lilley's (A1, d2) basis is beautiful in many ways. One nice thing about it is that the A1 component for an interval tells you how many semitones/half-steps the interval will be when tuned to 12-EDO. This is a thing many musicians have memorized - for example, the distance of P5 over a reference pitch, played on a standard 12-EDO guitar or 12-EDO piano is 7 frets up or 7 keys up. And so the first component of P5's coordinates in Lilley's (A1, d2) basis is 7.
The second component of an interval expressed in this (A1, d2) basis is also easy: it's just the ordinal/numeral of an interval minus one.
Perfect fifth → 5 - 1 = 4.
Major 13th → 13 - 1 = 12.
So P5 has coordinates (7, 4) in the (A1, d2) basis.
These two facts about the (A1, d2) basis let me generate coordinates for many intervals off the top of my head, including all of the standard natural chromatic intervals. Here are a few useful intervals in the (A1, d2) basis:
P1: (0, 0)
A1: (1, 0)
d2: (0, 1)
m2: (1, 1)
M2: (2, 1)
m3: (3, 2)
M3: (4, 2)
P4: (5, 3)
A4: (6, 3)
d5: (6, 4)
P5: (7, 4)
m6: (8, 5)
M6: (9, 5)
m7: (10, 6)
M7: (11, 6)
P8: (12, 7)
I don't know coordinates for half of those intervals in the Pythagorean basis, (P5, P8), without doing some involved multiplication or division. Lilley's system is tremendously satisfying in how well it fits in my head and I hope you can learn to love it too.
Here are some rules for manipulating rank-2 intervals and figuring out the new interval names:
Adding an augmented unison, A1, to an interval is called augmentation. Augmenting an interval changes its quality prefix but not its ordinal. Augmenting a minor interval makes it major: {m3 + A1 = M3}. Augmenting a major interval makes it once-augmented: {M7 + A1 = A7}. Augmenting a perfect interval also makes it augmented: {P4 + A1 = A4}. Augmenting an augmented interval makes it twice augmented: {A1 + A1 = AA1}. Augmenting a multiply diminished interval makes it one-degree less diminished: {dd3 + A1 = d3}. Augmenting a once-diminished interval is a little tricky, because what is a zero times diminished interval? I'll tell you! It can become either minor or perfect, depending on the ordinal. Some ordinals, namely the 1sts, 4ths, and 5ths are "perfect", in that they don't have major and minor versions between augmented and diminished versions, e.g. ( ... dd4, d4, P4, A4, AA4, ...). In contrast, 2nds, 3rds, 6ths, and 7ths are "imperfect": their versions do have major and minor versions between the diminished and augmented versions, e.g.. ( ..., dd2, d2, m2, M2, A2, AA2, ...), and no perfect quality, like the fictitious perfect second, P2. So augmenting a d4 gives a perfect interval, {d4 + A1 = P4}, because 4 is a perfect ordinal, and augmenting a diminished second produces a minor interval, {d2 + A1 = m2}, because 2 is an imperfect ordinal. These names are determined more by history than by the math: I don't expect Aliens to use analogous interval names, even if they have identical music. But history found a pretty good system and we'll use it productively to make microtonal music. An interval that is an octave above or below a perfect interval will also be perfect, and an interval that is an octave above or below an imperfect interval will also be imperfect: e.g. for example, an octave above a perfect fourth is another perfect interval knows as the perfect eleventh - {P4 + P8 = P11} or an octave below a minor ninth you will find another imperfect interval, the minor second - {m9 - P8 = m2}. These are not two new facts that you have to memorize - you can verify them by doing addition of the interval coordinates. You may notice that all of the intervals have a historic off-by-one error in their names, so the arithmetic looks a little weird, but {P4 + P8 = P11} is just like {3 + 7 = 10}. If you want to know what a sixth plus a ninth gives you, that's {5 + 8 + 1 = a 14th}. It's not great, but basically every western composer and music theorist in the last 700 years has put up with it (besides Sergei Taneev), and it works okay. It's bearable. Okay? Okay.
Subtracting an augmented unison, A1, from an interval is called diminution. Diminishing works fully the reverse of augmenting, so that {dd2 - A1 = dd3} and {P4 - A1 = d4} and so on. Twice augmented intervals become one augmented. Once augmented intervals become perfect or major, depending on the ordinal. Major intervals become minor. Minor intervals and perfect intervals become diminished. Diminished intervals become twice diminished. And so on.
If that wasn't clear, look at these two patterns. Intervals with imperfect ordinals have minor and major versions. They look like this
( ..., dd3, d3, m3, M3, A3, AA3, ...)
Augmenting means moving right in this list. Diminishing means moving left. The imperfect intervals are 2nds, 3rds, 6ths, 7ths, and their octaves.
Intervals with perfect ordinals don't have major and minor versions. They look like this:
( ... dd5, d5, P5, A5, AA5, ...)
Augmenting still means moving to the right here. Diminishing still means moving to the left. The intervals with perfect ordinals are 1sts, 4ths, 5th and their octaves.
Now, here's the algorithm for figuring out the name for an arbitrary interval {x}, represented in (A1, d2) coordinates with some random numbers like (11, 8):
Finding the ordinal is easy: take the d2 component and add one. So this interval is some kind of a 9th.
To get the quality, first repeatedly add or subtract an octave = P8 = (12, 7) from the coordinates until the d2 component is >= 0 and < 7, i.e. so that the ordinal is a unison or larger, but less than an eighth. This is the "octave-reduced" interval. In this example, we get (-1, 1) as our octave reduced interval.
Augment or diminish the octave-reduced interval until you've got the coordinates for one of natural intervals that you know and love, i.e. a perfect major or minor interval: (P1, m2, M2, m3, M3, P4, P5, m6, M6, m7, M7).
From the number of augmentations or diminutions needed to reach a natural interval, and from the quality reached, reconstruct what the original quality must have been. For example, if you augment twice and end up at a m2 (with coordinates (1, 1)), then the original interval must have had a quality twice diminished from that (and possibly displaced by octaves), e.g. dd2 or dd9 or dd16 or even a negative ordinal. But "dd" is the quality.
Put the quality and ordinal together. It was a dd9! A twice diminished ninth has coordinates (11, 8) in the (A1, d2) basis. We did it! Good job.
Now you can figure out the name for the interval with coordinates (60, 38) or any other random noise. Reversing this procedure to find coordinates given a name is a task of comparable complexity and nearly identical steps. I'll post some python code soon in case you don't want to do it by hand.
Let's talk a little bit about how to convert coordinates between different bases.
First, suppose you have interval coordinates (a, b) expressed in the Pythagorean (P5, P8) basis. Maybe you don't know the interval name - you just want to convert to (A1, d2) coordinates because that will help you figure out the name.
To convert to the (A1, d2) basis, it will help if you at least know the old basis vectors in the new basis. We know generally how to find (A1, d2) coordinates for named intervals like P5 and P8, so that's no sweat:
P5 = (7, 4)
P8 = (12, 7)
Next we multiply the row vector (a, b) by the matrix [[7, 4], [12, 7]], producing a new row vector in the new basis. Let me try to write that with a little more notation. Starting with an interval {W} written (a, b) in (P5, P8) coordinates, we can calculate W's coordinates in the (A1, d2) basis this way:
W_(A1, d2) = W_(P5, P8) * [P5_(A1, d2), P8_(A1, d2)]
And now let me say it in english one more time. To convert a target interval from an old basis into a new basis, multiply it by a matrix whose entries are the old basis elements represented in the new basis.
Let's try it! What interval is W = (-9, 7)_(P5, P8) in the (A1, d2) basis?
W_(A1, d2) = [-9, 7] * [[7, 4], [12, 7]] = [21, 13]
This is some kind of 14th interval. Subtracting octaves P8_(A1, d2) = (12, 7) until we get in the range of the base octave of natural intervals, we see that the octave reduced form of this is
(21, 13) - (12, 7) = (9, 6)
some kind of 7th interval. If we compare it to a known 7th interval
m7: (10, 6)
we can see that it's less than m7 by A1, i.e. it's one diminished from m7, so it's the diminished 7th, d7. That's our octave reduced target interval. To name our actual interval, we have to add the octave back in
d7 + P8 = d14
Like adding a unison, adding an octave doesn't change the interval quality, it just changes the ordinal. And we already said it was going to be some kind of 14th interval,. so we could have just stuck "d" from "d7" onto "14", but this is nicer.
I'm going to show you a little trick to verify this calculation.
The original coordinates (-9, 7)_(P5, P8) tell us that
d14 = -9 * P5 + 7 * P8
And if P5 and P8 are tuned in the Pythagorean way, we also have
t(d14) = (3/2)^(21) * (2/1)^(13) = 65536/19683
Likewise, the equivalent coordinates (21, 13)_(A1, d2) tell us that
d14 = 21 * A1 + 13 * d2
Here's the trick: if we use the Pythagorean tunings of A1 and d2, we should get the same ratio as before:
t(d7) = (2187/2048)^(21) * (524288/531441)^(13) = 65536/19683
Not bad, right? I don't know if you'll find that suprising or not. While it worked here in Pythagorean tuning, it certainly doesn't work in all tuning systems. We'll explore why this works in a future chapter.
If you don't want to invert a matrix, E. J. Lilley has got you covered. Using Cramer's rule, he's given a closed-form solution for changing the basis of an interval with known coordinates into coordinates of another rank-2 tuning systems. First, find the coordinates for the new basis intervals in a basis you know, like (A1, d2). Call the coordinates
basis_element1 = (a, b)
basis_element2 = (c, d)
Also find (A1, d2) coordinates for the interval you want to re-express in the new basis. We'll call the old coordinates (m, n) and the new coordinates in the (basis_element1, basis_element2) basis will be called (x, y). Then by a manipulation of determinants, Cramer and Lilley give:
x = (dm - cn) / (ad - bc)
y = (an - bm) / (ad - bc)
This isn't always the best formula; if you know coordinates for an interval in an unfamiliar basis and you want to know what they are in (A1, d2) so that you can figure out the interval's name, then the matrix trick will serve you better. For example, in the last post we talked about the Pythagorean comma, with coordinates (12, -7). How could we verify that it is indeed an augmented zeroth interval? Just input
{12, -7} * {{7, 4}, {12, 7}}
into wolfram alpha, and you'll get (0, -1) back as your (A1, d2) coordinates. From the -1 in the d2 component, we know this is some kind of zeroth interval. Next we have to figure out the quality: add an octave, (12, 7), to put the d2 component in the range [0, 7), and you get (12, 6), which is once augmented from our old friend M7 = (11, 6), so the original interval is an A0.
Let's do another basis conversion! Lots of people in the microtonal community like to use the (P8, P12) basis for rank-2 intervals - we already saw this one a little in the chapter on Pythagorean tuning. Let's figure out how to convert intervals in (P8, P12) to the (A1, d2) basis, so that we can name those intervals.
Let's say you have some crazy interval like (-84, 53) in the (P8, P12) basis. First we need our old basis interval in represented in the new basis:
P8_(A1, d2) = (12, 7) in the (A1, d2)
P12_(A1, d2) = P8 + P5= (12, 7) + (7, 4) = (19, 11)
The calculation looks like this:
W_(A1, d2) = W_(P8, P12) * [[12, 7], [19, 11]]
W_(A1, d2) = (-84, 53) * [[12, 7], [19, 11]] = (-1, -5)
You can also use Cramer's rule and the fact that the Pythagorean A1 (which Pythagorean tuning assocaited to the frequency ratio 2187/2048) has coordinates (-11, 7) in the (P8, P12) basis, and the Pythagorean d2 (justly tuned to 524288/531441) has coordinates (19, 12) in the (P8, P12) basis. These coordinates are simply the exponents of the primes in the just frequency ratios. Easy to calculate.
Then we just use these values:
m, n = (-84, 53)
a, b = (-11, 7) # Pythagorean A1 (justly tuned to 2187/2048) in the (P8, P12) basis
c, d = (19, -12) # Pythagorean d2 (justly tuned to 524288/531441) in the (P8, P12) basis.
In the Cramer's rule formula:
x = (d * m - c * n) / (a * d - b * c)
y = (a * n - b * m) / (a * d - b * c)
With the same result. Easy peasy. You may also note that the ((12, 7), (19, 11)) matrix and the ((-11, 7), (19, -12)) matrix are inverse to one another.
After a little figuring, we see that (-1, -5) is an AAAAAAA-4. This interval was studied by the 17th-century German mathematician Nicholas Mercator and is also called Mercator's comma in his honor.
Using the Cramer's rule trick gets a little tricky in high dimensions, because you have to find high dimensional matrix determinants.
Ok. We've talked a little bit about what intervals are generally, and we've seen a lot of specifics of what rank-2 intervals are like. Intervals of higher ranks are pretty much the same, but you add on some adjectives / qualities for each added dimension. The naming rules will also change a little at first. We'll talk more about that in the posts on 5-limit just intonation (which is rank-3) and 7-limit just intonation (which is rank-4).
But for now, there's a lot of math and theory to be done for rank-2 intervals, so let's talk about some rank-2 tuning systems. A tuning system is just a set of basis intervals along with frequency ratios for each.
I'll use a lower case "t" as a function symbol to indicate the action of a tuning system on an interval, i.e. to indicate the action of tuning an interval to a frequency ratio.
Pythagorean tuning is defined by t(P5) = 3/2 and t(P8) = 2/1. So far I've been putting the P5 component first in tuples; which order you choose for the components isn't mathematically important, you just have to stick to some convention. Honestly, there's an aesthetic reason that will show up later why I should have gone the other way, but this is fine for now.
Now for some new tuning systems:
Pythagorean tuning only uses powers of 2 and 3 to make frequency ratios. But it turns out that many frequency ratios with 5s in the factors are also quite lovely. The right way to deal with this is to upgrade to rank-3 intervals, and in particular to a tuning system called 5-limit just intonation. The "5-limit" means the ratios contains primes up to 5, and the "just intonation" means that all the frequency ratios are rational, i.e. ratios of integers. We'll define 5-limit just intonation fully in a future post, but right away let's look at how it simplifies Pythagorean frequency ratios for the major and minor intervals:
m2: 256/243 → 16/15
M2: 9/8 → 10/9
m3: 32/27 → 6/5
M3: 81/64 → 5/4
m6: 128/81 → 8/5
M6: 27/16 → 5/3
m7: 16/9 → 9/5
M7: 243/126 → 15/8
You could argue that the tuned Major Second looks a little worse, but on the whole it's a massive improvement of numerical aesthetics.
There's are tricks by which we can import some of the sound of 5-limit just intonation into rank-2 interval space. One way is a rank-2 tuning system called Quarter-Comma Meantone. Quarter-Comma Meantone can be defined over rank-2 intervals as:
t(P8) = 2/1
t(M3) = 5/4
The first of those two specifications is sometimes summarized as saying that the system has "pure" octaves. People love pure octaves and all the famous tuning systems have pure octaves, so I might just say "it's defined by X and pure octaves" in the future for other tuning systems. The next condition says to tune the major third as though we were in 5-limit just intonation. This slightly flattens the perfect fifth from its Pythagorean tuned value - about 22 cents flatter:
1200 * log_2((81/64) / (5/4)) ~ 22 cents
That's the whole definition of quarter comma meantone. Since these two basis intervals are independent, and since it's only a two dimensional space, we can constuct every interval as a combination of P8s and M3s. And since we have defined a tuning for P8 and M3, this induces a tuning on every other interval in the space. For example, by interval arithmetic, we find that
P8 - M3 = m6
so the minor sixth in quarter-comma meantone must be
(2/1) / (5/4) = 8/5
We could prove that with a change of basis calculation, but it's also good to just see how intervals and frequency ratios move in parallel: When intervals add, ratios multiply; when intervals subtract, ratios divide.
If you keep the octave pure but tune the minor third to its 5-limit version,
t(m3) = 6/5
Then you get something called Third-comma meantone. There are many meantone options like that. We'll talk about them in the chapter on temperament tuning system.
Generally in a meantone tuning system, the perfect fifths are flattened a little bit so that the major thirds are tuned closer to their 5-limit just intonation values - if not exact like in 1/4-comma meantone. The name "meantone" actually comes from the fact that the "tone" or "whole tone", i.e. the major second, is tuned somewhere between the 3-limit and the 5-limit values. The "comma" refers to an interval historically called the "syntonic comma", which today is more properly called an acute unison, Ac1. In 5-limit just intonation, Ac1 is tuned to 81/80. If you're of the position that we can scale intervals, instead of just adding and subtracting them, then there's an argument that one quarter of the interval Ac1 is like the fourth root of the frequency ratio, and it just so happens that the P5 in quarter comma meantone is flattened by this fourth of a comma, i.e. you divide (3/2) by ( 81/ 80 )^(1⁄4). When you simplify that expression, you see that in quarter comma meantone, the tuned value of P5 is
t(P5) = 5^(1/4) ~ 1.49535
which is still very close to the the old (3/2) = 1.5.
I just told you the tuned value for P5 in Quarter-Comma Meantone, but you don't have to take my word for it. Let's calculate. We've said that a tuning system induces a tuning over all the intervals of a space by specifying tuning for a set of basis intervals.
Let's start by reminding ourselves of the coordinates for M3, P5, and P8 in the (A1, d2) basis:
M3 = (4, 2)
P5 = (7, 4)
P8 = (12, 7)
Now we will assocaite variables with all six of those components:
(m, n) = (7, 4)
(a, b) = (4, 2)
(c, d) = (12, 7)
and now perform a change of basis to get an interval (x, y) in the (P8, M3) basis:
x = (dm - cn) / (ad - bc) = (7 * 7 - 12 * 4) / (4 * 7 - 2 * 12) = 1/4
y = (an - bm) / (ad - bc) = (4 * 4 - 2 * 7) / (4 * 7 - 2 * 12) = 1/2
Now that we have coordinates, we can perform the actual tuning. Analogous to
P5 = x * M3 + y * P8
we have
t(P5) = t(M3)^x * t(P8)^y
When we substitute in the tuned values of M3 and P8 for quarter comma meantone, we get
t(P5) = (5/4)^(1/4) * (2/1)^(1/2) = 5^(1/4)
as promised.
You might be wondering about modernity's favorite tuning system, twelve-tone equal-temperament or 12-TET. It can be defined over rank-2, -3, -4, et cetera interval spaces, but let's start with rank-2. Another name for it is 12-EDO, which stands for "12 equal divisions of the octave". There are lots of rank-2 tuning systems that divide the octave into logarithmically equal parts, like 19-EDO and 24-EDO.
Now, for a given interval with coordinates in the (A1, d2) basis, I've told you that 12-EDO tunes the interval to A1 steps of 12-EDO, e.g. the major thirteen
m13 = P8 + m6 = (12, 7) + (8, 5) = (20, 12)
would be tuned to 20 steps of 12-EDO, which means a frequency ratio of
2^(20/12)
You might believe me that this works, but let's work it out in detail anyway, so that we can also e.g. take an interval in (P5, P8) coordinates and tune it in 19-EDO.
Our old grade school friend 12-EDO is defined by pure octaves
t(P8) = 2/1
and a "tempered" diminished second
t(d2) = 1/1
Tuning an interval to (1/1) is called "tempering" and all of the EDO tuning systems can be defined by tempering out one or more intervals. The rank-2 Lilley basis, (A1, d2), makes it very easy to understand the effect of tempering out d2: since the d2 component stops influencing the tuned frequency ratio for an interval, any two intervals with the same A1 component will be assigned the same frequency ratio.
If we want to perform the tuning procedure in full generality, we have two options: we can do a matrix multiplication or we can use Cramer's rule. Let's do matrix multiplication first.
Our target interval, the minor 13th has coordinates (20, 12) in the (A1, d2) basis. To convert this to (d2, P8) coordiantes, we could use a matrix who rows are the coordinates for A1 and d2 expressed in the (d2, P8) basis. But I don't know those coordinates. Instead of using the original (A1, d2) basis vectors expressed in the new (d2, P8) basis, we could also use our new (d2, P8) basis vectors expressed the old (A1, d2) basis and then do a matrix inverse.
Let me see if I can make that clearer with notation. We can either compute m13 in the (d2, P8) basis as
m13_(d2, P8) = m13_(A1, d2) * [A1_(d2, P8), d2_(d2, P8)]
or as
m13_(d2, P8) = m13_(A1, d2) * inverse of [d2_(A1, d2), P8_(A1, d2)]
We'll use the second formula, since we know how to find (A1, d2) coordinates for intervals generally. Here are the new basis vectors in (A1, d2) coordinates:
d2 = (0, 1)
P8 = (12, 7)
So our conversion matrix is
[[0, 1], [12, 7]]^-1
And our full calculation is
m13_(d2, P8) = [20, 12] * [[0, 1], [12, 7]]^-1 = (1/3, 5/3)
I don't do matrix inversions like that in my head, I just calculate them Python or WolframAlpha, depending on where I am. That's the downside of this method. From this result, we know that
m13 = 1/3 * d2 + 5/3 * P8
This isn't a fact about 12-EDO yet, it's just a fact of rank-2 interval space. This intervallic fact has a parallel fact in frequency space:
t(m13) = t(d2)^(1/3) * t(P8)^(5/3)
and once we substitue in our tuned values for t(d2) and t(P8) from the definition of 12-EDO:
t(d2) = 1/1
t(P8) = 2/1
Then we're done:
t(m13) = 2^(5/3)
This is the correct value, and this matches our expectations because 5/3 is the same as 20/12. Our calculated frequency ratio for the minor 13th interval in 12-EDO is 20 steps of 12-EDO. Done. Easy. Nice.
Let's also calculate this with Cramer's rule. Ooh! Or as a treat, let's use Cramer's rule to prove that the 12-EDO definition will give us ratios of the from
2^( something / 12)
for any rank-2 interval.
For an interval (m, n) in the (A1, d2) basis that we want to tune in 12-EDO, we'll have basis intervals:
d2 = (a, b) = (0, 1)
P8 = (c, d) = (12, 7)
Cramer's rule gives us values {x, y} that are the exponents in
t(d2)^x * t(P8)^y
The {x} value can be ignored because of tempering d2, and the {y} value will have the usual form from the Cramer-Lilley formula:
y = (an - bm) / (ad - bc) = (0 * n - 1 * m) / (0 * 7 - 1 *12) = m / 12
Again we see that the A1 component determines the frequency ratio. We also see where the "12" in "12-EDO" comes from: it's the denominator of the fractional power. And we did this for a general interval (m, n). So it works always.
There are lots of other EDO tuning systems, and we'll talk about them in the EDO-generators post. For now, here are rank-2 intervals that can be tempered out (while keeping octaves pure) to make some of my favorite EDOs:
t(d2) = 1 # 12-EDO
t(dd2) = 1 # 19-EDO
t(dddd3) = 1 # 31-EDO
t(dddddd6) = 1 # 46-EDO
t(ddddddd6) = 1 # 53-EDO
Some other EDOs can't be defined over rank-2 interval space - e.g. 24-EDO requires you to start with rank-4 interval space and then temper out multiple intervals. We'll get there in time.