Constrained tuning: Difference between revisions

Inthar (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
ArrowHead294 (talk | contribs)
No edit summary
Line 1: Line 1:
{{texmap}}
'''Constrained tunings''' are tuning [[optimization]] techniques using the constraint of some purely tuned intervals (i.e. [[eigenmonzo|unit eigenmonzos, or unchanged-intervals]]).
'''Constrained tunings''' are tuning [[optimization]] techniques using the constraint of some purely tuned intervals (i.e. [[eigenmonzo|unit eigenmonzos, or unchanged-intervals]]).


Line 7: Line 8:
All constrained tunings are standard temperament optimization problems. Specifically, as [[TE tuning]] can be viewed as a {{w|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 {{w|least squares|least squares problem}}, CTE tuning can be viewed as an equality-constrained least squares problem.  


The most common subject of constraint is the octave, which is assumed unless specified otherwise. For higher-rank temperaments, it may make sense to add multiple constraints, such as a pure-2.3 (pure-octave pure-fifth) constrained tuning. For a rank-''r'' temperament, specifying a rank-''m'' constraint list will yield ''r'' - ''m'' {{w|degrees of freedom}} to be optimized.  
The most common subject of constraint is the octave, which is assumed unless specified otherwise. For higher-rank temperaments, it may make sense to add multiple constraints, such as a pure-2.3 (pure-octave pure-fifth) constrained tuning. For a rank-''r'' temperament, specifying a rank-''m'' constraint list will yield {{nowrap|''r'' − ''m''}} {{w|degrees of freedom}} to be optimized.  


== Definition ==
== Definition ==
Line 14: Line 15:
Minimize
Minimize


<math>\displaystyle \lVert GV_X - J_X \rVert_q </math>
<math>\displaystyle \left\| GV_X - J_X \right\|_q </math>


subject to
subject to
Line 30: Line 31:


The problem is feasible if
The problem is feasible if
# rank (''M''<sub>''I''</sub>) ≤ rank (''V''), and
# rank(''M''<sub>''I''</sub>) ≤ rank(''V''), and
# The subgroups of ''M''<sub>''I''</sub> and N (''V'') are {{w|linear independence|linearly independent}}.
# The subgroups of ''M''<sub>''I''</sub> and N (''V'') are {{w|linear independence|linearly independent}}.


Line 192: Line 193:


=== Simple fast closed-form algorithm ===
=== Simple fast closed-form algorithm ===
A much simpler way to compute the CTE and CWE tunings, and the CTWE tuning in general, is to use the pseudoinverse. This doesn't require doing any intense nonlinear optimization.
A much simpler way to compute the CTE and CWE tunings, and the CTWE tuning in general, is to use the pseudoinverse. This doesn't require doing any intense nonlinear optimization.


Line 218: Line 218:


$$
$$
(hB + x)MW ≈ jW \\
\left(hB + x\right)MW ≈ jW \\
h = (j - xM)W \cdot (BMW)^\dagger
h = \left(j - xM\right)W \cdot \left(BMW\right)^\dagger
$$
$$


Line 281: Line 281:


=== Interpolating TE/CTE ===
=== Interpolating TE/CTE ===
We can also interpolate between the TE and CTE tunings, if we want. To do this, we modify the TE tuning so that the weighting of the 2's coefficient is very large. As the weighting goes to infinity, we get the CTE tuning. Thus, we can set it to some sufficiently large number, so that we get whatever numerical precision we want, and compute the result in closed-form using the pseudoinverse. Without comments, docstrings, etc, the calculation is only about five lines of python code:
We can also interpolate between the TE and CTE tunings, if we want. To do this, we modify the TE tuning so that the weighting of the 2's coefficient is very large. As the weighting goes to infinity, we get the CTE tuning. Thus, we can set it to some sufficiently large number, so that we get whatever numerical precision we want, and compute the result in closed-form using the pseudoinverse. Without comments, docstrings, etc, the calculation is only about five lines of python code:


Line 331: Line 330:


== CTE tuning vs POTE tuning vs CWE tuning vs CTWE tuning ==
== CTE tuning vs POTE tuning vs CWE tuning vs CTWE tuning ==
=== Criticism of CTE ===
=== Criticism of CTE ===
People have long noted, since the early days of the tuning list, that the CTE tuning, despite having very nice qualities on paper, can give surprisingly strange results.{{citation needed}} One good example is blackwood, where the 4:5:6 chord is tuned to 0-386-720 cents, so that the error is not even close to evenly divided between the 5/4, 6/5, and 3/2. The reasons for this are subtle.
People have long noted, since the early days of the tuning list, that the CTE tuning, despite having very nice qualities on paper, can give surprisingly strange results.{{citation needed}} One good example is blackwood, where the 4:5:6 chord is tuned to 0-386-720 cents, so that the error is not even close to evenly divided between the 5/4, 6/5, and 3/2. The reasons for this are subtle.
Line 362: Line 360:


=== Using the Weil norm or Kees expressibility ===
=== Using the Weil norm or Kees expressibility ===
Another way to solve this problem is to actually go back to the original objection that we perhaps don't care about 13/1 as much as 13/8 - or at least, that we don't care about it that much if we have to assign it to the entire equivalence class. So, we can take this objection seriously and use a different norm to begin with.
Another way to solve this problem is to actually go back to the original objection that we perhaps don't care about 13/1 as much as 13/8 - or at least, that we don't care about it that much if we have to assign it to the entire equivalence class. So, we can take this objection seriously and use a different norm to begin with.


Line 374: Line 371:


=== CTWE tuning ===
=== CTWE tuning ===
As mentioned above, if we constrain the equave to be pure, and look for the tuning map that is closest to the JIP using the WE norm, we get the CWE tuning, a.k.a. KE tuning.
As mentioned above, if we constrain the equave to be pure, and look for the tuning map that is closest to the JIP using the WE norm, we get the CWE tuning, a.k.a. KE tuning.


Line 382: Line 378:


=== Comparison ===
=== Comparison ===
These tunings can be very different from each other.
These tunings can be very different from each other.


==== Meantone ====
==== Meantone ====
Take 7-limit meantone as an example. The POTE [[tuning map]] is a little bit flatter than [[quarter-comma meantone]], with all the primes tuned flat:  
Take 7-limit meantone as an example. The POTE [[tuning map]] is a little bit flatter than [[quarter-comma meantone]], with all the primes tuned flat:  


<math>\langle \begin{matrix} 1200.000 & 1896.495 & 2785.980 & 3364.949 \end{matrix} ]</math>
<math>\val{1200.000 & 1896.495 & 2785.980 & 3364.949}</math>


The CWE tuning map is a little bit sharper than quarter-comma meantone, with 5 tuned sharp and 3 and 7 flat:  
The CWE tuning map is a little bit sharper than quarter-comma meantone, with 5 tuned sharp and 3 and 7 flat:  


<math>\langle \begin{matrix} 1200.000 & 1896.656 & 2786.625 & 3366.562 \end{matrix} ]</math>
<math>\val{1200.000 & 1896.656 & 2786.625 & 3366.562}</math>


The CTE tuning map is even sharper, with 3 tuned flat and 5 and 7 sharp:  
The CTE tuning map is even sharper, with 3 tuned flat and 5 and 7 sharp:  


<math>\langle \begin{matrix} 1200.000 & 1896.952 & 2787.809 & 3369.521 \end{matrix} ]</math>
<math>\val{1200.000 & 1896.952 & 2787.809 & 3369.521}</math>


==== Blackwood ====
==== Blackwood ====
There is a particularly large difference when looking at less-accurate tunings. Perhaps the clearest way to see the difference is to look at tunings where one prime has total freedom as a generator. In those situations, the free prime is tuned pure. Blackwood is a good example:
There is a particularly large difference when looking at less-accurate tunings. Perhaps the clearest way to see the difference is to look at tunings where one prime has total freedom as a generator. In those situations, the free prime is tuned pure. Blackwood is a good example:


Line 409: Line 402:
The CWE gives similar results, although tunes it a few cents flatter:
The CWE gives similar results, although tunes it a few cents flatter:


<math>\langle \begin{matrix} 1200.000 & 1920.000 & 2795.126 \end{matrix} ]</math>
<math>\val{1200.000 & 1920.000 & 2795.126}</math>


The CTE tuning, on the other hand, tunes prime 5 pure:
The CTE tuning, on the other hand, tunes prime 5 pure:


<math>\langle \begin{matrix} 1200.000 & 1920.000 & 2786.314 \end{matrix} ]</math>
<math>\val{1200.000 & 1920.000 & 2786.314}</math>


Since prime 5 is not involved in the comma to begin with, it is understandable that it is tuned pure as in 5-limit JI. This, as mentioned above, leads to very lopsided behavior for compact chords like 1-5/4-3/2. Note that the tunings for KE and POTE distribute the error between 5/4 and 6/5 relatively evenly; both are very close to the delta-rational 0-397-720. The CTE tuning, on the other hand, has that chord tuned to 0-386-720, so that all of the error is on the 6/5 at about 18 cents sharp.
Since prime 5 is not involved in the comma to begin with, it is understandable that it is tuned pure as in 5-limit JI. This, as mentioned above, leads to very lopsided behavior for compact chords like 1-5/4-3/2. Note that the tunings for KE and POTE distribute the error between 5/4 and 6/5 relatively evenly; both are very close to the delta-rational 0-397-720. The CTE tuning, on the other hand, has that chord tuned to 0-386-720, so that all of the error is on the 6/5 at about 18 cents sharp.
Line 427: Line 420:
The step size ''g'' can be found by
The step size ''g'' can be found by


<math>\displaystyle g = 1/\operatorname {mean} (V_X)</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_X)</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 448: Line 441:
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 \mathcal{E}_\text {r}(12) = \langle \begin{matrix} -1.55\% & -4.42\% & +10.08\% \end{matrix} ]</math>
<math>\displaystyle \mathcal{E}_\text {r}(12) = \val{-1.55\% & -4.42\% & +10.08\% }</math>


That of 19ettoc5 is
That of 19ettoc5 is


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


As 31 = 12 + 19, the relative errors of 31ettoc5 is
As 31 = 12 + 19, the relative errors of 31ettoc5 is
Line 459: Line 452:
\begin{align}
\begin{align}
\mathcal{E}_\text {r}(31) &= \mathcal{E}_\text {r}(12) + \mathcal{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} ]
&= \val{+2.52\% & -9.38\% & +7.88\% }
\end{align}
\end{align}
</math>
</math>
Line 465: Line 458:
== Systematic name ==
== Systematic name ==
In [[D&D's guide|D&D's guide to RTT]], the [[Dave Keenan & Douglas Blumeyer's guide to RTT: alternative complexities #Naming|systematic name]] for the CTE tuning scheme is ''[[Dave Keenan %26 Douglas Blumeyer%27s guide to RTT: all-interval tuning schemes #Held-octave minimax-.28E.29S|held-octave minimax-ES]]'', and the systematic name for the CTWE tuning scheme is ''[[Dave Keenan %26 Douglas Blumeyer%27s guide to RTT: tuning fundamentals #Held-intervals|held-octave]] [[Dave Keenan %26 Douglas Blumeyer%27s guide to RTT: alternative complexities #Tunings used in 7|minimax-E-lils-S]]''.
In [[D&D's guide|D&D's guide to RTT]], the [[Dave Keenan & Douglas Blumeyer's guide to RTT: alternative complexities #Naming|systematic name]] for the CTE tuning scheme is ''[[Dave Keenan %26 Douglas Blumeyer%27s guide to RTT: all-interval tuning schemes #Held-octave minimax-.28E.29S|held-octave minimax-ES]]'', and the systematic name for the CTWE tuning scheme is ''[[Dave Keenan %26 Douglas Blumeyer%27s guide to RTT: tuning fundamentals #Held-intervals|held-octave]] [[Dave Keenan %26 Douglas Blumeyer%27s guide to RTT: alternative complexities #Tunings used in 7|minimax-E-lils-S]]''.
== Open problems ==
== Open problems ==
* Why are CWE and POTE tunings so close for many temperaments?
* Why are CWE and POTE tunings so close for many temperaments?
[[Category:Terms]]
[[Category:Terms]]
[[Category:Math]]
[[Category:Math]]
[[Category:Regular temperament tuning]]
[[Category:Regular temperament tuning]]
[[Category:Pages with open problems]]
[[Category:Pages with open problems]]