User:TallKite/The delta method
WORK IN PROGRESS
TO DO:
- clean up natural generators section
- split up into multiple pages: Delta method,
- make a new page and category, "mental math", that links to all these pages
- make a new page, how to find an edo's 5th, about the divide-by-5 rule from my Notation Guide for Edos 5-72
The delta method is a way to find the Stern-Brocot ancestors of a reasonably-sized ratio quickly and easily in one's head without using paper and pencil. It can be used to estimate the size in cents of a ratio. It also has applications in comparing edos.
The usual way of finding a Stern-Brocot ancestor is to use the extended Euclidean algorithm, which requires a computer. But there's times when computer usage isn't appropriate. You might be at a company retreat, and your boss's boss is telling a long anecdote. You lose interest, and start to wonder, which interval in 31edo is the farthest from 41edo? Or you're attending a performance of your friend's 17-minute-long minimalist 23-limit piece, and you start to wonder, roughly how many cents is 23/13 anyway?
The delta method allows you to solve such problems in your head.
Background and terminology
The delta of a ratio is simply the numerator minus the denominator. All superparticular ratios are delta-1. Both 5/3 and 7/5 are delta-2.
Every ratio occurs only once in the Stern-Brocot tree. Every ratio has two ancestors and two children. Both ancestors will have a smaller integer limit, and one will always be smaller than the other. Thus there is a simpler ancestor and a more complex ancestor.
...
The stern-brocot tree is also used for edo fractions. In this form it's called the scale tree.
...
The process
Adding 1 to both numerator and denominator is called bumping up. Subtracting 1 from both is called bumping down. Note that bumping up increases the integer limit, but decreases the size in cents. The basic process is:
- possibly octave-reduce, see below
- possibly unsimplify, see below
- bump the ratio up or down to get a new ratio in which both the numerator and the denominator are multiples of the delta
- simplify by dividing both numerator and denominator by the delta to get the simpler ancestor
- subtract the simpler ancestor from the original ratio to get the more complex ancestor
- confirm the answer by multiplying the numerator of one ancestor by the denominator of the other. The two products should differ by 1.
For example, 7/4 is delta-3. Bumping up, we get 8/5. But neither 8 nor 5 is divisible by 3. So instead we bump 7/4 down to 6/3. This simplifies to 2/1, which is the simpler ancestor. Subtract 2/1 from 7/4 to get 5/3 (because 7-2=5 and 4-1=3), which is the more complex ancestor. Optional confirmation: the two products are 2*3=6 and 7*1=7, which do indeed differ by 1.
But with delta-5 and higher, sometimes neither bumping up nor bumping down works. For example, with 12/7, neither 13/8 nor 11/6 are multiples of 5. When this happens, one must first unsimplify the ratio by doubling the numerator and the denominator. (12/7 = 24/14, bump to 25/15 = 5/3). If doubling doesn't work, try tripling, quadrupling, etc.
The correct factor to multiply by is always less than half of the delta, and is always coprime with the delta.
delta | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
possible
unsimplifications |
(none) | double | (none) | double
or triple |
triple | double or
quadruple |
triple | double, triple,
quadruple or quintuple |
quintuple |
For very large deltas, one might want to use the octave complement. For example, 27/16 is delta-11, but 32/27 is only delta-5. The ancestors of 32/27 are 13/11 and 19/16. Thus 27/16 is between 22/13 and 32/19. But 32/19 is more complex than 27/16, not simpler. To find the actual ancestors, "subtract" one from another: 32/19 "minus" 22/13 = 10/6 = 5/3. indeed, the actual ancestors of 27/16 are 22/13 and 5/3.
The two numbers in the ratio can be thought of as two edos (see "comparing edos" below). This suggests another way of dealing with very large deltas. To solve 27/16, we think of it as a 16edo interval 27\16 and octave-reduce, getting 11\16. Since that's larger than a half-octave, we can further reduce by finding the octave complement 5\16. The question becomes, how many 5\16 steps equals ±1 edostep of 16edo when octave-reduced? Three steps is 15\16, one short of an octave, so the answer is 3. We multiply the larger edo (27) by 3 and get 81. We divide 81 by the smaller edo (16) and get about 5. Thus the simpler stern-brocot ancestor of 27/16 is 5/3.
Another example: 72/41 --> 72\41 --> 31\41 --> 10\41 --> 4*(10\41)=40\41 --> 4*72=288 --> round(288/41)=7 --> 7/4
Applications
Approximating ratios
Two ratios can be combined to make a 3rd ratio via the mediant aka freshman sum. The 3rd ratio is always intermediate in cents between the other two. For example 8/5 "plus" 15/8 equals 23/13. One can work backwards and decompose any ratio into two simpler ratios, one larger and one smaller. In this example, knowing that 23/13 lies between 8/5 and 15/8 isn't very useful. Far better to find the two stern-brocot ancestors. The delta method gives 7/4 and 16/9, telling us that 23/13 sounds like a slightly flat minor 7th. Furthermore, because 16/9's integer limit is about double that of 7/4, 23/13 is about twice as close to 16/9 than 7/4. If one knows that 7/4 = 969¢ and 16/9 = 996¢, one can estimate 23/13 to be about 985¢ (actual size is 988¢).
Comparing edos
All of the following generalizes to EDONOIs.
Consider two edos M-edo and N-edo, with M and N coprime. Every interval of M-edo (other than the unison and octave of course) will be approximated relatively better or worse by N-edo. By symmetry there are always two best approximations that are octave complements. They are called the nearest misses. The one(s) approximated the worst are called the farthest miss(es). The farthest miss is always the generalized antipodes of M-edo with respect to either nearest miss. If M is even, then N is odd, and the farthest miss is the half-octave. But if M is odd, there are two such intervals, which are always octave complements. The smaller of the two is always exactly half of one of the nearest misses.
For example, consider 19edo as approximated by 12edo. The smaller nearest miss is found from the simpler stern-brocot ancestor of 19:12, which is 8:5. Pair 8 with 19 and 5 with 12. Thus 8\19 and its complement 11\19 are the two nearest misses, i.e. the two 19edo intervals closest to 12edo. Likewise 5\12 and 7\12 are the two 12edo intervals closest to 19edo. Since these intervals are all 4ths and 5ths, the generalized antipodes is the same as the standard circle-of-5ths antipodes, which for 19edo is half a 4th, and its complement a 5th higher. This is the aug 2nd / dim 3rd of 253¢, and the aug 6th / dim 7th of 947¢. Thus if one wants 19edo to sound especially xenharmonic, one might feature these two intervals prominently, perhaps by using the temperament generated by them, Zozo/Semaphore. Conversely, to avoid offending ears accustomed to 12edo, one would avoid these intervals especially. (One might also avoid the 2nd farthest pair of misses, which are a 4th or 5th away from these.) Furthermore, if one wants to translate a 19edo piece to 12edo, the most difficult intervals to map will be these two antipodes.
Now consider 12edo as approximated by 19edo. The antipodes of any even edo is the half-octave, no matter what the generator is. Thus the 12edo tritone is the most difficult interval to translate to 19edo. Note that 12edo's nearest misses are quite close cents-wise to 19edo's. This is true for any two edos. But 12edo's farthest miss (the half-octave) is quite distant from 19edo's (the half-4th).
Now consider 11edo and 12edo. The nearest misses are 1\11 and 1\12. The farthest misses are 5\11, 6\11 and 6\12. This is an example of the farthest misses being fairly close to each other. This is also an example of an equidistant farthest miss, because 6\12 is midway between 5\11 and 6\11. As a result, mapping a 12edo piece to 11edo by simply selecting the closest approximation of each note fails in the sense that there is more than one way to do so for 6\12.
If M and N are not coprime, they coincide exactly in places other than the unison and octave, in effect dividing the octave into several similar sections. For example, 12edo and 22edo coincide at the half-octave. We can think of 12edo as 6-edho (rhymes with "red toe", means equal division of the half octave), and 22-edo as 11-edho. Then we can proceed as with 6-edo and 11-edo, and afterwards simply shrink everything down to half size. The simpler ancestor of 11:6 is 2:1. Thus the nearest misses are 2\11 and 9\11 and 1\6 and 5\6. These convert to 2\22, 9\22, 1\12 and 5\12 (plus octave complements). 11edo's farthest misses from 6edo are 1\11 and 10\11. These convert to 1\22 and 10\22 (plus octave complements). Because 6 is even, 6edo's farthest miss from 11edo is the half-octave, 3\6. This converts to 3\12, the minor 3rd, which is equidistant from 5\22 and 6\22.
Spiral graphs
These spiral graphs for 31edo, 41edo and 53edo relate each of those edos to 12edo. Each chart has 12 "wheel-spokes". The larger edo's spiral of fifths is not really a spiral, it's a larger circle that you break into a chain and make a bunch of smaller 12-note loops with. Then add a few duplicates at each end of the chain, so that you can reconnect the ends mentally and get the original larger circle.
A 12-spoke spiral graph of fifths is only possible if the dodeca-sharpness (edosteps per pyth comma) of the larger edo is 1 or -1.
Such a spiral chart can be made for any two edos, as long as the are coprime. It's often a spiral of something other than fifths. In fact, it's a spiral of the nearest miss. For example, consider 8edo and 27edo. The near misses are 3\8 and 10\27. You get an 8-spoke spiral of 27edo major 3rds. This might be useful for someone researching octotonic scales in 27edo.
Finding the natural generator
Every edo (except the sharp-0 ones) has a "natural" heptatonic generator. For 13edo, it's a 2\13 2nd (and its octave inverse of course), because seven 2\13's falls only one edostep away from the octave. Thus the sharp means "sharpened by one edostep", major is one edostep wider than minor, and ups and downs aren't needed.
The natural heptatonic generator of N-edo is simply the nearest miss of that edo and 7edo. The natural generator is always one of these:
- the perfect 2nd (or the perfect 7th) - edos 8, 13, 15, 20, 22, 27, 29...
- the perfect 3rd (or the perfect 6th) - edos 10, 11, 17, 18, 24, 25...
- the perfect 5th (or the perfect 4th) - edos 9, 12, 16, 19, 23, 26... (sharp-1 and flat-1 edos)
- the perfect 2nd, 3rd, 4th, 5th, 6th or 7th - edos 7, 14, 21, 28... (sharp-0 edos)
The usual genchain of fifths runs ...d5 - m2 - m6 - m4 - m7 - P4 - P1 - P5 - M2 - M6 - M3 - M7 - A4... This can be generalized to any generator: The generator is always perfect, so the middle three intervals of the genchain are always perfect. One side of the genchain is always major or augmented, and the other side is always minor or diminished. For heptatonic notation, there are four major and four minor intervals. For pentatonic, there's two of each. In general, N-3 of each. The major side is usually chosen so that major is wider than minor. The only exception is for fifth-generated notation of superflat EDOs, when major may be on the left even when it should be on the right, in order to preserve familiar interval arithmetic.
For 13edo, the genchain runs in 2nds: ...5 - 6 - 7 - 1 - 2 - 3 - 4 - 5... The righthand 5th is the sum of four perfect 2nds, and equals 4 * (2\13) = 8\13. The lefthand 5th is the octave minus three perfect 2nds, and equals 13\13 - 3 * (2\13) = 7\13. The righthand one is larger and therefore major. Thus the 13edo genchain is ...d8 - d2 - m3 - m4 - m5 - m6 - P7 - P1 - P2 - M3 - M4 - M5 - M6 - A7 - A1...
For 17edo, the generator is the 5\17 3rd. The genchain runs in 3rds: ...d8 - d3 - m5 - m7 - m2 - m4 - P6 - P1 - P3 - M5 - M7 - M2 - M4 - A6 - A1...
There is a natural pentatonic generator for all edos...
TO DO: explore octotonic, etc.
Finding the fifthspan
See fifthspan.
Examples of approximating a ratio
Delta-1 ratios
The simpler ancestor is always 1/1. Bump the ratio down to get the more complex ancestor.
For example, 5/4 yields 4/3 and 1/1. Since 4/3 is four times as complex as 1/1, 5/4 falls about four times closer to it.
Delta-2 ratios
Bump down and simplify to get the simpler ancestor. Bump up and simplify to get the more complex ancestor.
9/7: Bump up/down to get 10/8 and 8/6, which yields 5/4 and 4/3. Since 5/4 is slightly more complex than 4/3, 9/7 lies slightly flat of the midpoint between the two.
19/17: Bump to get 20/18 and 18/16, which yields 10/9 and 9/8. 19/17 lies almost exactly midway between the two. Thus it's very close to the quarter-comma meantone major 2nd.
Delta-3 ratios
Bump either up or down, whichever gives multiples of three, then simplify. Subtract to get the more complex ancestor.
- 10/7: Bump down to get 9/6, which simplifies to 3/2. Subtract 3/2 from 10/7 to get 7/5.
- 11/8: Bump up to get 12/9 = 4/3. Subtract to get 7/5.
Delta-4 ratios
Bump either up or down, whichever gives multiples of four, then simplify. Subtract to get the more complex ancestor.
- 13/9: Bump down to get 12/8 = 3/2. Subtract to get 10/7.
- 15/11: Bump up to get 16/12 = 4/3. Subtract to get 11/8.
Delta-5 ratios
If the numerator mod 5 is 1 or 4, bump it. (16/11: Bump down to get 15/10 = 3/2. Subtract to get 13/9)
If not, double the ratio before bumping.
- 13/8: Double to get 26/16. Bump down to get 25/15 = 5/3. Subtract from 13/8 to get 8/5.
- 17/12: Double to get 34/24. Bump up to get 35/25 = 7/5. Subtract from 17/12 to get 10/7.
Delta-6 ratios
Bump it. (17/11 --> 18/12 --> 3/2 and14/9)
Delta-7 ratios
- If the numerator mod 7 is 1 or 6, bump it.
- If the numerator mod 7 is 2 or 5, triple the ratio before bumping. (16/9 --> 48/27 --> 49/28 --> 7/4 and 9/5)
- If the numerator mod 7 is 3 or 4, double the ratio before bumping. (17/10 --> 34/20 --> 35/21 --> 5/3 and 12/7)
Delta-8 ratios
- If the numerator mod 8 is 1 or 7, bump it.
- If the numerator mod 8 is 3 or 6, triple the ratio before bumping. (19/11 --> 57/33 --> 56/32 --> 7/4 and 12/7)
Delta-9 ratios
- If the numerator mod 9 is 1 or 8, bump it.
- If the numerator mod 9 is 2 or 7, quadruple the ratio before bumping. (20/11 --> 80/44 --> 81/45 --> 9/5 and 11/6)
- If the numerator mod 9 is 4 or 5, double the ratio before bumping. (22/13 --> 44/26 --> 45/27 --> 5/3 and 17/10)
Delta-10 ratios
- If the numerator mod 10 is 1 or 9, bump it.
- If the numerator mod 10 is 3 or 7, triple the ratio before bumping. (23/13 --> 69/39 --> 70/40 --> 7/4 and 16/9)
Example: comparing various edos to 41-edo
edo | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13b | 14 | 15 | 16 | 17 | 18b | 19 | 20 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nearest
misses |
0\1 | 1\2 | 1\3 | 1\4 | 1\5
M2 |
1\6 | 1\7
P2 |
1\8 | 2\9
M3 |
1\10
^m2 |
4\11
v4 |
5\12
P4 |
6\13
P4 |
1\14
v2 |
4\15
^m3 |
7\16
P4 |
5\17
~3 |
7\18
v4 |
6\19
M3 |
1\20
^m2 |
1\41
^1 |
20\41
d5 |
14\41
M3 |
10\41
m3 |
8\41
^M2 |
7\41
M2 |
6\41
vM2 |
5\41
~3 |
9\41
vm3 |
4\41
^m2 |
15\41
^M3 |
17\41
P4 |
19\41
~4 |
3\41
m2 |
11\41
^m3 |
18\41
^4 |
12\41
~3 |
16\41
v4 |
13\41
vM3 |
2\41
vm2 | |
farthest
misses |
0\1 | 1\2 | 1\3 | 2\4 | 2\5
P4 |
3\6 | 3\7
P4 |
4\8 | 1\9
M2 |
5\10 | 2\11
M3 |
6\12 | 3\13
^M3 |
7\14 | 2\15
vM2 |
8\16 | 6\17
M3 |
9\18 | 3\19
M2 |
10\20 |
20\41
d5 |
10\41
m3 |
7\41
M2 |
5\41
~2 |
4\41
^m2 |
17\41
P4 |
3\41
m2 |
18\41
^4 |
16\41
v4 |
2\41
vm2 |
13\41
vM3 |
12\41
~3 |
11\41
^m3 |
19\41
~4 |
15\41
^M3 |
9\41
vm3 |
6\41
vM2 |
8\41
^M2 |
14\41
M3 |
1\41
^1 | |
edo | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 |
nearest
misses |
1\40
^1 |
19\39
^d5 |
13\38
^M3 |
9\37
^m3 |
7\36
^M2 |
6\35
^2 |
5\34
vM2 |
4\33
m2 |
7\32
m3 |
3\31
m2 |
11\30
vM3 |
12\29
P4 |
13\28
^4 |
2\27
^m2 |
7\26
m3 |
11\25
^4 |
7\24
~3 |
9\23
A4 |
7\22
vM3 |
1\21
^1 |
1\41
^1 |
20\41
d5 |
14\41
M3 |
10\41
m3 |
8\41
^M2 |
7\41
M2 |
6\41
vM2 |
5\41
~2 |
9\41
vm3 |
4\41
^m2 |
15\41
^M3 |
17\41
P4 |
19\41
~4 |
3\41
m2 |
11\41
^m3 |
18\41
^4 |
12\41
~3 |
16\41
v4 |
13\41
vM3 |
2\41
vm2 | |
farthest
misses |
20\40 | 10\39
^m3 |
19\38 | 14\37
M3 |
18\36 | 3\35
vv2 |
17\34 | 2\33
dd2 |
16\32 | 14\31
^4 |
15\30 | 6\29
^M2 |
14\28 | 1\27
m2 |
13\26 | 7\25
^^m3 |
12\24 | 7\23
m3 |
11\22 | 10\21
^4 |
20\41
d5 |
10\41
m3 |
7\41
M2 |
5\41
~2 |
4\41
^m2 |
17\41
P4 |
3\41
m2 |
18\41
^4 |
16\41
v4 |
2\41
vm2 |
13\41
vM3 |
12\41
~3 |
11\41
^m3 |
19\41
~4 |
15\41
^M3 |
9\41
vm3 |
6\41
vM2 |
8\41
^M2 |
14\41
M3 |
1\41
^1 |
- Note the symmetry of the 41-edo intervals, which results from the symmetry of the Stern-Brocot tree.
- The "b" in 13b and 18b only affects the interval names. For example, 6\13 in 13b-edo nomenclature is a P4, but in 13-edo it would be an ^4.
- The unnamed farthest misses for edos other than 41 are the half-octave.
Further notes
The delta method was invented by Kite Giedraitis in 2022. The ratio approximations for a/b and c/d rely on the formula log [(a+c)/(b+d)] ≈ [a/(a+c)] * log [a/b] + [c/(a+c)] * log [c/d], where ad - bc = ±1. There may be a better formula.