Tenney–Euclidean temperament measures: Difference between revisions
It's fine to use det! |
Sintel's simple and logflat badnesses |
||
Line 105: | Line 105: | ||
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. | 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. | ||
Sintel has likewise given a simple badness as | |||
$$ \norm{ J_U \wedge M_U }_2 $$ | |||
where {{nowrap| ''J''<sub>''U''</sub> {{=}} ''J''<sub>''W''</sub>/det(''W'')<sup>1/''n''</sup> }} is the ''U''-weighted just tuning map. | |||
=== Reduction to the span of a comma === | === Reduction to the span of a comma === | ||
Line 111: | Line 117: | ||
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. | 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 | Some consider the simple badness to be a sort of badness which favors complex temperaments. The '''logflat badness''' 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 derivation, | |||
$$ L = \norm{ J_W \wedge M_W } \norm{M_W}^{r/(n - r)} $$ | |||
In Sintel's Dirichlet coefficients, or Dirichlet badness, | |||
$$ L = \norm{ J_U \wedge M_U } \norm{M_U}^{r/(n - r)} / \norm{J_U} $$ | |||
= \norm{ | |||
Notice the extra factor 1/‖''J''<sub>''U''</sub>‖, 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 ‖''J''<sub>''W''</sub>‖<sub>RMS</sub> is unity. | |||
== Examples == | == Examples == |
Revision as of 14:40, 3 June 2025
complexity, error, and badness, respectively, and they follow the identity
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$$ \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:
- Taking the simple L2 norm
- Taking an RMS
- Taking an RMS and also normalizing for the temperament rank
- 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, called Dirichlet coefficients, is the first attempt at this goal[1].
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.
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 ‖M‖RMS. 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 |VWVW T| = |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 TE tuning. TE error may be expressed in any logarithmic interval size units such as cents or octaves.
By Graham Breed's definition[2], TE error may be accessed via TE tuning map. If TW is the Tenney-weighted tuning map, then the TE error G can be found by
$$ \begin{align} G &= \norm{T_W - J_W}_\text{RMS} \\ &= \norm{J_W(V_W^+ V_W - I) }_\text{RMS} \\ &= \sqrt{J_W(V_W^+ V_W - I)(V_W^+ V_W - I)^\mathsf{T} J_W^\mathsf{T}/n} \end{align} $$
If TW is denominated in cents, then JW should be also, so that JW = ⟨1200 1200 … 1200]. Here TW − JW is the list of weighted errors of each prime harmonic.
- 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 (‖JW ∧ 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 1 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
$$ \psi = \sqrt{\frac{2(n-r)}{(r+1)(n-1)}} \Psi $$
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:
$$ G = \sqrt{\frac{n-1}{2n}} \psi = \sqrt{\frac{n-r}{(r+1)n}} \Psi $$
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 θ, where θ is the angle between JW and the val in question. Multiplying by 1200 to obtain a result in cents leads to 1200 sin(θ), the TE error in cents.
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.
Gene Ward Smith defines the simple badness of M as ‖JW ∧ MW‖RMS, where JW = ⟨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 = JW·(vw)i/n is the mean value of the entries of (vw)i. Then note that JW ∧ ((vw)1 − a1JW) ∧ ((vw)2 − a2JW) ∧ … ∧ ((vw)r − arJW) = JW ∧ (vw)1 ∧ (vw)2 ∧ … ∧ (vw)r, since wedge products with more than one term JW are zero. The Gram matrix of the vectors JW and (vw)1 − aiJW will have n as the (1, 1) entry, and 0's in the rest of the first row and column. Hence we obtain:
$$ \norm{ J_W \wedge M_W }'_\text {RMS} = \sqrt{\frac{n}{C(n, r + 1)}} \det((\vec{v_w})_i \cdot (\vec{v_w})_j - n a_i a_j) $$
A perhaps simpler way to view this is to start with a mapping matrix VW and add an extra row JW corresponding to the JIP; we will label this matrix VJ. Then the simple badness is:
$$ \norm{ J_W \wedge M_W }'_\text {RMS} = \sqrt{\frac{n}{C(n, r + 1)}} \det(V_J V_J^\mathsf{T}) $$
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.
Sintel has likewise given a simple badness as
$$ \norm{ J_U \wedge M_U }_2 $$
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 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 derivation,
$$ L = \norm{ J_W \wedge M_W } \norm{M_W}^{r/(n - r)} $$
In Sintel's Dirichlet coefficients, or Dirichlet badness,
$$ L = \norm{ J_U \wedge M_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 ‖JW‖RMS is unity.
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.
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 |
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.0 1.1 Sintel. "Collection of functions for dealing with regular temperaments", Temperament Calculator.
- ↑ 2.0 2.1 Graham Breed. Prime Based Error and Complexity Measures, often referred to as primerr.pdf.