Constrained tuning: Difference between revisions

More clarifications; adopt "just tuning map"
Add KE back per discussion. Now weight and skewed are collectively denoted by X. p-norm -> q-norm since it's the dual norm (p is reserved for interval space norm)
Line 1: Line 1:
'''Constrained tunings''' are tuning [[optimization]] techniques using the constraint of some purely tuned intervals (i.e. [[eigenmonzo]]s, or unchanged-intervals). '''CTE tuning''' ('''constrained Tenney-Euclidean tuning''') is the most typical instance. It has a more sophisticated variant, '''CTWE tuning''' ('''constrained Tenney-Weil-Euclidean tuning'''). These two tunings will be the focus of this article. Otherwise normed tunings can be defined and computed analogously.  
'''Constrained tunings''' are tuning [[optimization]] techniques using the constraint of some purely tuned intervals (i.e. [[eigenmonzo]]s, or unchanged-intervals). '''CTE tuning''' ('''constrained Tenney-Euclidean tuning''') is the most typical instance. It has a more sophisticated variant, '''CTWE tuning''' ('''constrained Tenney-Weil-Euclidean tuning'''), a.k.a. '''KE tuning''' ('''Kees-Euclidean tuning'''). These two tunings will be the focus of this article. Otherwise normed tunings can be defined and computed analogously.  


All constrained tunings are standard temperament optimization problems. Specifically, as [[TE tuning]] can be viewed as a [[Wikipedia: Least squares|least squares problem]], CTE tuning can be viewed as an equality-constrained least squares problem.  
All constrained tunings are standard temperament optimization problems. Specifically, as [[TE tuning]] can be viewed as a [[Wikipedia: Least squares|least squares problem]], CTE tuning can be viewed as an equality-constrained least squares problem.  
Line 6: Line 6:


== Definition ==
== Definition ==
Given a temperament [[mapping]] V and the [[just tuning map]] J, we specify a weight and a skew, represented by transformation matrices W and X, respectively, and a ''p''-norm. Suppose the tuning is constrained by the eigenmonzo list M<sub>C</sub>. The goal is to find the generator list G by
Given a temperament [[mapping]] V and the [[just tuning map]] J, we specify a weight–skew transformation, represented by transformation matrix X, and a ''q''-norm. Suppose the tuning is constrained by the eigenmonzo list M<sub>C</sub>. The goal is to find the generator list G by


Minimize
Minimize


<math>\displaystyle \lVert GV_{WX} - J_{WX} \rVert_p </math>
<math>\displaystyle \lVert GV_X - J_X \rVert_q </math>


subject to
subject to
Line 16: Line 16:
<math>\displaystyle (GV - J)M_{\rm C} = O </math>
<math>\displaystyle (GV - J)M_{\rm C} = O </math>


where (·)<sub>WX</sub> denotes the weight-skew transformation, found by
where (·)<sub>X</sub> denotes the variable in the weight–skew transformed space, found by


<math>\displaystyle
<math>\displaystyle
\begin{align}
\begin{align}
V_{WX} &= VWX \\
V_X &= VX \\
J_{WX} &= JWX
J_X &= JX
\end{align}
\end{align}
</math>
</math>
Line 160: Line 160:
</pre>
</pre>


Analytical solutions exist for Euclidean (''L''<sup>2</sup>) tunings, see [[Constrained tuning/Analytical solution to constrained Euclidean tunings]].  
Analytical solutions exist for Euclidean (''L''<sup>2</sup>) tunings, see [[Constrained tuning/Analytical solution to constrained Euclidean tunings]]. It can also be solved in the [[wikipedia: Lagrange multiplier|method of Lagrange multiplier]]. The solution is given by


For CTE in particular, it can be solved in the [[wikipedia: Lagrange multiplier|method of Lagrange multiplier]]. The solution is given by
<math>\displaystyle
 
<math>
\begin{bmatrix}
\begin{bmatrix}
G^{\mathsf T}  \\
G^{\mathsf T}  \\
Line 171: Line 169:
=
=
\begin{bmatrix}
\begin{bmatrix}
V_{WX} V_{WX}^{\mathsf T} & VM \\
V_X V_X^{\mathsf T} & VM \\
(VM)^{\mathsf T} & O
(VM)^{\mathsf T} & O
\end{bmatrix}^{-1}
\end{bmatrix}^{-1}


\begin{bmatrix}
\begin{bmatrix}
V_{WX} J_{WX}^{\mathsf T}\\
V_X J_X^{\mathsf T}\\
(JM)^{\mathsf T}
(JM)^{\mathsf T}
\end{bmatrix}
\end{bmatrix}
Line 184: Line 182:


== CTE tuning vs CTWE tuning ==
== CTE tuning vs CTWE tuning ==
Consider the fact that TE tuning does not treat divisive ratios as more important than multiplicative ratios – 5/3 and 15/1 are taken as equally important, for example. To address that, a skew on the space may be introduced, resulting in [[TWE tuning]]. Constraining the equave to pure on top of TWE gives CTWE tuning.  
Consider the fact that TE tuning does not treat divisive ratios as more important than multiplicative ratios – 5/3 and 15/1 are taken as equally important, for example. To address that, a skew on the space may be introduced, resulting in [[TWE tuning]]. Constraining the equave to pure on top of TWE gives CTWE a.k.a. KE tuning.  


[[POTE tuning]] works as a quick approximation to CTWE. As POTE destretches the equave, it keeps the angle in the tuning space unchanged, and thus sacrifices multiplicative ratios for divisive ratios. On the contrary, CTE sticks to the original design book of TE as its result remains TE optimal.
[[POTE tuning]] works as a quick approximation to CTWE. As POTE destretches the equave, it keeps the angle in the tuning space unchanged, and thus sacrifices multiplicative ratios for divisive ratios. On the contrary, CTE sticks to the original design book of TE as its result remains TE optimal.
Line 201: Line 199:


== Special constraint ==
== Special constraint ==
The special eigenmonzo WXj, where j is the all-ones monzo, has the effect of removing the weight-skewed tuning bias. This eigenmonzo is actually proportional to the monzo of the extra dimension introduced by the skew. In other words, it forces the extra dimension to be pure, and therefore, the skew will have no effect with this constrained tuning.  
The special eigenmonzo Xj, where j is the all-ones monzo, has the effect of removing the weighted–skewed tuning bias. This eigenmonzo is actually proportional to the monzo of the extra dimension introduced by the skew. In other words, it forces the extra dimension to be pure, and therefore, the skew will have no effect with this constrained tuning.  


It can be regarded as a distinct optimum. In the case of Tenney weighting, it is the '''TOCTE tuning''' ('''Tenney ones constrained Tenney-Euclidean tuning''').  
It can be regarded as a distinct optimum. In the case of Tenney weighting, it is the '''TOCTE tuning''' ('''Tenney ones constrained Tenney-Euclidean tuning''').  
Line 210: Line 208:
The step size ''g'' can be found by
The step size ''g'' can be found by


<math>\displaystyle g = 1/\operatorname {mean} (V_{WX})</math>
<math>\displaystyle g = 1/\operatorname {mean} (V_X)</math>


The edo number ''n'' can be found by
The edo number ''n'' can be found by


<math>\displaystyle n = 1/g = \operatorname {mean} (V_{WX})</math>
<math>\displaystyle n = 1/g = \operatorname {mean} (V_X)</math>


Unlike TE or TOP, the optimal edo number space in TOC is linear with respect to V. That is, if V = ''α''V<sub>1</sub> + ''β''V<sub>2</sub>, then
Unlike TE or TOP, the optimal edo number space in TOC is linear with respect to V. That is, if V = ''α''V<sub>1</sub> + ''β''V<sub>2</sub>, then
Line 220: Line 218:
<math>\displaystyle
<math>\displaystyle
\begin{align}
\begin{align}
n &= \operatorname {mean} (VWX) \\
n &= \operatorname {mean} (VX) \\
&= \operatorname {mean} ((\alpha V_1 + \beta V_2)WX) \\
&= \operatorname {mean} ((\alpha V_1 + \beta V_2)X) \\
&= \operatorname {mean} (\alpha V_1 WX) + \operatorname {mean} (\beta V_2 WX) \\
&= \operatorname {mean} (\alpha V_1 X) + \operatorname {mean} (\beta V_2 X) \\
&= \alpha n_1 + \beta n_2
&= \alpha n_1 + \beta n_2
\end{align}
\end{align}
Line 231: Line 229:
For example, the relative errors of 12ettoc5 (12et in 5-limit TOC) is
For example, the relative errors of 12ettoc5 (12et in 5-limit TOC) is


<math>\displaystyle E_\text {r, 12} = \langle \begin{matrix} -1.55\% & -4.42\% & +10.08\% \end{matrix} ]</math>
<math>\displaystyle \mathcal{E}_\text {r}(12) = \langle \begin{matrix} -1.55\% & -4.42\% & +10.08\% \end{matrix} ]</math>


That of 19ettoc5 is
That of 19ettoc5 is


<math>\displaystyle E_\text {r, 19} = \langle \begin{matrix} +4.08\% & -4.97\% & -2.19\% \end{matrix} ]</math>
<math>\displaystyle \mathcal{E}_\text {r}(19) = \langle \begin{matrix} +4.08\% & -4.97\% & -2.19\% \end{matrix} ]</math>


As 31 = 12 + 19, the relative errors of 31ettoc5 is
As 31 = 12 + 19, the relative errors of 31ettoc5 is
Line 241: Line 239:
<math>\displaystyle
<math>\displaystyle
\begin{align}
\begin{align}
E_\text {r, 31} &= E_\text {r, 12} + E_\text {r, 19} \\
\mathcal{E}_\text {r}(31) &= \mathcal{E}_\text {r}(12) + \mathcal{E}_\text {r}(19) \\
&= \langle \begin{matrix} +2.52\% & -9.38\% & +7.88\% \end{matrix} ]
&= \langle \begin{matrix} +2.52\% & -9.38\% & +7.88\% \end{matrix} ]
\end{align}
\end{align}