Vector's temperament accuracy metric

From Xenharmonic Reference
This is a technical or mathematical page. While the subject may be of some relevance to music, the page treats the subject in technical language.

To determine rank-2 temperament accuracy, one approach is to examine each tuning of the temperament where one prime (other than the equave) is tuned just (in this article, we will refer to this interval as the eigenmonzo - for example, 5 is the eigenmonzo for quarter-comma meantone because that tuning tunes 5 just by setting the generator to 5^(1/4)), and observe how it detunes the rest of the intervals.

The formula

log211200(E)abs(((logE(A)PaPe)(GbGa)+PbPe(logE(B)))Ga)abs(Ga)+abs(Gb)

The error is the maximum value this takes over all pairs of non-equave primes in the temperament, for

  • the equave E
  • two primes A and B
  • a (possibly contorted) mapping matrix for E.A.B restriction of the temperament of the form [PePaPb0GaGb].

Lower error means higher accuracy. The error is generally multiplied

The derivation

For

  • an equave E
  • two primes A and B, wherein A is the eigenmonzo, and
  • a mapping for a rank-2 temperament where the equave is an integer multiple of the period

we first find the generator which produces a justly tuned prime A. This is done by subtracting multiples of the equave from the logarithm (in the base of the equave) of A (based on the mapping entry Pa specifying the number of fractional-equave periods in A), and then dividing the remainder by the mapping entry Ga specifying the number of generators in A.

Thus, we have

(logE(A)PaPe)Ga

where Pe is the number of periods in the equave.

We then use this generator to construct an eigenmonzo-A tuning of B by multiplying by the number of generators in B (Gb), then adding the number of periods in B (Pb) divided by the number of periods per equave (to get the rational multiple of the equave to be added).

Therefore, we get

(logE(A)PaPe)(GbGa)+PbPe

Finally, we compare to the just tuning of B. I have defined a variable k to be equal to this for ease of reading.

k=((logE(A)PaPe)(GbGa)+PbPe(logE(B)))

(We will end up taking the absolute value of this later.)

Now, the problem is that if we are to examine each pair of primes, it now becomes very significant what order we choose to do them in. In the case of meantone, for instance, the error is a full syntonic comma if we decide to examine 5's error with a just 3, but only a quarter syntonic comma if we examine 3's error with a just 5.

A naive approach would be to simply take the smaller of the two.

However, if we work this out, it turns out that garibaldi is almost as inaccurate in 2.5.7 as meantone is in 2.3.5. This seems counterintuitive.

The reason garibaldi feels more accurate intuitively is because the error can be roughly evenly split between 5 and 7. In garibaldi, you only need to detune 5 and 7 by about 2.5 cents each, whereas meantone maximizes accuracy by detuning 3 and 5 both by about 4.5 cents.

So, to determine the real accuracy, we will solve for the tuning that equalizes error on both intervals. As we detune one interval by more and more of the tuning error given by k, the other interval becomes more in-tune, in a linear relationship: if kAx represents the absolute detuning of A in terms of the portion of its corresponding k, then as x approaches 1, the dependent variable y = kB - kBx (where kB represents abs(k) when the primes are the other way around) approaches 0. The ratio of kA and kB is exactly kA/kB = |Gb|/|Ga|. For instance, in meantone with 3 and 5, kA is about 22 cents (the detuning of 5 required for a just 3), while kB is about 5.5 cents (the detuning of 3 required for a just 5). Likewise, |Gb| is 4, and |Ga| is 1.

The solution to this kind of system of equations is expressed as x = kB/(kB+kA) and y = kAkB/(kB+kA); the latter is what we are interested in as it will ultimately be our final result (being the equal detuning mentioned earlier).

Therefore, plugging the absolute value of our existing k in for kA and |k|/(|Gb|/|Ga|) for kB, we get

abs(k)abs(Gb)abs(Ga)abs(k)abs(k)abs(Gb)abs(Ga)+abs(k)

This is rather ugly, but it can be simplified:

abs(kGa)abs(Ga)+abs(Gb)

Finally, we can plug in our existing expression for k:

abs(((logE(A)PaPe)(GbGa)+PbPe(logE(B)))Ga)abs(Ga)+abs(Gb)

And multiply by the number of cents in the equave:

log211200(E)abs(((logE(A)PaPe)(GbGa)+PbPe(logE(B)))Ga)abs(Ga)+abs(Gb)

The error is the maximum value this takes for all pairs of non-equave primes in the temperament. (So, for a temperament in 2.3.5.7, for instance, you would examine 2.3.5, 2.3.7, and 2.5.7.)

Generalizations

TODO: find a way to generalize to rank-3

Results

Temperament Error
Father 55.9
Dicot 23.56
Semaphore 11.90
Archy 9.09
Porcupine 6.59
Meantone 4.61
Garibaldi 2.627
Kleismic 0.789
Schismic 0.217

The page List of regular temperaments on this wiki uses the following categories for accuracy:

Error range Category
30+ extremely low
15-30 very low
10-15 low
6-10 medium-low
3-6 medium
1-3 medium-high
0.3-1 high
0-0.3 very high