Tenney–Euclidean temperament measures: Difference between revisions

Document my implementation of Sintel's error. Request proof for logflat badness. - editorial notes
 
Line 36: 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.  
 
: '''Note''': 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 80: Line 78:
$$
$$


: '''Note''': that is the definition used by Graham Breed's temperament finder.  
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 94: 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 defines the TE error as the ratio {{nowrap|''G'' {{=}} ‖''M''<sub>''U''</sub> ∧ ''J''<sub>''U''</sub>‖/‖''M''<sub>''U''</sub>‖}}, using ''U''-weighted norm (see the next section), and it results to the same value of Graham's definition.
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 103: Line 101:
$$ B = C \cdot E $$
$$ B = C \cdot E $$


Gene Ward Smith defines the simple badness of ''M'' 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:
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.
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
Sintel has likewise given a simple badness as
Line 118: 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 [[the 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.
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 127: 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 137: 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, whether this factor is omitted or not has no effects on Graham's derivation since ‖''J''<sub>''W''</sub>‖<sub>RMS</sub> is unity.  
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 153: Line 151:
| 5.400
| 5.400
| 2.763
| 2.763
| 1.244×10<sup>−2</sup>
| 0.0124
|-
|-
| Septimal magic
| Septimal magic
| 7.195
| 7.195
| 2.149
| 2.149
| 1.288×10<sup>−2</sup>
| 0.0129
|}
|}
{| class="wikitable center-all left-1"
{| class="wikitable center-all left-1"
Line 171: Line 169:
| 1.350
| 1.350
| 1.382
| 1.382
| 1.554×10<sup>−3</sup>
| 0.00155
|-
|-
| Septimal magic
| Septimal magic
| 1.799
| 1.799
| 1.074
| 1.074
| 1.610×10<sup>−3</sup>
| 0.00161
|}
|}
{| class="wikitable center-all left-1"
{| class="wikitable center-all left-1"
Line 189: Line 187:
| 2.204
| 2.204
| 3.384
| 3.384
| 6.218×10<sup>−3</sup>
| 0.00622
|-
|-
| Septimal magic
| Septimal magic
| 2.937
| 2.937
| 2.631
| 2.631
| 6.441×10<sup>−3</sup>
| 0.00644
|}
|}
{| class="wikitable center-all left-1"
{| class="wikitable center-all left-1"
Line 206: Line 204:
| Septimal meantone
| Septimal meantone
| 17.357
| 17.357
| 1.382
| 2.477
| 1.999×10<sup>−2</sup>
| 0.0358
|-
|-
| Septimal magic
| Septimal magic
| 23.126
| 23.126
| 1.074
| 1.926
| 2.070×10<sup>−2</sup>
| 0.0371
|}
|}


Line 218: 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


== Notes ==
== References ==
<references/>
<references/>