Tenney-Euclidean temperament measures

From Xenharmonic Wiki
(Redirected from RMS temperament measures)
Jump to navigation Jump to search

The Tenney-Euclidean temperament measures (TE temperament measures) consist of TE complexity, TE error, and TE simple badness. These are evaluations of a temperament's complexity, error, and badness, respectively. There have been several minor variations in the definition of TE temperament measures, which differ from each other only in their choice of multiplicative scaling factor. Each of these variations will be discussed below. Nonetheless, the following relationship always holds:

[math]\displaystyle \text{TE simple badness} = \text{TE complexity} \times \text{TE error} [/math]

TE temperament measures have been extensively studied by Graham Breed (see Prime Based Error and Complexity Measures, often referred to as primerr.pdf), who also proposed Cangwu badness, an important derived measure, which adds a free parameter to TE simple badness that enables one to specify a tradeoff between complexity and error.

Note on scaling factors

Given a multival or multimonzo which is a wedge product of weighted vals or monzos (where the weighting factors are 1/log2(p) for the entry corresponding to p), we may define a norm by means of the usual Euclidean norm (aka L2 norm or ℓ2 norm). We can rescale this several ways, for example by taking a root mean square (RMS) average of the entries of the multivector. These metrics are mainly used to rank temperaments relative to one another. In that regard, it does not matter much if an RMS or an L2 norm is used, because these two are equivalent up to a scaling factor, so they will rank temperaments identically. As a result, it is somewhat common to equivocate between the various choices of scaling factor, and treat the entire thing as "the" Tenney-Euclidean norm, so that we are really only concerned with the results of these metrics up to that equivalence.

Because of this, there are different "standards" for scaling that are commonly in use:

  1. Taking the simple L2 norm
  2. Taking an RMS
  3. Taking an RMS and also normalizing for the temperament rank
  4. Any of the above and also dividing by the norm of the just intonation points (JIP).

Graham Breed's original definitions from his primerr.pdf paper tend to use the third definition, as do parts of his temperament finder, although other scaling and normalization methods are sometimes used as well.

An important point of this normalization is to allow us to meaningfully compare measures of corresponding temperaments in different just intonation subgroups. However, none of them has been quite successful at this goal until Sintel developed a scheme in 2023.

TE complexity

Given a wedgie M, that is a canonically reduced r-val correspondng to a temperament of rank r, the norm ‖M‖ is a measure of the complexity of M; that is, how many notes in some sort of weighted average it takes to get to intervals. For 1-vals, for instance, it is approximately equal to the number of scale steps it takes to reach an octave. We may call it Tenney-Euclidean complexity, or TE complexity since it can be defined in terms of the Tenney-Euclidean norm.

Below shows various definitions of TE complexity. All of them can be easily computed either from the multivector or from the mapping matrix, using the Gramian.

Let us denote a weighted mapping matrix, whose rows are the weighted vals vi, as V. The L2 norm is one of the standard complexity measures:

[math]\displaystyle \lVert M \rVert_2 = \sqrt {\operatorname{det} (VV^\mathsf{T})}[/math]

where det () denotes the determinant, and VT denotes the transpose of V.

We denote the RMS norm as ‖M‖RMS. In Graham Breed's paper, an RMS norm is proposed as

[math]\displaystyle \lVert M \rVert_\text{RMS} = \sqrt {\operatorname{det} (\frac {VV^\mathsf{T}}{n})} = \frac {\lVert M \rVert_2}{\sqrt {n^r}}[/math]

where n is the number of primes up to the prime limit p, and r is the rank of the temperament, which equals the number of vals wedged together to compute the wedgie.

Note: that is the definition used by Graham Breed's temperament finder.

Gene Ward Smith has recognized that TE complexity can be interpreted as the RMS norm of the wedgie. That defines another RMS norm,

[math]\displaystyle \lVert M \rVert_\text{RMS}' = \sqrt {\frac{\operatorname{det} (VV^\mathsf{T})}{C(n, r)}} = \frac {\lVert M \rVert_2}{\sqrt {C(n, r)}}[/math]

where C(n, r) is the number of combinations of n things taken r at a time, which equals the number of entries of the wedgie.

Note: that is the definition currently used throughout the wiki, unless stated otherwise.

If W is a diagonal matrix with 1, 1/log23, …, 1/log2p along the diagonal and A is the matrix corresponding to V with unweighted vals as rows, then V = AW and det(VVT) = det(AW2AT). This may be related to the TE tuning projection matrix P, which is VT(VVT)-1V, and the corresponding matrix for unweighted monzos P = AT(AW2AT)-1A.

TE simple badness

The TE simple badness of M, which we may also call the relative error of M, may be considered error relativized to the complexity of the temperament. It is error proportional to the complexity, or size, of the multival; in particular for a 1-val, it is (weighted) error compared to the size of a step.

Gene Ward Smith defines the simple badness of M as ‖J∧M‖RMS, where J = 1 1 … 1] is the JIP in weighted coordinates. Once again, if we have a list of vectors we may use a Gramian to compute it. First we note that ai = J·vi/n is the mean value of the entries of vi. Then note that J∧(v1 - a1J)∧(v2 - a2J)∧…∧(vr - arJ) = J∧v1∧v2∧…∧vr, since wedge products with more than one term J are zero. The Gram matrix of the vectors J and v1 - aiJ will have n as the (1, 1) entry, and 0's in the rest of the first row and column. Hence we obtain:

[math]\displaystyle \lVert J \wedge M \rVert'_\text {RMS} = \sqrt{\frac{n}{C(n,r+1)}} \operatorname {det}([v_i \cdot v_j - na_ia_j])[/math]

A perhaps simpler way to view this is to start with a mapping matrix V and add an extra row J corresponding to the JIP; we will label this matrix VJ. Then the simple badness is:

[math]\displaystyle \lVert J \wedge M \rVert'_\text {RMS} = \sqrt{\frac{n}{C(n,r+1)}} \operatorname {det}(V_J V_J^\mathsf{T})[/math]

So that we can basically view the simple badness as the TE complexity of the "pseudo-temperament" formed by adding the JIP to the mapping matrix as if it were another val.

Graham Breed defines the simple badness slightly differently, again equivalent to a choice of scaling. This is skipped here because, by that definition, it is easier to find TE complexity and TE error first and multiply them together to get the simple badness.

Reduction to the span of a comma

It is notable that if M is codimension-1, we may view it as representing the dual of a single comma. In this situation, the simple badness happens to reduce to the span of the comma, up to a constant multiplicative factor, so that the span of any comma can itself be thought of as measuring the complexity relative to the error of the temperament vanishing that comma.

This relationship also holds if TOP is used rather than TE, as the TOP damage associated with tempering some comma n/d is log(n/d)/(nd), and if we multiply by the complexity nd, we simply get log(n/d) as our result.

TE logflat badness

Some consider the simple badness to be a sort of badness which heavily favors complex temperaments. The logflat badness is developed to address that. If we define S(A) to be the simple badness (relative error) of A, and C(A) to be the complexity of A, then the logflat badness is defined by the formula

[math]\displaystyle S(A)C(A)^{r/(n - r)} \\ = \lVert J \wedge M \rVert \lVert M \rVert^{r/(n - r)} [/math]

If we set a cutoff margin for logflat badness, there are still infinite numbers of new temperaments appearing as complexity goes up, at a lower rate which is approximately logarithmic in terms of complexity.

TE error

We can consider TE error to be a weighted average of the error of each prime harmonics in TE tuning. Multiplying it by 1200, we get a figure with values in cents.

By Graham Breed's definition, TE error may be accessed via TE tuning map. If T is the tuning map, then the TE error G can be found by

[math]\displaystyle \begin{align} G &= \lVert T - J \rVert_\text{RMS} \\ &= \lVert J(V^+V - I) \rVert_\text{RMS} \\ &= \sqrt{J(V^+V - I)(V^+V - I)^\mathsf{T}J^\mathsf{T}/n} \end{align} [/math]

If T is denominated in cents, then J should be also, so that J = 1200 1200 … 1200]. Here T - J is the list of weighted mistunings of each prime harmonics.

Note: that is the definition used by Graham Breed's temperament finder.

By Gene Ward Smith's definition, the TE error is derived from the relationship of TE simple badness and TE complexity. We denote this definition of TE error Ψ.

From the ratio (‖J∧M‖/‖M‖)2 we obtain C(n, r + 1)/(n C(n, r)) = (n - r)/(n (r + 1)). If we take the ratio of this for rank one with this for rank r, the n cancels, and we get (n - 1)/2 · (r + 1)/(n - r) = (r + 1)(n - 1)/(2(n - r)). It follows that dividing TE error by the square root of this ratio gives a constant of proportionality such that if Ψ is the TE error of a rank r temperament then

[math]\displaystyle \psi = \sqrt{\frac{2(n-r)}{(r+1)(n-1)}} \Psi[/math]

is an adjusted error which makes the error of a rank r temperament correspond to the errors of the edo vals which support it; so that requiring the edo val error to be less than (1 + ε)ψ for any positive ε results in an infinite set of vals supporting the temperament.

Ψ, ψ and G error can be related as follows:

[math]\displaystyle G = \sqrt{\frac{n-1}{2n}} \psi = \sqrt{\frac{n-r}{(r+1)n}} \Psi[/math]

G and ψ error both have the advantage that higher rank temperament error corresponds directly to rank one error, but the RMS normalization has the further advantage that in the rank one case, G = sin θ, where θ is the angle between J and the val in question. Multiplying by 1200 to obtain a result in cents leads to 1200 sin θ, the TE error in cents.

Examples

The different definitions yield different results, but they are related to each other by a factor derived only from the rank and limit. A meaningful comparison of temperaments in the same rank and limit can be provided by picking any one of them.

Here is a demonstration from 7-limit magic and meantone, comparing each of the definitions.

7-limit magic (left) vs meantone (right) in TE temperament measures
TE complexity TE error (¢) TE simple badness
Standard L2 norm 7.195 : 5.400 2.149 : 2.763 12.882×10-3 : 12.435×10-3
Breed's RMS norm 1.799 : 1.350 1.074 : 1.382 1.610×10-3 : 1.554×10-3
Smith's RMS norm 2.937 : 2.204 2.631 : 3.384 6.441×10-3 : 6.218×10-3