Constrained tuning: Difference between revisions

Simple fast closed-form algorithm: cleanup: unify variable names with the other sections. Fix markup. Also important clarifications on the dimensionalities of these variables.
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:
The problem is feasible if
The problem is feasible if
# rank(''M'') ≤ rank(''V''), and
# rank(''M'') ≤ rank(''V''), and
# The subgroups of ''M'' and N (''V'') are {{w|linear independence|linearly independent}}.
# The subgroups of ''M'' and nullspace(''V'') are {{w|linear independence|linearly independent}}.


== Computation ==
== Computation ==
Line 200: Line 200:
Notice we introduced the vector of lagrange multipliers ''Λ'', with length equal to the number of constraints. The lagrange multipliers have no concrete meaning for the resulting tuning, so they can be discarded.
Notice we introduced the vector of lagrange multipliers ''Λ'', with length equal to the number of constraints. The lagrange multipliers have no concrete meaning for the resulting tuning, so they can be discarded.


=== Simple fast closed-form algorithm ===
==== Simple fast closed-form algorithm ====
Another way to compute the CTE and CWE tunings, and the CTWE tuning in general, is to use the pseudoinverse.
Another way to compute the CTE and CWE tunings, and the CTWE tuning in general, is to use the pseudoinverse.


Line 285: Line 285:
}}
}}


=== 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 306: Line 306:
     J = 1200*np.log2(limit)
     J = 1200*np.log2(limit)


     # Main calculation: get the generator map g such that g@M@W ≈ J@W. Use pinv
     # Main calculation: get the generator map g such that g @ M @ W ≈ J @ W. Use pinv
     G = (J@W) @ np.linalg.pinv(M@W)
     G = (J @ W) @ np.linalg.pinv(M @ W)
     T = G @ M
     T = G @ M


Line 334: Line 334:
</pre>
</pre>


== CTE tuning vs POTE tuning vs CWE tuning vs CTWE tuning ==
== Comparison of tunings ==
{{Todo|inline=1| rework |comment=More properly and concisely summarize each side's POV. }}
 
=== 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 382: Line 384:
So, one simple solution is to interpolate between the two, giving the '''Tenney–Weil–Euclidean norm''': a weighted average of the TE and WE norms, with free weighting parameter k. This can be thought of as adjusting how much we care about the span: {{nowrap|k {{=}} 0}} is the TE norm, {{nowrap|k {{=}} 1}} is the WE norm, and in between we have intermediate norms. This also gives a '''Constrained Tenney–Weil–Euclidean''' or '''CTWE''' tuning as a result, which interpolates between CTE and CKE.
So, one simple solution is to interpolate between the two, giving the '''Tenney–Weil–Euclidean norm''': a weighted average of the TE and WE norms, with free weighting parameter k. This can be thought of as adjusting how much we care about the span: {{nowrap|k {{=}} 0}} is the TE norm, {{nowrap|k {{=}} 1}} is the WE norm, and in between we have intermediate norms. This also gives a '''Constrained Tenney–Weil–Euclidean''' or '''CTWE''' tuning as a result, which interpolates between CTE and CKE.


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