Target tuning: Difference between revisions
m Clarify about the "tonality diamond"; re-link "eigenmonzo"; -typo |
+ link to my (half-usable) script |
||
| (7 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
A '''target tuning''' for a [[regular temperament|temperament]] is a tuning which has been optimized with respect to a set of target [[interval]]s. | |||
The generic formulation for any target tuning is as follows. | |||
We may find the least squares tuning in various ways, one of which is to start from a matrix R whose rows are the monzos of the target set, and a matrix U whose rows are [[val]]s spanning the temperament. From U we form the matrix V by taking the [[ | $$ | ||
\begin{align} | |||
& \text{find} && G \\ | |||
& \text{that minimizes} && \lVert (GV - J) M_T \rVert_q \\ | |||
& \text{subject to} && (GV - J)M_C = O | |||
\end{align} | |||
$$ | |||
for a [[generator tuning map]] ''G'', a [[temperament mapping matrix]] ''V'', a [[just tuning map]] ''J'', a target [[monzo]] list ''M''<sub>''T''</sub>, a ''q''-norm, and optionally a constrained monzo list ''M''<sub>''C''</sub>. | |||
This is very similar to all-interval tunings shown in [[Optimization #General formulation]], except for the introduction of a target interval set represented by the monzo list ''M''<sub>''T''</sub>, which transforms the [[error map]] on the subgroup basis elements (''GV'' - ''J'') to an error map on the target intervals. A more detailed explanation on this topic is provided by [[Dave Keenan & Douglas Blumeyer's guide to RTT/Tuning fundamentals]]. | |||
Usually, the set of intervals is derived from a finite set of [[pitch class|octave-equivalence classes]], and octaves are taken to be pure 2's. Below we will make all of these assumptions, and will discuss the most important target tunings, minimax, least squares, and minimean. | |||
== Least squares tuning == | |||
By assumption we have a finite set of rational intervals defining [[interval class]]es, which we may take to be [[octave reduction|octave-reduced]] intervals, expressed logarithmically in terms of [[binary logarithm]]. The least squares tuning, ''T'', is the tuning for a particular regular temperament which minimizes the sum of the squares of the errors, ∑<sub>''i''</sub> ({{nowrap|''T''(''q<sub>i</sub>'') − log<sub>2</sub>(''q<sub>i</sub>''))<sup>2</sup>}}, where ''q<sub>i</sub>'' are the rational intervals of the target set. | |||
Most commonly, the target set is a [[tonality diamond]], since these are the intervals in a [[harmonic series]] up to some odd integer ''d'', and hence may be considered the [[consonance]]s of the ''d''-odd-limit. By convention, intervals of the tonality diamond are reduced to lowest terms and have duplicates removed. If duplicates are not removed, the results are usually different. | |||
We may find the least squares tuning in various ways, one of which is to start from a matrix '''R''' whose rows are the monzos of the target set, and a matrix '''U''' whose rows are [[val]]s spanning the temperament. From '''U''' we form the matrix '''V''' by taking the [[normal forms|normal val list]] for '''U''' and removing the first ("period") row. A list of [[eigenmonzo|eigenmonzos (unchanged-intervals)]] {{nowrap|'''E'''' {{=}} '''VR'''<sup>T</sup>'''R'''}}, where the <sup>T</sup> denotes the matrix transpose, can now be obtained by matrix multiplication, and to this we add a row for the monzo of 2. The [[projection matrix]] for the least squares tuning is then the square matrix with fractional monzo rows, the rows of '''E''', including 2, as eigenmonzos, that is left eigenvectors with eigenvalue one, and any basis for the commas of the temperament as left eigenvectors with eigenvalues zero. | |||
== Minimax tuning == | == Minimax tuning == | ||
Starting with the same assumptions as with least squares tuning, minimax tuning works similarly, except instead of minimizing the squares of the errors, we minimize max<sub>''i''</sub> | Starting with the same assumptions as with least squares tuning, minimax tuning works similarly, except instead of minimizing the squares of the errors, we minimize {{nowrap|max<sub>''i''</sub>{{!}}''T''(''q<sub>i</sub>'') − log<sub>2</sub>(''q<sub>i</sub>''){{!}} }}, the maximum error over all the target intervals. This can be solved by setting the minimization up as a {{w|linear programming}} problem, but another approach leads as before to a projection matrix with fractional monzo rows. | ||
For a rank-''r'' temperament, we can form a list of candidate sets of eigenmonzos by taking {{nowrap|''r'' − 1}} elements from the list of target intervals, and adding 2 to the set, leading to an ''r''-element set. To avoid duplications and sets with rank less than ''r'', we can take the [[normal forms|normal interval list]] defined by each of these ''r''-element sets, discarding any with less than ''r'' elements. This means we are compiling a list of rank-''r'' [[just intonation subgroup]]s, which are [[eigenmonzo subgroup]]s for the corresponding tuning. For each of these these subgroups, we may find a corresponding projection matrix as the matrix with the ''r'' generators of the subgroup as eigenmonzos and a basis for the commas as left eigenvectors with eigenvalue zero. These projection matrices define tunings, and the tuning, if unique, with the least maximum error is the minimax tuning. However, this tuning may not be unique, in which case we may break the tie by discarding the bounding intervals and repeat minimax on the rest of the intervals until a unique tuning is found. This is the same tuning achieved by minimizing the ''p''-norm error as ''p'' approaches infinity<ref group="note">See [[Dave Keenan & Douglas Blumeyer's guide to RTT/Tuning computation #Tie breaking: power limit method]] for details.</ref><ref group="note">Historically, [[Gene Ward Smith]] proposed breaking the tie by falling back to least squares tuning in the set of minimax tunings.</ref>. | |||
== Minimean tuning == | |||
{{Todo|inline=1|complete section}} | |||
== Example == | == Example == | ||
Suppose our set of target intervals is the 5-odd-limit diamond {6/5, 5/4, 4/3, 3/2, 8/5, 5/3}. The corresponding matrix is | Suppose our set of target intervals is the 5-odd-limit diamond {{nowrap|{6/5, 5/4, 4/3, 3/2, 8/5, 5/3}<nowiki />}}. The corresponding matrix is | ||
R = [{{monzo| 1 1 -1 }}, {{monzo| -2 0 1 }}, {{monzo| 2 -1 0 }}, {{monzo| -1 1 0 }}, {{monzo| 3 0 -1 }}, {{monzo| 0 -1 1 }}] | '''R''' = [{{monzo| 1 1 -1 }}, {{monzo| -2 0 1 }}, {{monzo| 2 -1 0 }}, {{monzo| -1 1 0 }}, {{monzo| 3 0 -1 }}, {{monzo| 0 -1 1 }}] | ||
Then R<sup>T</sup>R = [[19 -2 -6], [-2 4 -2], [-6 -2 4]], a positive-definite symmetric matrix. If U = [{{val| 1 0 -4 }}, {{val| 0 1 4 }}], we may remove the top row and obtain V = [{{val| 0 1 4 }}]; then VR<sup>T</sup>R | Then {{nowrap|'''R'''<sup>T</sup>'''R''' {{=}} [[19 -2 -6], [-2 4 -2], [-6 -2 4]]}}, a positive-definite symmetric matrix. If {{nowrap|'''U''' {{=}} [{{val| 1 0 -4 }}, {{val| 0 1 4 }}]<nowiki />}}, we may remove the top row and obtain {{nowrap|'''V''' {{=}} [{{val| 0 1 4 }}]<nowiki />}}; then {{nowrap|'''VR'''<sup>T</sup>'''R''' {{=}} [{{monzo| -26 -4 14 }}]<nowiki />}}; using this along with {{monzo| 1 0 0 }} as eigenmonzos, and using {{monzo| -4 4 -1 }} as a commatic eigenvector with eigenvalue zero, we obtain | ||
[{{monzo| 1 0 0 }}, {{monzo| 14/13 -1/13 7/26 }}, {{monzo| 4/13 -4/13 14/13 }}] | [{{monzo| 1 0 0 }}, {{monzo| 14/13 -1/13 7/26 }}, {{monzo| 4/13 -4/13 14/13 }}] | ||
| Line 22: | Line 43: | ||
which is the projection matrix for the Woolhouse 7/26-comma meantone, the 5-limit least squares tuning. | which is the projection matrix for the Woolhouse 7/26-comma meantone, the 5-limit least squares tuning. | ||
Starting from the same six intervals of the 5-odd-limit diamond and adding 2, we find after computing the normal interval lists that the three subgroups are [2, 3], [2, 5], and [2, 5/3]. Computing the projection matrix and from thence the tuning in each case, we find that the minimax tuning is [{{monzo| 1 0 0 }}, {{monzo| 1 0 1/4 }}, {{monzo| 0 0 1 }}], the projection matrix for 1/4-comma meantone. | Starting from the same six intervals of the 5-odd-limit diamond and adding 2, we find after computing the normal interval lists that the three subgroups are [2, 3], [2, 5], and [2, 5/3]. Computing the projection matrix and from thence the tuning in each case, we find that the minimax tuning is [{{monzo| 1 0 0 }}, {{monzo| 1 0 1/4 }}, {{monzo| 0 0 1 }}], the projection matrix for 1/4-comma meantone. | ||
== External links == | |||
* [https://github.com/FloraCanou/temperament_evaluator/wiki/Target-tuning Github | ''Target tuning'' · FloraCanou/temperament_evaluator Wiki] – includes Python script to compute target tunings. | |||
== Notes == | |||
<references group="note"/> | |||
[[Category:Math]] | [[Category:Math]] | ||
[[Category:Regular temperament tuning]] | [[Category:Regular temperament tuning]] | ||