Tenney–Euclidean temperament measures: Difference between revisions
m Properly reference another mention of primerr |
Document my implementation of Sintel's error. Request proof for logflat badness. - editorial notes |
||
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
== Preliminaries == | == 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. | 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. These differences come up because we are adopting different averaging methods for the entries of a multivector. To start with, consider a norm defined by means of the usual {{w|norm (mathematics) #Euclidean norm|Euclidean norm}}, a.k.a. ''L''<sup>2</sup> or ℓ<sub>2</sub> 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 {{w|root mean square}} (RMS) average of the entries, by normalizing for the temperament's rank, and/or by normalizing up to the norm of the [[just tuning map]]. | ||
''These metrics are meant to be used to rank temperaments within the same [[rank]] and [[subgroup]]''. It does not matter much which scheme is used, because 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<ref name="primerr">Graham Breed. [http://x31eq.com/temper/primerr.pdf ''Prime Based Error and Complexity Measures''], often referred to as ''primerr.pdf''.</ref> are based on an RMS norm normalized for the temperament's rank, as are parts of his [https://x31eq.com/temper/ Temperament Finder], although other scaling and normalization methods are sometimes used as well. | |||
More recently, it is proposed that the metrics should be normalized to allow us to meaningfully compare temperaments across subgroups and even ranks. [[Sintel]]'s scheme in 2023 is the first attempt at this goal<ref name="sintel">Sintel. [https://github.com/Sin-tel/temper/blob/c0d5c36e3c189f64860f4aea288ff3ff3bc34982/lib_temper/temper.py "Collection of functions for dealing with regular temperaments"], Temperament Calculator.</ref>, though still with notable caveats. | |||
Each of these will be discussed in detail below. | |||
== TE complexity == | == TE complexity == | ||
| Line 42: | Line 36: | ||
$$ \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}} $$ | $$ \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 ''n''<sup>''r''</sup> 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. | where ''n'' is the number of primes up to the prime limit ''p'', and ''r'' is the rank of the temperament. Thus ''n''<sup>''r''</sup> 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. That is the definition used by Graham Breed's Temperament Finder. | ||
Gene Ward Smith's RMS norm is given as | Gene Ward Smith's RMS norm is given as | ||
| Line 86: | Line 78: | ||
$$ | $$ | ||
And that is the definition used by Graham Breed's Temperament Finder. | |||
Gene Ward Smith defines the TE error as the ratio {{nowrap|‖''M''<sub>''W''</sub> ∧ ''J''<sub>''W''</sub>‖/‖''M''<sub>''W''</sub>‖}}, derived from the relationship of TE simple badness and TE complexity. See the next section. We denote this definition of TE error ''Ψ''. From {{nowrap|‖''M''<sub>''W''</sub> ∧ ''J''<sub>''W''</sub>‖/‖''M''<sub>''W''</sub>‖}} we can extract a coefficient {{nowrap| sqrt(''C''(''n'', ''r'' + 1)/''C''(''n'', ''r'')) {{=}} sqrt((''n'' − ''r'')/(''r'' + 1)) }}, which relates ''Ψ'' with ''E'' as follows: | Gene Ward Smith defines the TE error as the ratio {{nowrap|‖''M''<sub>''W''</sub> ∧ ''J''<sub>''W''</sub>‖/‖''M''<sub>''W''</sub>‖}}, derived from the relationship of TE simple badness and TE complexity. See the next section. We denote this definition of TE error ''Ψ''. From {{nowrap|‖''M''<sub>''W''</sub> ∧ ''J''<sub>''W''</sub>‖/‖''M''<sub>''W''</sub>‖}} we can extract a coefficient {{nowrap| sqrt(''C''(''n'', ''r'' + 1)/''C''(''n'', ''r'')) {{=}} sqrt((''n'' − ''r'')/(''r'' + 1)) }}, which relates ''Ψ'' with ''E'' as follows: | ||
| Line 100: | Line 92: | ||
''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, {{nowrap| ''G'' {{=}} sin ''θ'' }} octaves, where ''θ'' is the angle between ''J''<sub>''W''</sub> and the val in question. | ''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, {{nowrap| ''G'' {{=}} sin ''θ'' }} octaves, where ''θ'' is the angle between ''J''<sub>''W''</sub> and the val in question. | ||
Sintel | In Sintel's routine, the TE error may be derived as the ratio {{nowrap|‖''M''<sub>''U''</sub> ∧ ''J''<sub>''U''</sub>‖/‖''M''<sub>''U''</sub>‖}}, using ''U''-weighted norm (see the next section), which evaluates to the same value as Graham's definition. A hybrid RMS version of this is implemented in the [https://github.com/FloraCanou/temperament_evaluator Temperament Evaluator], with the extra factor 1/sqrt(''n''). | ||
== TE simple badness == | == TE simple badness == | ||
| Line 109: | Line 101: | ||
$$ B = C \cdot E $$ | $$ B = C \cdot E $$ | ||
Gene Ward Smith defines the simple badness | Graham Breed's simple badness is directly derived from this formula. | ||
Gene Ward Smith defines the simple badness as {{nowrap|‖''M''<sub>''W''</sub> ∧ ''J''<sub>''W''</sub>‖<sub>RMS</sub>}}. A perhaps simpler way to view this is to start with a mapping matrix ''V''<sub>''W''</sub> and add an extra row ''J''<sub>''W''</sub> corresponding to the just tuning map; we will label this matrix ''Ṽ''<sub>''W''</sub>. 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)}} $$ | $$ \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. | 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. | ||
Sintel has likewise given a simple badness as | Sintel has likewise given a simple badness as | ||
| Line 124: | Line 116: | ||
=== Reduction to the span of a comma === | === Reduction to the span of a comma === | ||
It is notable that if ''M'' is codimension-1, we may view it as representing [[ | It is notable that if ''M'' is codimension-1, we may view it as representing the [[Hodge dual]] of a single comma. In this situation, the simple badness happens to reduce to the [[Interval span|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. | 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. | ||
| Line 133: | Line 125: | ||
$$ L = B \cdot C^{r/(n - r)} $$ | $$ 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. | 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.{{cn}} | ||
In Graham's and Gene's derivations, | In Graham's and Gene's derivations, | ||
| Line 143: | Line 135: | ||
$$ L = \norm{ M_U \wedge J_U } \norm{M_U}^{r/(n - r)} / \norm{J_U} $$ | $$ L = \norm{ M_U \wedge J_U } \norm{M_U}^{r/(n - r)} / \norm{J_U} $$ | ||
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, | 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, it has no effects on Graham's derivation since ‖''J''<sub>''W''</sub>‖<sub>RMS</sub> is unity. | ||
== Examples == | == Examples == | ||
| Line 159: | Line 151: | ||
| 5.400 | | 5.400 | ||
| 2.763 | | 2.763 | ||
| | | 0.0124 | ||
|- | |- | ||
| Septimal magic | | Septimal magic | ||
| 7.195 | | 7.195 | ||
| 2.149 | | 2.149 | ||
| | | 0.0129 | ||
|} | |} | ||
{| class="wikitable center-all left-1" | {| class="wikitable center-all left-1" | ||
| Line 177: | Line 169: | ||
| 1.350 | | 1.350 | ||
| 1.382 | | 1.382 | ||
| | | 0.00155 | ||
|- | |- | ||
| Septimal magic | | Septimal magic | ||
| 1.799 | | 1.799 | ||
| 1.074 | | 1.074 | ||
| | | 0.00161 | ||
|} | |} | ||
{| class="wikitable center-all left-1" | {| class="wikitable center-all left-1" | ||
| Line 195: | Line 187: | ||
| 2.204 | | 2.204 | ||
| 3.384 | | 3.384 | ||
| | | 0.00622 | ||
|- | |- | ||
| Septimal magic | | Septimal magic | ||
| 2.937 | | 2.937 | ||
| 2.631 | | 2.631 | ||
| | | 0.00644 | ||
|} | |} | ||
{| class="wikitable center-all left-1" | {| class="wikitable center-all left-1" | ||
| Line 212: | Line 204: | ||
| Septimal meantone | | Septimal meantone | ||
| 17.357 | | 17.357 | ||
| | | 2.477 | ||
| | | 0.0358 | ||
|- | |- | ||
| Septimal magic | | Septimal magic | ||
| 23.126 | | 23.126 | ||
| 1. | | 1.926 | ||
| | | 0.0371 | ||
|} | |} | ||
| Line 224: | Line 216: | ||
* [[Cangwu badness]] – a derived badness measure with a free parameter that enables one to specify a tradeoff between complexity and error | * [[Cangwu badness]] – a derived badness measure with a free parameter that enables one to specify a tradeoff between complexity and error | ||
== | == References == | ||
<references/> | <references/> | ||