Pathological EDO Definitions

We've looked at two ways to define EDO tunings systems and I'd like to relate the methods to each other. The methods are 1) tempering commas and 2) tunings prime harmonics as closely as possible to an EDO steps.

The recent work I did on chromaticism mistuning bounds was partly in service of my investigation into the relationship of the two methods of defining EDOs. But there's more to do.

In this post, I'm going to look in detail at what happens if we define EDOs by tempering weird intervals. I think that if I can understand what it meant to define an EDO by tempering a normal versus abnormal interval, that will go a long way to explaining why the method of defining an EDO by tempering some normal intervals is generally equivalent to the method of rounding prime harmonics. That's the hope.

We'll start by looking at rank-2 intervals that can be tempered to generate 31-EDO.

dddd-25 : (-49, -26) # -4961c
AAAA-29 : (-47, -30) # -4639c
dddd-18 : (-37, -19) # -3761c
AAAA-22 : (-35, -23) # -3439c
dddd-11 : (-25, -12) # -2561c
AAAA-15 : (-23, -16) # -2239c
dddd-4 : (-13, -5) # -1361c
AAAA-8 : (-11, -9) # -1039c
dddd3 : (-1, 2) # -161c
AAAA-1 : (1, -2) # 161c
dddd10 : (11, 9) # 1039c
AAAA6 : (13, 5) # 1361c
dddd17 : (23, 16) # 2239c
AAAA13 : (25, 12) # 2561c
dddd24 : (35, 23) # 3439c
AAAA20 : (37, 19) # 3761c
dddd31 : (47, 30) # 4639c
AAAA27 : (49, 26) # 4961c

I've got the interval name written, and then the rank-2 interval coordinates in the (A1, d2) basis, and then the just tuning written in cents. The intervals with the simplest coordinates, smack dab in the middle of the list,

dddd3 : (-1, 2) # -161c
AAAA-1 : (1, -2) # 161c

also have the just tunings closest to 1/1. And since tempering tunes an interval to 1/1, these are natural intervals to temper out: tempering them is a small mistuning.

The other intervals on the list are separated from these two by octaves, and tempering any of them out is a large mistuning. But what kind of large mistuning? How does it behave? Let's look at the octave complement of AAAA-1 to start, that is

    (12, 7) - (1, -2) = (11, 9)

    P8 - AAAA-1 = dddd10

This interval is justly tuned larger than P5 but smaller than P8. It's too big to be a comma, and we expect it to do screwy things to the interval space, but it's one of the least-big of the screwy intervals.

To do that, let's express a bunch of intervals in the (P8, dddd10) basis, then temper out the dddd10, i.e. look at just the P8 component. If we start from the (A1, d2) basis, then the natural intervals to investigate have these coordinates:

     m2: (1, 1)
M2: (2, 1)
m3: (3, 2)
M3: (4, 2)
P4, (5, 3)
P5: (7, 4)
m6: (8, 5)
M6: (9, 5)
m7: (10, 6)
M7: (11, 6)

We can do a change of basis for each such natural interval {n} in the following way:

    n * inverse((12, 7), (11, 9))

which will give us coordinates in the (P8, dddd10) basis. And away we go:

    m2: (-2/31, 5/31)

    M2: (7/31, -2/31)

    m3: (5/31, 3/31)

    M3: (14/31, -4/31)

    P4: (12/31, 1/31)

    P5: (19/31, -1/31)

    m6: (17/31, 4/31)

    M6: (26/31, -3/31)

    m7: (24/31, 2/31)

    M7: (33/31, -5/31)

So... I guess I should conclude something, but I'm not sure what.

Let's look at how this 31-EDO tunes A1 and d2.

    A1: (9/31, -7/31)

    d2: (-11/31, 12/31)

And now the first two prime harmonics:

    P8: (31/31, 0/31)

    P12: (50/31, -1/31)

The closest tunings are the prime harmonics are [31, 49], so one step of mistuning of the 3rd harmonic seems to have huge effects.

Let's try other mistunings of P12 and see what commas we temper out as a consequence.

...

Lol, the results are in and I should have anticipated them.

Let's say we tune P8 to 31 steps of 31-EDO and we tune P12 to {y} steps of 31-EDO.

If an interval has the form (-y, 31) or (y, -31) in the (P8, P12) basis then it will be tempered out. And those two will be inverses of each other.

    (0, 0) - (-y, 31) = (y, -31)

Easy.

So when P12 is 49 steps of 31-EDO, then we have the standard definition, and the intervals (-49, 31) and (49, -31) (in the (P8, P12) basis) are tempered out. These are normally justly tuned to

     617673396283947/562949953421312

562949953421312/617673396283947

But if we mistune P12 to 50 steps of 31-EDO, then our simplest tempered commas are (-50, 31) and (50, -31) in the (P8, P12) basis, which are justly tuned to

     617673396283947/1125899906842624

1125899906842624/617673396283947

One more for my own enrichment: we've seen a value of P12 that's one step higher/sharper than the canonical definition. Now let's investigate mistuning P12 one step flat of canonical. If we tune P12 to 48 steps of 31-EDO, then our simplest tempered commas are:

    (-48, 31) # 617673396283947/281474976710656

    (48, -31) # 281474976710656/617673396283947

Great. 

I know these numbers are big and our eyes just glaze over them instead of reading, but I think you'll agree it's obvious in retrospect that all of these just tunings have 3^31 = 617673396283947 in the numerator or denominator. And the opposite part of the fraction from the large power of 3 just has some large power of 2. So clearly all of the just tunings differ from each other only by inversion and octave offsets.

Let's convert these to the (A1, d2) basis and give them rank-2 interval names. I bet they're going to look very familiar!

Below I show the prime harmonic interval, going to the (A1, d2) interval, then the rank-2 interval name.

[48, -31] → [-13, -5] dddd-4

[-48, 31] → [13, 5] AAAA6

[49, -31] → [-1, 2] dddd3

[-49, 31] → [1, -2] AAAA-1

[50, -31] → [11, 9] dddd10

[-50, 31] → [-11, -9] AAAA-8

Those are the same intervals we saw before when we were investigating weird tempering a little. Are you impressed? I am. There's a pretty straightforward relationship between defining an EDO in terms of a harmonic mistuned by N steps and defining an EDO in terms of a tempered comma, which is N octaves off from a canonical comma used to define the EDO, the canonical ones being the one and its inverse which are closest tuned to unison, and also they happen to be the ones that arise when you tune the prime harmonics as close to purely as possible, subject to the frequencies being of the EDO form, 2^(i /edo_divisions).

I feel like I should do a little more to state the relationship exactly and mathematically, but also I've done enough that the reader could figure it out for themselves. And from the relationships between the two kinds of (rank-2) pathological definitions of EDOs (octave displaced canonical commas and P12s mistuned by step), we can more clearly see the relationship between the two canonical forms of EDO definitions.

I think I'm going to write out the relationship a little bit more precisely and then it will be time to investigate how these things generalize to rank-3 interval space and higher! I'm pretty stoked!

...

Things to do: 

1) I want to state symbolically how the mistunings of prime harmonics by step produces tempered commas that are related by octave displacement to the canonical tempered commas.

2) I want to prove that the canonical tuning of the (rank-2) prime harmonic intervals produces two commas, related by inversion, that have the smallest just tunings among all tunings of P12, perhaps subject to P12 falling between P8 and P8 + P8 or something. If I could also or instead show that the pair of canonical tempered commas, related by inversion, have the smallest (A1, d2) coordinates of all tempered commas produced by tunings of P12, that would also be cool.

After that we'll look at whether there's a regular form for rank-3 commas in the rank-3 prime harmonic basis, akin to {(-y, edo_divisions) and (y, -edo_divisions)} for the rank-2 prime harmonic basis. Also we'll look at how simultaneous mistunings of P12 and M17 affect/induce different tempered commas.

...


If the canonical tuning of the prime harmonics for an EDO is

(P8, P12) = (a, b)

then we get tempered commas of the form

(b, -a)

(-b, a)

in the (P8, P12) basis. We'll call these the canonical tempered commas for the EDO.


If we instead try defining the EDO in terms of

(P8, P12) = (a, b + 1)

then the tempered commas become

((b + 1), -a)

(-(b + 1), a)

We'll call these "once-sharpened" commas. How are they related to the canonical commas?

The once-sharpened comma with a positive P8 component will be one octave higher than the canonical comma with a positive P8 component. The once-sharpened comma with a negative P8 component will be one octave lower than the canonical comma with a negative P8 component.

I think we can immediately generalize from sharpening by one step to sharpening by an integer number of steps. If we mistune P12 by {j} steps, then the comma with positive P8 component will be

    (b, -a) + j * P8

and its inverse will be

    (-b, a) - j * P8

and this works even if {j} is zero or negative.

So if (a, b) = (31, 49) are the canonical number of steps for tuning the rank-2 prime harmonic intervals to define 31-EDO, then  for {j = 1} our tempered commas are 

    (49, -31) + (1, 0) = (50, -31)

and

    (-49, 31) - (1, 0) = (-50, 31)

and for {j = -2} we have tempered commas of

    (49, -31) + (-2, 0) = (47, -31)

and

    (-49, 31) - (-2, 0) = (-47, -31)

I know that looks a little dumb in the (P8, P12) basis, but we can do the same arithmetic in other bases where it looks a little less trivial. The inverses will still be a little redundant, but the octave addition or subtraction will be a little less obvious.

...

I think I know the form of rank-3 commas. It's about as simple as turning (a, b) into (-b, a) and (b, -a).

If we tune (P8, P12, M17) to steps (a, b, c), then we'll at least have tempered commas at (-b, a, 0) like before, but now also (-c, 0, a), (0, -c, b) and all the inverses of these.

For example, if we give the canonical rank-3 definition of 31-EDO by tuning (P8, P12, M17) to (31, 49, 72) steps, then all of these are tempered commas

    (-b, a, 0) = (-49, 31, 0)

    (0, c, -b) = (0, 72, -49)

    (c, 0, -a) = (72, 0, -31)

I've specifically shown the ones above that are justly tuned to more than a perfect unison. I'll call these the easy rank-3 commas.

These easy commas are not independent, and they're definitely not the tempered commas that have the least complex just tunings for 31-EDO. The easy rank-3 commas have just tunings that look like this:
    
    (-49, 31, 0) # 617673396283947/562949953421312 
   (0, 72, -49) # 22528399544939174411840147874772641/17763568394002504646778106689453125 
    (72, 0, -31) # 4722366482869645213696/4656612873077392578125 

and the inverses of those. In comparison, I'd more succinctly define 31-EDO in rank-3 by saying that it has pure octaves and tempers out the intervals justly associated with (81/80) and (393216/390625), which have prime harmonic coordinates (-4, 4, -1)  and (17, 1, -8).

Also, it doesn't even look to me like you can take two rank-3 easy commas and the octave, (1, 0, 0) and use that to define 31-EDO, since the absolute determinant of the matrix won't be 31. 

So the easy commas are something, but not individually nice nor jointly sufficient to define 31-EDO. Is there an easy way to get from the easy commas to the latter two commas which minimally define 31-EDO?

Oh, I've got something. Let's add one of the easy commas to the other two.

Maybe if I add one to the other two?
    (-49, 31, 0) + (72, 0, -31) = (23, 31, -31)
    (0, 72, -49) + (72, 0, -31) = (72, 72, -80)

and then remove the common factor of 8 from all the entries in the lower comma:

    (72, 72, -80) -> (9, 9, -10)

These two make commas make a determinant 31 basis matrix with the octave!

    determinant of ((1, 0, 0), (9, 9, -10), (23, 31, -31)) = 31

And their just tunings are:

    (9, 9, -10) # 10077696/9765625
    (23, 31, -31) # 5181419993454688075776/4656612873077392578125

Still not great, but we're getting somewhere. If I subract (9, 9, -10) from (23, 31, -31) twice, then I get (5, 13, -11) with just tuning (51018336/48828125), and the matrix
    
    ((1, 0, 0), (9, 9, -10), (5, 13, -11))

still has determinant 31.

I've got two more ideas for getting basis matrices where the tempered commas have small frequency ratios and probably small interval components.

First: Recall that we added together some easy commas, let's call it comma 3 to commas 1 and 2. We could try different combinations, like comma 1 to commas 2 and 3 or comma 2 to commas 1 and 3. Three different basis matrices to work with. We can do some determinant-preserving matrix operations to add and subtract commas from each other and try to get small coordinates that way. And since the third component scales in the just tunings like a power of five, it's probably prudent to focus on additions and subtractions of basis vectors that get the third components to be small.


Second idea: while doing determinant-preserving matrix operations among the commas, we could be guided by the actual just tunings or by heuristic measures of their complexity. In the first case, you don't subtract a comma from another unless doing so simplifies the just tuning. In the computationally simpler case, which probably doesn't matter because computation is cheap, we could like estimate the complexity of the numerator, and assume it will be close to the complexity of the denominator for tempered commas. And the complexity of the numerator is a function of just the positive coordinates of the interval. And in particular, if we've already calculated the closest values for the prime harmonics of the edo, like (31, 49, 72), then for an interval (m, n o), a measure of the numerator complexity might be the sum of the term (m * 31) + (49 * n) + (72 * o), with each term of the sum being ignored if the interval component is negative. That's integer multiplication, which is cheap in my brain because I used to program zilog z80 microprocessors, but you could also take the sum of multiplying (m, n, o) by (log(2), log(3), log(5)), with each term being knocked out if the coefficient is negative, and that would work fine since I hear floating point arithmetic is also fairly cheap these days.

...

Given

    (a, b, c) = (31, 49, 72)

we start with easy commas of the form 
    (-b, a, 0)
    (0, c, -b)
    (c, 0, -a)

and their inverses. By combinations of these, we get
    (-b + -c, a, a)
    (-b, a + c, -b)
    (c, c, -a + -b)
    (-b + c, a, -a)
    (-c, c, -b + a)
    (-b, a + -c, b)

and their inverses. Also we could get (0, 0, 0) or doubles of the easy commas, but I'm not interested in those. I'm not sure if any pair of these with the octave will define 31-EDO, but there are at least many pairs from among those six that will define 31-EDO along with the octave.

Here are the just tunings for the six above:
    (-49, 103, -49) # 13915193059764305937984450503671774362956903094027/10000000000000000000000000000000000000000000000000
    (23, 31, -31) # 5181419993454688075776/4656612873077392578125
    (72, 72, -80) # 106387358923716524807713475752456393740167855629859291136/82718061255302767487140869206996285356581211090087890625
    (-121, 31, 31) # 2876265888493261300027370452880859375/2658455991569831745807614120560689152
    (-72, 72, -18) # 22528399544939174411840147874772641/18014398509481984000000000000000000
    (-49, -41, 49) # 17763568394002504646778106689453125/20532471611663975528200467420020736

Quite large.

...

Okay, suppose I start with the tempered comma set 

    [[23, 31, -31], [72, 72, -80]]

Those are sufficient to define 31-EDO, but not of minimal complexity in any sense. I wanted to find a way to transform that into the set 
    [[-4, 4, -1], [17, 1, -8]]

And I noticed that a little square matrix with integer entries 

     [[-1, 1], [3, -2]

does the trick:
    
    [[-1, 1], [3, -2] *  [[23, 31, -31], [72, 72, -80]] = [[-4, 4, -1], [17, 1, -8]]

I did a search for square matrices [[i, j], [k, l]] with integer entries to use in a product like that, and they all produced different sets of intervals, but they most had the same null space ( = null space basis? = kernel?) as the original commas, namely a null space of (31, 49, 72), except occasionally I'd occasionally get degenerate things like 

    [[-4, 4, -1], [4, -4, 1]]

which has the rank-3 meantone nullspace basis 

    [[1, 1, 0], [-1, 0, 4]]

instead of a rank-3 EDO nullspace basis.

Anyway, I did a search over 2x2 square matrices and I sorted the matrices by the complexity of the results, measured in the following way: the complexity of an interval is the sum of the absolute value of its components. The complexity of a pair of intervals is the sum of the complexity of the intervals.

In this way we can say that
    [[-17, -1, 8], [-4, 4, -1]] has complexity 35
    [[-13, -5, 9], [-4, 4, -1]] has complexity 36
    [[-9, -9, 10], [-4, 4, -1]] has complexity 37

and so on with other matrix multiplication results.

Unfortunately, when I did a search over 2x2 matrices using [[23, 31, -31], [72, 72, -80]] as my starting set, I didn't get the canonical 31-EDO commas, or any low complexity commas for that matter, even when I used matrix entries between -30 and 30, which is quite a wide net. It did simplify the complexity though? Like, this one showed up:

    commas: [[-29, 11, 5], [-3, 21, -13]]
    2x2 matrix: [[5, -2], [3, -1]]
    comma complexity: 82

So...I still have some work to do in figuring out how to get down to the minimal set. Apparently searching through 2x2 matrices doesn't always work. But also sometimes it works! And it seems like there's a complexity measure in interval coordinates that reproduces the complexity in terms of just tunings. Or at least it worked in one case.

I should probably also search for efficiently through 2x2 matrix entries. Like, these are all basically equivalent:
    [[-17, -1, 8], [-4, 4, -1]] :: [[-3, 2], [-1, 1]]
    [[-17, -1, 8], [4, -4, 1]] :: [[-3, 2], [1, -1]]
    [[-4, 4, -1], [-17, -1, 8]] :: [[-1, 1], [-3, 2]]
    [[-4, 4, -1], [17, 1, -8]] :: [[-1, 1], [3, -2]]
    [[4, -4, 1], [-17, -1, 8]] :: [[1, -1], [-3, 2]]
    [[4, -4, 1], [17, 1, -8]] :: [[1, -1], [3, -2]]
    [[17, 1, -8], [-4, 4, -1]] :: [[3, -2], [-1, 1]]
    [[17, 1, -8], [4, -4, 1]] :: [[3, -2], [1, -1]]

So I shouldn't do a matrix multiplication and complexity count for all of them. That's 8 times too much work.

I'll figure that out eventually. First I'm going to try this with a different EDO. And let's do one that doesn't temper out Ac1.

Maybe one of these?
     16-EDO: (AcA1 → 135/128 , dAcm2 → 648/625). Basis: ([1, 0, 0], [-7, 3, 1], [3, 4, -4])
22-EDO: (GrA1 → 250/243 , Grd2 → 2048/2025). Basis: ([1, 0, 0], [1, -5, 3], [11, -4, -2])
23-EDO: (AcA1 → 135/128 , dAcAcm2 → 6561/6250). Basis: ([1, 0, 0], [-7, 3, 1], [-1, 8, -5])
25-EDO: (Grm2 → 256/243 , dd0 → 3125/3072). Basis: ([1, 0, 0], [8, -5, 0], [-10, -1, 5])

Yeah, let's do 22-EDO.

The prime harmonics are tuned closest to (22, 35, 51)-steps. We can substitute these for (a, b, c) to get some easy but complicated commas:

    ec1 = (-b, a, 0)
    ec2 = (0, c, -b)
    ec3 = (c, 0, -a)

We could add ec3 to the other two. I've also given the result of that symbolically as:

    b1 = (-b + c, a, -a) =  (16, 22, -22)
    b2 = (c, c, -a + -b) =  (51, 51, -57)

Remove common factors within the components of each interval and we're ready to form a basis with the octave:

   Determinant of ((1, 0, 0), (8, 11, -11), (17, 17, -19))  = -22

We're doing great.

Next I'll take {b1} and {b2} as input and try to find a 2x2 matrix in integer coordinates that has the same kernel but lower complexity, in the sense of the sum of the absolute values of the components.

    complexity 25 : [[-10, -1, 5], [-1, 5, -3]] using [[3, -2], [2, -1]]
    complexity 26 : [[-11, 4, 2], [-1, 5, -3]] using [[5, -3], [2, -1]]

These are pretty low complexity commas! But they're not quite the commas that I identified as minimal for defining 31-EDO in rank-3 when I was using just tuning as a measure of complexity. Those were [[8, -5, 0], [-10, -1, 5]], which has interval-space complexity (8 + 5 + 10 + 1 + 5 = ) 29. And you can see that the [-10, -1, 5] interval appears in the complexity 25 set. So there's some overlap. Let's compare the just tunings:

[-10, -1, 5] # 3125/3072
[-1, 5, -3] # 243/250
[-11, 4, 2] # 2025/2048
[8, -5, 0] # 256/243

Hm, actually I don't think my 2x2 matrix finding program will ever produce [8, -5, 0]. It looks like it only ever gives me non-zero components for all three harmonics. That's probably something I have to solve.

Speaking of things I have to solve, I kind of assumed that of these guys would be tempered out and that the pairs of them had kernel = (22, 35, 51) when the pairs of intervals are linearly independent, but I guess I should verify that in code instead of just checking a few examples and assuming that the pattern holds everywhere. Instead I'll check *many* examples in code and then assume that the pattern holds everywhere.

...

I tried a different complexity measure than the sum of absolute values of components, and it still gave me [[-10, -1, 5], [-1, 5, -3]] as the simplest commas. And another complexity measure gives [[-11, 4, 2], [-1, 5, -3]] as the simplest. I bet these complexity measures would perform well enough if I let them look at intervals with zeros.

...

Lol, I messed up. The intervals ([1, 0, 0], [8, -5, 0], [-10, -1, 5]) are a minimal basis for 25-EDO, not 22-EDO. The minimal tempering basis I'd found in the "Higher-Rank EDO-Generator" post for 22-EDO were ([1, 0, 0], [1, -5, 3], [11, -4, -2]), which the current method also found.

...

No comments:

Post a Comment