Tenney–Euclidean tuning: Difference between revisions
→Examples: further cleanup |
Actual formulation of the problem. Display style |
||
Line 10: | Line 10: | ||
If we put the weighted Euclidean metric on tuning space, leading to TE tuning space in weighted coordinates, it is easy to find the nearest point in the subspace to the [[JIP]] {{val| 1 1 … 1 }}, and this closest point will define a [[tuning map]] which is called TE tuning, a tuning which has been extensively studied by [[Graham Breed]]. We may also keep unweighted coordinates and use the TE norm on tuning space; in these coordinates the JI point is {{val| 1 log<sub>2</sub>3 … log<sub>2</sub>''p'' }}. The two approaches are equivalent. | If we put the weighted Euclidean metric on tuning space, leading to TE tuning space in weighted coordinates, it is easy to find the nearest point in the subspace to the [[JIP]] {{val| 1 1 … 1 }}, and this closest point will define a [[tuning map]] which is called TE tuning, a tuning which has been extensively studied by [[Graham Breed]]. We may also keep unweighted coordinates and use the TE norm on tuning space; in these coordinates the JI point is {{val| 1 log<sub>2</sub>3 … log<sub>2</sub>''p'' }}. The two approaches are equivalent. | ||
To start with, suppose ''W'' is the weighting matrix. For the prime basis ''Q'' = {{val| 2 3 5 … ''p'' }}, | |||
$$ W = \operatorname {diag} (1/\log_2 (Q)) $$ | |||
If ''V'' is the mapping of the [[regular temperament|abstract temperament]] whose rows are (not necessarily independent) vals, then {{nowrap| ''V<sub>W</sub>'' {{=}} ''VW'' }} is the mapping in the weighted space. If ''J'' is the row vector of targeted JI intervals (i.e. the [[JIP]]), then {{nowrap| ''J<sub>W</sub>'' {{=}} ''JW'' }} is the JI intervals in the weighted space, in the case of Tenney-weighting it is {{val| 1 1 … 1 }}. Let us also denote the row vector of TE generators ''G''. TE tuning then defines a {{w|least squares}} problem of the following overdetermined linear | If ''V'' is the mapping of the [[regular temperament|abstract temperament]] whose rows are (not necessarily independent) vals, then {{nowrap| ''V<sub>W</sub>'' {{=}} ''VW'' }} is the mapping in the weighted space. If ''J'' is the row vector of targeted JI intervals (i.e. the [[JIP]]), then {{nowrap| ''J<sub>W</sub>'' {{=}} ''JW'' }} is the JI intervals in the weighted space, in the case of Tenney-weighting it is {{val| 1 1 … 1 }}. Let us also denote the row vector of TE generators ''G''. TE tuning then defines a {{w|least squares}} problem of the following overdetermined {{w|system of linear equations}}: ''GV''<sub>''W''</sub> = ''J''<sub>''W''</sub>, which simply says that the sum of (''v''<sub>''w''</sub>)<sub>''kl''</sub> steps of generator ''g''<sub>''k''</sub> for all ''k'''s should equal the ''l''-th targeted JI interval (''j''<sub>''w''</sub>)<sub>''l''</sub>. That is to say we want to | ||
$$ | |||
\begin{align} | |||
& \text{find} && G \\ | |||
& \text{that minimizes} && \lVert GV_W - J_W \rVert_2 | |||
\end{align} | |||
$$ | |||
There are a number of methods to solve least squares problems. One common way is to use the [[Moore–Penrose pseudoinverse]]. | There are a number of methods to solve least squares problems. One common way is to use the [[Moore–Penrose pseudoinverse]]. | ||
Line 25: | Line 28: | ||
The Moore–Penrose pseudoinverse, denoted ''A''{{+}}, is a generalization of the inverse matrix with which it shares a lot of properties. In this method, the (not necessarily independent) TE generator map ''G'', which correspond to the rows of ''V'' are given by | The Moore–Penrose pseudoinverse, denoted ''A''{{+}}, is a generalization of the inverse matrix with which it shares a lot of properties. In this method, the (not necessarily independent) TE generator map ''G'', which correspond to the rows of ''V'' are given by | ||
$$ G = J_W V_W^+ $$ | |||
Applying the val list to the generators, The TE tuning map is given by | Applying the val list to the generators, The TE tuning map is given by | ||
$$ T = GV = J_W V_W^+ V $$ | |||
We may also obtain the TE tuning from a [[projection matrix]]. {{nowrap| ''P''<sub>''W''</sub> {{=}} {{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> }} is the orthogonal projection matrix that maps onto the space spanned by the rows of ''V''<sub>''W''</sub>. This space corresponds to the temperament, and so does ''P''<sub>''W''</sub>. However, ''P''<sub>''W''</sub> is independent of how the temperament is defined; it does not depend on whether the vals are linearly independent, how many of them there are, or whether [[contorsion]] has been removed. The weighted tuning map ''T''<sub>''W''</sub> = ''TW'' giving the weighted tuning of each prime number is found by multiplying by the JIP: {{nowrap| ''T''<sub>''W''</sub> {{=}} ''J''<sub>''W''</sub>''P''<sub>''W''</sub> {{=}} ''J''<sub>''W''</sub>{{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> }}, which is the nearest point in the subspace corresponding to the temperament to ''J''<sub>''W''</sub>, so that {{nowrap| ''T'' {{=}} ''J''<sub>''W''</sub>''P''<sub>''W''</sub>''W''{{inv}} {{=}} ''J''<sub>''W''</sub>{{subsup|''V''|''W''|+}}''V'' }}. | We may also obtain the TE tuning from a [[projection matrix]]. {{nowrap| ''P''<sub>''W''</sub> {{=}} {{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> }} is the orthogonal projection matrix that maps onto the space spanned by the rows of ''V''<sub>''W''</sub>. This space corresponds to the temperament, and so does ''P''<sub>''W''</sub>. However, ''P''<sub>''W''</sub> is independent of how the temperament is defined; it does not depend on whether the vals are linearly independent, how many of them there are, or whether [[contorsion]] has been removed. The weighted tuning map ''T''<sub>''W''</sub> = ''TW'' giving the weighted tuning of each prime number is found by multiplying by the JIP: {{nowrap| ''T''<sub>''W''</sub> {{=}} ''J''<sub>''W''</sub>''P''<sub>''W''</sub> {{=}} ''J''<sub>''W''</sub>{{subsup|''V''|''W''|+}}''V''<sub>''W''</sub> }}, which is the nearest point in the subspace corresponding to the temperament to ''J''<sub>''W''</sub>, so that {{nowrap| ''T'' {{=}} ''J''<sub>''W''</sub>''P''<sub>''W''</sub>''W''{{inv}} {{=}} ''J''<sub>''W''</sub>{{subsup|''V''|''W''|+}}''V'' }}. | ||
Line 52: | Line 55: | ||
The weighting matrix ''W'' is given by | The weighting matrix ''W'' is given by | ||
$$ W = I $$ | |||
That simplifies the list of Frobenius generators, ''G'', to | That simplifies the list of Frobenius generators, ''G'', to | ||
$$ G = JV^+ $$ | |||
where ''J'' is the non-weighted JIP and ''V'' is the nonweighted mapping. | where ''J'' is the non-weighted JIP and ''V'' is the nonweighted mapping. | ||
Line 62: | Line 65: | ||
The Frobenius tuning map, ''T'', becomes | The Frobenius tuning map, ''T'', becomes | ||
$$ T = GV = JV^+V $$ | |||
However, the main value of unweighted vals is that the pseudoinverse and projection matrix have rational entries, so that the rows of the matrix are [[fractional monzos]]. The Frobenius projection matrix therefore defines a completely canonical object not depending on any arbitrary definition (e.g. how Hermite normal form or LLL reduction is specifically defined) which corresponds one-to-one with temperaments, and which does not depend on whether the monzos or vals from which it is computed are [[Mathematical theory of saturation|saturated]]. It may be found starting either from a set of vals or a set of commas, since if ''Q'' is the projection matrix found by treating monzos in the same way as vals, {{nowrap|''P'' {{=}} ''I'' − ''Q''}} is the same projection matrix as would be found if starting from a set of vals defining the same temperament. | However, the main value of unweighted vals is that the pseudoinverse and projection matrix have rational entries, so that the rows of the matrix are [[fractional monzos]]. The Frobenius projection matrix therefore defines a completely canonical object not depending on any arbitrary definition (e.g. how Hermite normal form or LLL reduction is specifically defined) which corresponds one-to-one with temperaments, and which does not depend on whether the monzos or vals from which it is computed are [[Mathematical theory of saturation|saturated]]. It may be found starting either from a set of vals or a set of commas, since if ''Q'' is the projection matrix found by treating monzos in the same way as vals, {{nowrap|''P'' {{=}} ''I'' − ''Q''}} is the same projection matrix as would be found if starting from a set of vals defining the same temperament. | ||
Spelling this out, if ''V'' is a matrix whose rows are vals, then {{nowrap|''P'' {{=}} ''V''{{+}}''V''}} is a {{w|Positive-definite matrix|positive-semidefinite}} {{w|symmetric matrix}} with rational matrix entries, which exactly specifies the regular temperament defined by the vals of ''V''. If ''M'' is a matrix with columns of monzos which spans the subspace of interval space containing the commas, then this same matrix ''P'' is given by {{nowrap|''I'' − ''MM''{{+}}}}. | Spelling this out, if ''V'' is a matrix whose rows are vals, then {{nowrap| ''P'' {{=}} ''V''{{+}}''V'' }} is a {{w|Positive-definite matrix|positive-semidefinite}} {{w|symmetric matrix}} with rational matrix entries, which exactly specifies the regular temperament defined by the vals of ''V''. If ''M'' is a matrix with columns of monzos which spans the subspace of interval space containing the commas, then this same matrix ''P'' is given by {{nowrap| ''I'' − ''MM''{{+}} }}. | ||
If the vals defining ''V'' are linearly independent, then {{nowrap|''P'' {{=}} ''V''{{t}}(''VV''{{t}}){{inv}}''V''}}. If the columns of ''M'' are independent, then we likewise have {{nowrap|''P'' {{=}} ''I'' − ''M''(''M''{{t}}''M''){{inv}}''M''{{t}}}}. | If the vals defining ''V'' are linearly independent, then {{nowrap| ''P'' {{=}} ''V''{{t}}(''VV''{{t}}){{inv}}''V'' }}. If the columns of ''M'' are independent, then we likewise have {{nowrap| ''P'' {{=}} ''I'' − ''M''(''M''{{t}}''M''){{inv}}''M''{{t}} }}. | ||
In D&D's guide, the systematic name for Frobenius tuning is ''minimax-E-copfr-S''. | In D&D's guide, the systematic name for Frobenius tuning is ''minimax-E-copfr-S''. | ||
Line 75: | Line 78: | ||
'''Benedetti/Wilson–Euclidean tuning''' ('''BE tuning''') adopts the Benedetti or Wilson weight in place of Tenney weight, based on the dual norm of [[Wilson height]]. For {{nowrap|''Q'' {{=}} {{val| 2 3 5 … }}}}, the weighting matrix has the form | '''Benedetti/Wilson–Euclidean tuning''' ('''BE tuning''') adopts the Benedetti or Wilson weight in place of Tenney weight, based on the dual norm of [[Wilson height]]. For {{nowrap|''Q'' {{=}} {{val| 2 3 5 … }}}}, the weighting matrix has the form | ||
$$ W = \operatorname{diag} (1/Q) $$ | |||
In D&D's guide, the systematic name for BE tuning is ''minimax-E-sopfr-S''. | In D&D's guide, the systematic name for BE tuning is ''minimax-E-sopfr-S''. | ||
Line 85: | Line 88: | ||
Consider [[pajara]], the 7-limit temperament tempering out 50/49 and 64/63. Its mapping ''V'' is | Consider [[pajara]], the 7-limit temperament tempering out 50/49 and 64/63. Its mapping ''V'' is | ||
$$ | |||
V = \begin{bmatrix} | V = \begin{bmatrix} | ||
2 & 0 & 11 & 12 \\ | 2 & 0 & 11 & 12 \\ | ||
0 & 1 & -2 & -2 | 0 & 1 & -2 & -2 | ||
\end{bmatrix} | \end{bmatrix} | ||
$$ | |||
This can be found by taking two equal temperaments supporting pajara (e.g. [[12edo]] and [[22edo]]), defining a 2×4 matrix formed by the vals and then canonicalizing it. In weighted coordinates this would be | This can be found by taking two equal temperaments supporting pajara (e.g. [[12edo]] and [[22edo]]), defining a 2×4 matrix formed by the vals and then canonicalizing it. In weighted coordinates this would be | ||
$$ | |||
V_W = | V_W = | ||
\begin{bmatrix} | \begin{bmatrix} | ||
Line 100: | Line 103: | ||
0.000000 & 0.630930 & -0.861353 & -0.712414 | 0.000000 & 0.630930 & -0.861353 & -0.712414 | ||
\end{bmatrix} | \end{bmatrix} | ||
$$ | |||
Then the pseudoinverse ''V''{{+}} is approximately | Then the pseudoinverse ''V''{{+}} is approximately | ||
$$ | |||
V_W^+ = | V_W^+ = | ||
\begin{bmatrix} | \begin{bmatrix} | ||
Line 112: | Line 115: | ||
0.085876 & -0.060988 | 0.085876 & -0.060988 | ||
\end{bmatrix} | \end{bmatrix} | ||
$$ | |||
so we obtain the generator tuning map {{nowrap|''G'' {{=}} ''J''<sub>''W''</sub>{{subsup|''V''|''W''|+}} }}: | so we obtain the generator tuning map {{nowrap|''G'' {{=}} ''J''<sub>''W''</sub>{{subsup|''V''|''W''|+}} }}: | ||
$$ G = \begin{bmatrix} 0.499049 & 1.586185 \end{bmatrix} $$ | |||
G = \begin{bmatrix} 0.499049 & 1.586185 \end{bmatrix} | |||
and the tuning map {{nowrap| ''T'' {{=}} ''GV'' }} which shows the value each prime harmonic is tuned to: | and the tuning map {{nowrap| ''T'' {{=}} ''GV'' }} which shows the value each prime harmonic is tuned to: | ||
$$ T = \begin{bmatrix} 0.998099 & 1.586185 & 2.317174 & 2.816223 \end{bmatrix} $$ | |||
T = \begin{bmatrix} 0.998099 & 1.586185 & 2.317174 & 2.816223 \end{bmatrix} | |||
The results are in octaves. Multiply them by 1200 to obtain the tuning in cents. | The results are in octaves. Multiply them by 1200 to obtain the tuning in cents. | ||
Line 133: | Line 132: | ||
If we use unweighted coordinates we get the Frobenius projection matrix instead, whose rows are [[fractional monzos]]. For instance, the unweighted pseudoinverse {{subsup|''V''|12|+}} of the 5-limit val ''V''<sub>12</sub> for 12 equal is the column matrix {{subsup|''V''|12|T}}/1289; that is, the 1×3 matrix with column {{monzo| 12/1289 19/1289 28/1289 }}. Then {{subsup|''V''|12|+}}''V''<sub>12</sub> is the 3×3 Frobenius projection matrix ''P''<sub>F</sub>: | If we use unweighted coordinates we get the Frobenius projection matrix instead, whose rows are [[fractional monzos]]. For instance, the unweighted pseudoinverse {{subsup|''V''|12|+}} of the 5-limit val ''V''<sub>12</sub> for 12 equal is the column matrix {{subsup|''V''|12|T}}/1289; that is, the 1×3 matrix with column {{monzo| 12/1289 19/1289 28/1289 }}. Then {{subsup|''V''|12|+}}''V''<sub>12</sub> is the 3×3 Frobenius projection matrix ''P''<sub>F</sub>: | ||
$$ | |||
P_\text{F} = \frac{1}{1289} | P_\text{F} = \frac{1}{1289} | ||
\begin{bmatrix} | \begin{bmatrix} | ||
Line 140: | Line 139: | ||
336 & 532 & 784 | 336 & 532 & 784 | ||
\end{bmatrix} | \end{bmatrix} | ||
$$ | |||
Multiplying {{val| 12 19 28 }} by ''P''<sub>F</sub> gives {{val| 12 19 28 }} again. Multiplying the monzos for 81/80, 128/125, 648/625 etc. gives the zero monzo, corresponding to a unison. Multiplying the val for 5-limit 19 equal, {{val| 19 30 44 }}, by ''P''<sub>F</sub> gives {{val| 24360 38570 56840 }}/1289, which is approximately the 19 equal val. Multiplying the 5-limit monzo for 3/2, which is {{monzo| -1 1 0 }}; times ''P''<sub>F</sub> gives the fractional monzo corresponding to (2<sup>84</sup> 3<sup>133</sup> 5<sup>196</sup>)<sup>1/1289</sup>, which equates to 698.121 cents, the tempering of 3/2 in Frobenius tuning for 5-limit 12et, the tuning with octave defined by the top row of ''P''<sub>F</sub>, which is to say by {{monzo| 1 0 0 }}''P''<sub>F</sub>, of 1196.778 cents. | Multiplying {{val| 12 19 28 }} by ''P''<sub>F</sub> gives {{val| 12 19 28 }} again. Multiplying the monzos for 81/80, 128/125, 648/625 etc. gives the zero monzo, corresponding to a unison. Multiplying the val for 5-limit 19 equal, {{val| 19 30 44 }}, by ''P''<sub>F</sub> gives {{val| 24360 38570 56840 }}/1289, which is approximately the 19 equal val. Multiplying the 5-limit monzo for 3/2, which is {{monzo| -1 1 0 }}; times ''P''<sub>F</sub> gives the fractional monzo corresponding to (2<sup>84</sup> 3<sup>133</sup> 5<sup>196</sup>)<sup>1/1289</sup>, which equates to 698.121 cents, the tempering of 3/2 in Frobenius tuning for 5-limit 12et, the tuning with octave defined by the top row of ''P''<sub>F</sub>, which is to say by {{monzo| 1 0 0 }}''P''<sub>F</sub>, of 1196.778 cents. | ||
Line 146: | Line 145: | ||
We can do the same thing with a matrix ''V'' for pajara; then ''P''<sub>F</sub>, the Frobenius projection matrix, is | We can do the same thing with a matrix ''V'' for pajara; then ''P''<sub>F</sub>, the Frobenius projection matrix, is | ||
$$ | |||
P_\text{F} = V^+V = \frac{1}{305} | P_\text{F} = V^+V = \frac{1}{305} | ||
\begin{bmatrix} | \begin{bmatrix} | ||
Line 154: | Line 153: | ||
32 & 14 & 148 & 64 | 32 & 14 & 148 & 64 | ||
\end{bmatrix} | \end{bmatrix} | ||
$$ | |||
This sends monzos for 50/49, 64/63 etc. to the unison monzo, and vals for 10et, 12et, and 22et to themselves. | This sends monzos for 50/49, 64/63 etc. to the unison monzo, and vals for 10et, 12et, and 22et to themselves. |