Tenney–Euclidean temperament measures

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

[math]\displaystyle{ \def\hs{\hspace{-3px}} \def\vsp{{}\mkern-5.5mu}{} \def\llangle{\left\langle\vsp\left\langle} \def\lllangle{\left\langle\vsp\left\langle\vsp\left\langle} \def\llllangle{\left\langle\vsp\left\langle\vsp\left\langle\vsp\left\langle} \def\llbrack{\left[\left[} \def\lllbrack{\left[\left[\left[} \def\llllbrack{\left[\left[\left[\left[} \def\llvert{\left\vert\left\vert} \def\lllvert{\left\vert\left\vert\left\vert} \def\llllvert{\left\vert\left\vert\left\vert\left\vert} \def\rrangle{\right\rangle\vsp\right\rangle} \def\rrrangle{\right\rangle\vsp\right\rangle\vsp\right\rangle} \def\rrrrangle{\right\rangle\vsp\right\rangle\vsp\right\rangle\vsp\right\rangle} \def\rrbrack{\right]\right]} \def\rrrbrack{\right]\right]\right]} \def\rrrrbrack{\right]\right]\right]\right]} \def\rrvert{\right\vert\right\vert} \def\rrrvert{\right\vert\right\vert\right\vert} \def\rrrrvert{\right\vert\right\vert\right\vert\right\vert} }[/math][math]\displaystyle{ \def\abs#1{\left|{#1}\right|} \def\norm#1{\left\|{#1}\right\|} \def\floor#1{\left\lfloor{#1}\right\rfloor} \def\ceil#1{\left\lceil{#1}\right\rceil} \def\round#1{\left\lceil{#1}\right\rfloor} \def\rround#1{\left\lfloor{#1}\right\rceil} }[/math] 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, and they follow the identity

$$ \text{TE simple badness} = \text{TE complexity} \times \text{TE error} $$

Preliminaries

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. The reason these differences come up is because we are adopting different averaging methods for the entries of a multivector.

To start with, we may define a norm by means of the usual Euclidean norm, a.k.a. L2 norm or ℓ2 norm. The result of this is a kind of a sum of all the entries. We can rescale this in several ways, for example by taking a root mean square (RMS) average of the entries.

Here are the 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).

As these metrics are mainly used to rank temperaments within the same rank and just intonation subgroup, it does not matter much which scheme is used, because they 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.

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.

It is also possible to normalize the metrics to allow us to meaningfully compare temperaments across subgroups and even ranks. Sintel's scheme in 2023 is the first attempt at this goal[1].

TE complexity

Todo: rework

Explain without wedgies

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.

Let us define the val weighting matrix W to be the diagonal matrix with values 1, 1/log23, 1/log25 … 1/log2p along the diagonal. For the prime basis Q = 2 3 5 … p],

$$ W = \operatorname {diag} (1/\log_2 (Q)) $$

If V is the mapping matrix of a temperament, then VW = VW is the mapping matrix in the weighted space, its rows being the weighted vals (vw)i.

Our first complexity measure of a temperament is given by the L2 norm of the Tenney-weighted wedgie MW, which can in turn be obtained from the Tenney-weighted mapping matrix VW. This complexity can be easily computed either from the wedgie or from the mapping matrix, using the Gramian:

$$ \norm{M_W}_2 = \sqrt {\det(V_W V_W^\mathsf{T})} $$

where det(·) denotes the determinant, and  T denotes the transpose.

Graham Breed and Gene Ward Smith have proposed different RMS norms. Let us denote the RMS norm of M as ‖MRMS. In Graham's paper[2], an RMS norm is proposed as

$$ \norm{M_W}_\text{RMS} = \sqrt {\det \left( \frac {V_W V_W^\mathsf{T}}{n} \right)} = \frac {\norm{M_W}_2}{\sqrt {n^r}} $$

where n is the number of primes up to the prime limit p, and r is the rank of the temperament. Thus nr is the number of permutations of n things taken r at a time with repetition, which equals the number of entries of the wedgie in its full tensor form.

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

Gene Ward Smith's RMS norm is given as

$$ \norm{M_W}_\text{RMS'} = \sqrt {\frac{\det(V_W V_W^\mathsf{T})}{C(n, r)}} = \frac {\norm{M_W}_2}{\sqrt {C(n, r)}} $$

where C(n, r) is the number of combinations of n things taken r at a time without repetition, which equals the number of entries of the wedgie in the usual, compressed form.

We may also note det(VWVW T) = det(VW2V T). This may be related to the TE tuning projection matrix PW, which is VW T(VWVW T)−1VW, and the corresponding matrix for unweighted monzos P = V T(VW2V T)−1V.

Sintel has defined a complexity measure that serves as an intermediate step for his badness metric[1], which we will get to later. To obtain this complexity, we normalize the Tenney-weighting matrix W to U such that det(U) = 1, and then take the L2 norm of MU. It can be shown that

$$ U = W / \det(W)^{1/n} $$

and so the complexity is

$$ \norm{M_U}_2 = \norm{M_W}_2 / \det(W)^{r/n} $$

TE error

We can consider TE error to be a weighted average of the error of each prime harmonics in TE tuning, that is, a weighted average of the error map in the tuning where it is minimized. In this regard, TE error may be expressed in any logarithmic interval size units such as cents or octaves.

As with complexity, we may simply define the TE error as the L2 norm of the weighted TE error map. If TW = TW is the weighted TE tuning map and JW = JW = 1 1 … 1] is the weighted just tuning map, then the TE error E is given by

$$ \begin{align} E &= \norm{T_W - J_W}_2 \\ &= \norm{J_W(V_W^+ V_W - I) }_2 \\ &= \sqrt{J_W(V_W^+ V_W - I)(V_W^+ V_W - I)^\mathsf{T} J_W^\mathsf{T}} \end{align} $$

where + denotes the pseudoinverse.

Often, it is desirable to know the average of errors instead of the sum, which corresponds to Graham Breed's definition[2]. This error figure, G, can be found by

$$ \begin{align} G &= \norm{T_W - J_W}_\text{RMS} \\ &= E / \sqrt{n} \end{align} $$

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

Gene Ward Smith defines the TE error as the ratio ‖MWJW‖/‖MW‖, derived from the relationship of TE simple badness and TE complexity. See the next section. We denote this definition of TE error Ψ. From MWJW‖/‖MW we can extract a coefficient sqrt(C(n, r + 1)/C(n, r)) = sqrt((nr)/(r + 1)), which relates Ψ with E as follows:

$$ \Psi = \sqrt{\frac{r + 1}{n - r}} E $$

Also, if we set the rank r to 1, we get (n − 1)/2. It follows that dividing TE error by this value gives a constant of proportionality such that

$$ \psi = \sqrt{\frac{2}{n - 1}} E $$

gives another error, called the 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.

G and ψ error both have the advantage that higher-rank temperament error corresponds directly to rank-1 error, but the RMS normalization has the further advantage that in the rank-1 case, G = sin θ octaves, where θ is the angle between JW and the val in question.

TE simple badness

The TE simple badness of a temperament, which we may also call the relative error of a temperament, 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.

In general, if C is the complexity and E is the error of a temperament, then TE simple badness B is found by

$$ B = C \cdot E $$

Gene Ward Smith defines the simple badness of M as MWJWRMS. A perhaps simpler way to view this is to start with a mapping matrix VW and add an extra row JW corresponding to the just tuning map; we will label this matrix W. Then the simple badness is:

$$ \norm{ M_W \wedge J_W }_\text {RMS'} = \sqrt{\frac{\det(\tilde V_W \tilde V_W^\mathsf{T})}{C(n, r + 1)}} $$

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, skipped here because it is derived from the general formula.

Sintel has likewise given a simple badness as

$$ \norm{ M_U \wedge J_U }_2 = \sqrt{\det(\tilde V_U \tilde V_U^\mathsf{T})} $$

where JU = JW/det(W)1/n is the U-weighted just tuning map.

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 out 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 favors complex temperaments. The logflat badness (called Dirichlet coefficients in Sintel's scheme), is developed to address that. If we define B to be the simple badness (relative error) of a temperament, and C to be the complexity, then the logflat badness L is defined by the formula

$$ L = B \cdot C^{r/(n - r)} $$

The exponent is chosen such that 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.

In Graham's and Gene's derivations,

$$ L = \norm{ M_W \wedge J_W } \norm{M_W}^{r/(n - r)} $$

In Sintel's derivation,

$$ L = \norm{ M_U \wedge J_U } \norm{M_U}^{r/(n - r)} / \norm{J_U} $$

Notice the extra factor 1/‖JU‖, which is to say we divide it by the norm of the just tuning map. For comparison, Gene's derivation does not have this factor, whereas with Tenney weights, whether this factor is omitted or not has no effects on Graham's derivation since ‖JWRMS is unity.

Examples

While the different definitions yield different results, they are related to each other by a factor derived only from the rank and subgroup. A meaningful comparison of temperaments in the same rank and subgroup is provided by picking any one of them. Here, we consider septimal magic and meantone, as follows.

L2 norm
Temperament Complexity Error (¢) Simple badness
Septimal meantone 5.400 2.763 12.435×10−3
Septimal magic 7.195 2.149 12.882×10−3
Breed's RMS norm
Temperament Complexity Error (¢) Simple badness
Septimal meantone 1.350 1.382 1.554×10−3
Septimal magic 1.799 1.074 1.610×10−3
Smith's RMS norm
Temperament Complexity Error (¢) Simple badness
Septimal meantone 2.204 3.384 6.218×10−3
Septimal magic 2.937 2.631 6.441×10−3

See also

  • Cangwu badness – a derived badness measure with a free parameter that enables one to specify a tradeoff between complexity and error

Notes

  1. 1.0 1.1 Sintel. "Collection of functions for dealing with regular temperaments", Temperament Calculator.
  2. 2.0 2.1 Graham Breed. Prime Based Error and Complexity Measures, often referred to as primerr.pdf.