Tenney–Euclidean temperament measures: Difference between revisions

m - typo
Xenllium (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
 
(7 intermediate revisions by 2 users not shown)
Line 17: Line 17:
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.
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 [http://x31eq.com/temper/ temperament finder], although other scaling and normalization methods are sometimes used as well.
Graham Breed's original definitions from his ''primerr.pdf'' paper tend to use the third definition, as do parts of his [https://x31eq.com/temper/ 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<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>.  
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<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>.  


== TE complexity ==
== 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.  
TE complexity is the average hypervolume of the parallelepipeds formed by any ''n'' linearly independent generators which form and saturate that lattice. Since this is exactly the same thing as the magnitude of the multivector formed by those vectors, TE complexity is the exact same thing as the average of the coefficients of the [[wedgie]] for that temperament.


Let us define the val weighting matrix ''W'' to be the {{w|diagonal matrix}} with values 1, 1/log<sub>2</sub>3, 1/log<sub>2</sub>5 … 1/log<sub>2</sub>''p'' along the diagonal. For the prime basis {{nowrap|''Q'' {{=}} {{val| 2 3 5 … ''p'' }} }},  
Let us define the val weighting matrix ''W'' to be the {{w|diagonal matrix}} with values 1, 1/log<sub>2</sub>3, 1/log<sub>2</sub>5 … 1/log<sub>2</sub>''p'' along the diagonal. For the prime basis {{nowrap|''Q'' {{=}} {{val| 2 3 5 … ''p'' }} }},  
Line 29: Line 29:


If ''V'' is the mapping matrix of a temperament, then ''V<sub>W</sub>'' {{=}} ''VW'' is the mapping matrix in the weighted space, its rows being the weighted vals (''v''<sub>''w''</sub>)<sub>''i''</sub>.  
If ''V'' is the mapping matrix of a temperament, then ''V<sub>W</sub>'' {{=}} ''VW'' is the mapping matrix in the weighted space, its rows being the weighted vals (''v''<sub>''w''</sub>)<sub>''i''</sub>.  
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.


Our first complexity measure of a temperament is given by the ''L''<sup>2</sup> norm of the Tenney-weighted wedgie ''M''<sub>''W''</sub>, which can in turn be obtained from the Tenney-weighted mapping matrix ''V''<sub>''W''</sub>. This complexity can be easily computed either from the wedgie or from the mapping matrix, using the {{w|Gramian matrix|Gramian}}:  
Our first complexity measure of a temperament is given by the ''L''<sup>2</sup> norm of the Tenney-weighted wedgie ''M''<sub>''W''</sub>, which can in turn be obtained from the Tenney-weighted mapping matrix ''V''<sub>''W''</sub>. This complexity can be easily computed either from the wedgie or from the mapping matrix, using the {{w|Gramian matrix|Gramian}}:  
Line 50: Line 52:
where {{nowrap|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.  
where {{nowrap|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 {{nowrap|{{!}}''V''<sub>''W''</sub>''V''<sub>''W''</sub>{{t}}{{!}} {{=}} {{!}}''VW''<sup>2</sup>''V''{{t}}{{!}}}}. This may be related to the [[Tenney–Euclidean metrics|TE tuning projection matrix]] ''P''<sub>''W''</sub>, which is ''V''<sub>''W''</sub>{{t}}(''V''<sub>''W''</sub>''V''<sub>''W''</sub>{{t}}){{inv}}''V''<sub>''W''</sub>, and the corresponding matrix for unweighted monzos {{nowrap|''P'' {{=}} ''V''{{t}}(''VW''<sup>2</sup>''V''{{t}}){{inv}}''V''}}.
We may also note {{nowrap| det(''V''<sub>''W''</sub>''V''<sub>''W''</sub>{{t}}) {{=}} det(''VW''<sup>2</sup>''V''{{t}}) }}. This may be related to the [[Tenney–Euclidean metrics|TE tuning projection matrix]] ''P''<sub>''W''</sub>, which is ''V''<sub>''W''</sub>{{t}}(''V''<sub>''W''</sub>''V''<sub>''W''</sub>{{t}}){{inv}}''V''<sub>''W''</sub>, and the corresponding matrix for unweighted monzos {{nowrap|''P'' {{=}} ''V''{{t}}(''VW''<sup>2</sup>''V''{{t}}){{inv}}''V''}}.


Sintel has defined a complexity measure that serves as an intermediate step for his badness metric<ref name="sintel"/>, which we will get to later. To obtain this complexity, we normalize the Tenney-weighting matrix ''W'' to ''U'' such that {{nowrap| det(''U'') {{=}} 1 }}, and then take the ''L''<sup>2</sup> norm of ''M''<sub>''U''</sub>. It can be shown that
Sintel has defined a complexity measure that serves as an intermediate step for his badness metric<ref name="sintel"/>, which we will get to later. To obtain this complexity, we normalize the Tenney-weighting matrix ''W'' to ''U'' such that {{nowrap| det(''U'') {{=}} 1 }}, and then take the ''L''<sup>2</sup> norm of ''M''<sub>''U''</sub>. It can be shown that
Line 86: Line 88:
: '''Note''': 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 defines the TE error as the ratio ‖''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:  


$$ \Psi = \sqrt{\frac{r + 1}{n - r}} E $$
$$ \Psi = \sqrt{\frac{r + 1}{n - r}} E $$
Line 96: Line 98:
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 {{nowrap|(1 + ''ε'')''ψ''}} for any positive ''ε'' results in an infinite set of vals supporting the temperament.  
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 {{nowrap|(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, {{nowrap|''G'' {{=}} sin ''θ''}}, where ''θ'' is the angle between ''J''<sub>''W''</sub> and the val in question. Multiplying by 1200 to obtain a result in cents leads to 1200&nbsp;sin(''θ''), the TE error in cents.
''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.


== TE simple badness ==
== TE simple badness ==
Line 125: Line 129:


== TE logflat badness ==
== 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
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)} $$
$$ L = B \cdot C^{r/(n - r)} $$
Line 135: Line 139:
$$ L = \norm{ M_W \wedge J_W } \norm{M_W}^{r/(n - r)} $$
$$ L = \norm{ M_W \wedge J_W } \norm{M_W}^{r/(n - r)} $$


In Sintel's Dirichlet coefficients, or Dirichlet badness,  
In Sintel's derivation,  


$$ 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} $$
Line 142: Line 146:


== Examples ==
== 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.  
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.  


Here is a demonstration from [[7-limit]] [[magic]] and [[meantone]], comparing each of the definitions.  
{| class="wikitable center-all left-1"
 
|+ style="font-size: 105%;" | ''L''<sup>2</sup> norm
{| class="wikitable center-all"
|-
|+ style="font-size: 105%;" | 7-limit magic (left) vs. meantone (right) in TE temperament measures
! Temperament
! Complexity
! Error (¢)
! Simple badness
|-
| Septimal meantone
| 5.400
| 2.763
| 1.244×10<sup>−2</sup>
|-
| Septimal magic
| 7.195
| 2.149
| 1.288×10<sup>−2</sup>
|}
{| class="wikitable center-all left-1"
|+ style="font-size: 105%;" | Breed's RMS norm
|-
! Temperament
! Complexity
! Error (¢)
! Simple badness
|-
| Septimal meantone
| 1.350
| 1.382
| 1.554×10<sup>−3</sup>
|-
| Septimal magic
| 1.799
| 1.074
| 1.610×10<sup>−3</sup>
|}
{| class="wikitable center-all left-1"
|+ style="font-size: 105%;" | Smith's RMS norm
|-
! Temperament
! Complexity
! Error (¢)
! Simple badness
|-
| Septimal meantone
| 2.204
| 3.384
| 6.218×10<sup>−3</sup>
|-
|-
!
| Septimal magic
! TE complexity
| 2.937
! TE error (¢)
| 2.631
! TE simple badness
| 6.441×10<sup>−3</sup>
|}
{| class="wikitable center-all left-1"
|+ style="font-size: 105%;" | Sintel's norm
|-
|-
! {{W|Norm (mathematics) #Euclidean norm|Standard ''L''<sup>2</sup> norm}}
! Temperament
| 7.195 : 5.400
! Complexity
| 2.149 : 2.763
! Error (¢)
| 12.882×10<sup>−3</sup> : 12.435×10<sup>−3</sup>
! Simple badness
|-
|-
! Breed's RMS norm
| Septimal meantone
| 1.799 : 1.350
| 17.357
| 1.074 : 1.382
| 1.382
| 1.610×10<sup>−3</sup> : 1.554×10<sup>−3</sup>
| 1.999×10<sup>−2</sup>
|-
|-
! Smith's RMS norm
| Septimal magic
| 2.937 : 2.204
| 23.126
| 2.631 : 3.384
| 1.074
| 6.441×10<sup>−3</sup> : 6.218×10<sup>−3</sup>
| 2.070×10<sup>−2</sup>
|}
|}