User:Overthink/Asymptotic consistency score: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Overthink (talk | contribs)
The consistency metric: added more lists
Overthink (talk | contribs)
reworked lists after debugging code so second-best mappings work properly
Line 18: Line 18:
== The consistency metric ==
== The consistency metric ==


We want to give each edo a single score for how well it does in terms of consistency. Given n-edo, we start with the trivial mapping ⟨n| 0]. We then add each odd one by one, and look at how many additional intervals are consistent and inconsistent. When we add odd q, each consistent interval increases the score by 1/q<sup>2</sup>, and each inconsistent interval decreases the score by 3/q<sup>2</sup>. However, it is impossible to calculate this score precisely, as there would be infinitely many terms. Using a program I made on scratch, considering EDOs up to 311 and odds up to 255, here is a sequence of EDOs that have better consistency scores:
We want to give each edo a single score for how well it does in terms of consistency. Given n-edo, we start with the trivial mapping ⟨n| 0]. We then add each odd one by one, and look at how many additional intervals are consistent and inconsistent. When we add odd q, each consistent interval increases the score by 1/q<sup>2</sup>, and each inconsistent interval decreases the score by 3/q<sup>2</sup>. However, it is impossible to calculate this score precisely, as there would be infinitely many terms. Using a program I made on scratch, considering EDOs up to 311 and odds up to 511, here is a sequence of EDOs that have better consistency scores:


{{edos|(1, 3, 4,) 5, 10, 15, 22, 29, 31, 41, 46, 53, 87, 130, 140, 183, 270, 311.}}
{{edos|(1, 2, 3,) 7, 10, 24, 31, 38, 39, 45.}}
 
Here's the same list with odds up to 255:
 
{{edos|(1, 2, 3,) 5, 7, 10, 24, 31, 41, 45, 270.}}


In the 127-odd-limit:
In the 127-odd-limit:


{{Edos|(1, 3, 4,) 5, 10, 15, 22, 29, 31, 41, 46, 53, 87, 183, 270, 311.}}
{{Edos|(1, 3,) 5, 7, 10, 15, 24, 29, 31, 37, 41, 45, 46, 53, 87, 183, 270, 311.}}


63-odd-limit:
63-odd-limit:


{{Edos|(1, 3, 4,) 5, 10, 15, 22, 24, 29, 31, 41, 87, 159, 183, 270, 311.}}
{{Edos|(1, 3,) 5, 10, 15, 22, 24, 29, 41, 87, 159, 183, 217, 270, 311.}}


31-odd-limit:
31-odd-limit:


{{Edos|(1, 3, 4,) 5, 10, 15, 22, 29, 41, 87, 159, 217, 282, 311.}}
{{Edos|(1, 3, 4,) 5, 10, 15, 22, 29, 41, 80, 87, 159, 217, 282, 311.}}


63-odd-limit, up to 20567edo (took a few minutes to generate):
63-odd-limit, up to 20567edo (outdated):


{{Edos|(1, 3, 4,) 5, 10, 15, 22, 29, 31, 41, 87, 159, 183, 270, 311, 388, 525, 653, 718, 1600, 2554, 3889, 4380, 10257, 14348.}}
{{Edos|(1, 3, 4,) 5, 10, 15, 22, 29, 31, 41, 87, 159, 183, 270, 311, 388, 525, 653, 718, 1600, 2554, 3889, 4380, 10257, 14348.}}


Surprisingly, 20567edo itself isn't on the last list.
For some reason, 45edo does extremely well in high limits?

Revision as of 22:38, 5 October 2025

We want to create a metric that gives a score for an edo showing how well it does in terms of consistency in high limits.

What mapping to choose

We will be using a somewhat idiosyncratic approach of considering composite harmonics like 9 independently of the primes they are made up of, meaning the mapping of 9 is not necessarily equal to twice the mapping of 3. For example, with each harmonic using its closest mapping, 18edo maps 3/1 to 29 steps, and 9/1 to 57 steps. We will also be considering unsimplified ratios involving composite harmonics independently of their simplified versions. Using traditional mappings, in 18edo, 3/1 is consistent, but 9/1 is not. In our system, 3/1 and 9/1 are consistent, being 29 and 57 steps respectively, but 9/3 is not, being 28 steps, while its just value is closest to 29 steps.


We want our rating to prioritize lower limits over higher ones. We also want it to use the best mapping of the edo, which may or may not map each odd harmonic to its closest value. Given n-EDO, we start with a trivial mapping we will write as ⟨n| 0], which maps 1/1 to 0 steps. The n on the left is the number of steps of the octave. Note that while we will be write our mappings somewhat like vals, we are not using traditional vals with primes, but instead mappings with odds described in the introduction. From then on, we either add the closest or second-closest mapping of the next odd harmonic, whichever one leads to the least amount of inconsistencies. Note that an interval and its octave complement are counted as one, not seperately, and octave equivalence is presumed. If both mappings have the same number of inconsistencies, the closest mapping is used. Lets look at 49edo for an example:

Approximation of odd harmonics in 49edo
Harmonic 3 5 7 9 11 13 15 17 19 21 23
Error Absolute (¢) +8.2 +5.5 +10.8 -8.0 +11.9 -7.9 -10.7 -7.0 -3.6 -5.5 +8.5
Relative (%) +33.7 +22.6 +44.0 -32.6 +48.8 -32.2 -43.8 -28.6 -14.8 -22.4 +34.5
Steps
(reduced)
78
(29)
114
(16)
138
(40)
155
(8)
170
(23)
181
(34)
191
(44)
200
(4)
208
(12)
215
(19)
222
(26)

We add the best approximations of odds 3, 5, and 7, as 49edo is consistent in these limits. Our mapping so far is therefore ⟨49 | 0 78 114 138], which reduces to ⟨49| 0 29 16 40]. When we get to odd 9, we have some inconsistencies. Using the nearest mapping of 9, we have 9/3, 9/5, and 9/7 inconsistent. Using our second nearest mapping, we only have 9/1 inconsistent, and since one inconsistency is less than three, we go with the second nearest mapping of 9 to get ⟨0 29 16 40 9] reduced. Then, using the nearest mapping of 11 adds no additional inconsistencies, so we go with that to get ⟨49| 0 29 16 40 9 23]. Then, using the nearest mapping of 13 gets 13/3, 13/5, 13/7, 13/9, and 13/11 inconsistent, while the second nearest mapping only gets 13/1 inconsistent, so we go with that to get ⟨49| 0 29 16 40 9 23 35]. Finally, adding odd 15, we find the second closest mapping (and the one where 15=3*5 is preserved) is best, giving us ⟨49| 0 29 16 40 9 23 35 45].

Dual-prime systems

While in our example, odds 9 and 15 are mapped the same as they would using a val (specifically the 49f val), this is not always the case. We look at another example, 35edo:

Approximation of odd harmonics in 35edo
Harmonic 3 5 7 9 11 13 15 17 19 21 23
Error Absolute (¢) -16.2 -9.2 -8.8 +1.8 -2.7 +16.6 +8.9 -2.1 +11.1 +9.2 -11.1
Relative (%) -47.4 -26.7 -25.7 +5.3 -8.0 +48.5 +25.9 -6.1 +32.3 +26.9 -32.5
Steps
(reduced)
55
(20)
81
(11)
98
(28)
111
(6)
121
(16)
130
(25)
137
(32)
143
(3)
149
(9)
154
(14)
158
(18)

As 35edo is consistent in the 7-odd-limit, we use the best mappings of odds 3 through 7, with a mapping of ⟨35| 0 20 11 28]. When we get to odd 9, the closest mapping is best, giving us a mapping of ⟨35| 0 20 11 28 6]. The ratio between odds 9 and 3 in this mapping is not mapped to the same interval as the ratio between odds 3 and 1, even though the fraction 9/3 simplifies to 3/1. Here, we map 9/6 (9/3 reduced) to 21 steps, while we map 3/2 to 20 steps. This effectively means 3/2 has two different mappings, one at 20 steps and the other at 21, so 35edo is a dual-fifth system. Note that 49edo should technically also be a dual-fifth system, since harmonic 3 is (just barely) more than 1/3 of an edostep sharp, but the sharpness of harmonics 5, 7, and 11 means it is best to use the harmonic 9 mapped to 3*3, rather than take the best approximation of 9 and have dual 3's.

While the aim of this page is to create a metric for overall consistency of an EDO, this mapping based on odds rather than primes may itself be an interesting topic to explore, even though it was really created mostly to simplify calculations.

The consistency metric

We want to give each edo a single score for how well it does in terms of consistency. Given n-edo, we start with the trivial mapping ⟨n| 0]. We then add each odd one by one, and look at how many additional intervals are consistent and inconsistent. When we add odd q, each consistent interval increases the score by 1/q2, and each inconsistent interval decreases the score by 3/q2. However, it is impossible to calculate this score precisely, as there would be infinitely many terms. Using a program I made on scratch, considering EDOs up to 311 and odds up to 511, here is a sequence of EDOs that have better consistency scores:

(1, 2, 3,) 7, 10, 24, 31, 38, 39, 45.

Here's the same list with odds up to 255:

(1, 2, 3,) 5, 7, 10, 24, 31, 41, 45, 270.

In the 127-odd-limit:

(1, 3,) 5, 7, 10, 15, 24, 29, 31, 37, 41, 45, 46, 53, 87, 183, 270, 311.

63-odd-limit:

(1, 3,) 5, 10, 15, 22, 24, 29, 41, 87, 159, 183, 217, 270, 311.

31-odd-limit:

(1, 3, 4,) 5, 10, 15, 22, 29, 41, 80, 87, 159, 217, 282, 311.

63-odd-limit, up to 20567edo (outdated):

(1, 3, 4,) 5, 10, 15, 22, 29, 31, 41, 87, 159, 183, 270, 311, 388, 525, 653, 718, 1600, 2554, 3889, 4380, 10257, 14348.

For some reason, 45edo does extremely well in high limits?