Optimization: Difference between revisions

More clarifications; adopt "just tuning map"
Now weight--skew transfomration is a thing and is denoted by X. p-norm -> q-norm since it's the dual norm (p is reserved for interval space norm)
Line 1: Line 1:
In [[regular temperament theory]], '''optimization''' is the theory and practice to find low-error tunings of regular temperaments.  
In [[regular temperament theory]], '''optimization''' is the theory and practice to find low-error tunings of regular temperaments.  


A regular temperament is defined by a [[mapping]] or a [[comma basis]]. It does not contain specific tuning information. To tune a temperament, one must define a [[tuning map]] by specifying the size of each [[Periods and generators|generator]]. The question is what it should be. In general, a temperament is an approximation to [[just intonation]] (JI). Any tuning will unavoidably introduce errors on some intervals for sure. The art of tempering seems to be about compromises – to find a sweet spot where the concerning intervals have the least overall error, so that the harmonic qualities of JI are best preserved.  
A regular temperament is defined by a [[mapping]] or a [[comma basis]]. It does not contain specific tuning information. To tune a temperament, one must define a [[tuning map]] by specifying the size of each [[Periods and generators|generator]]. The question is what it should be. In general, a temperament is an approximation to [[Just intonation|just intonation (JI)]]. Any tuning will unavoidably introduce errors on some intervals for sure. The art of tempering seems to be about compromises – to find a sweet spot where the concerning intervals have the least overall error, so that the harmonic qualities of JI are best preserved.  


== Taxonomy ==
== Taxonomy ==
Line 13: Line 13:
[[File:Vector norms.svg|thumb|Comparison of norms on the space]]
[[File:Vector norms.svg|thumb|Comparison of norms on the space]]


In order to perform prime-based optimization, all intervals must be rated by complexity, so it is critical to employ a [[Wikipedia:Norm (mathematics)|norm]] on the space. There are a few aspects to consider. The weight, which determines how important each formal prime is, and the skew, which determines how divisive ratios are more important than multiplicative ratios. They can be interpreted as transformations of either the norm or the coordinates of the space. The two views are equivalent. In addition, there is the order (or sometimes just dubbed the norm), which determines how the space can be traversed.  
In order to perform prime-based optimization, all intervals must be rated by complexity, so it is critical to employ a [[Wikipedia:Norm (mathematics)|norm]]. Technically, this is to [[wikipedia: Embedding|embed]] the [[just intonation subgroup|just intonation group]] into a [[wikipedia: Normed vector space|normed vector space]]. There are a few aspects to consider. The weight, which determines how important each formal prime is, and the skew, which determines how divisive ratios are more important than multiplicative ratios. They can be interpreted as transformations of either the norm or the coordinates of the space. The two views are equivalent. In addition, there is the order (or sometimes just dubbed the norm), which determines how the space can be traversed.  


=== Weight ===
=== Weight ===
Line 27: Line 27:
Notably, adopting the standard [[Weil height]] will skew the space to 60 degrees.  
Notably, adopting the standard [[Weil height]] will skew the space to 60 degrees.  


Both the weight and the skew are represented by matrices that can be applied to the mapping. In a more general sense, the distinction may not matter, and they may be collectively called by either part.  
Both the weight and the skew are represented by matrices that can be applied to the mapping. In a more general sense, the distinction may not matter, and they may be collectively called weight–skew transformation.  


=== Order ===
=== Order ===
Line 34: Line 34:
The Euclidean norm aka ''L''<sup>2</sup> norm resembles real-world distances.  
The Euclidean norm aka ''L''<sup>2</sup> norm resembles real-world distances.  


The Manhattan norm or taxicab norm aka ''L''<sup>1</sup> norm resembles movement of taxicabs in Manhattan – it can only traverse horizontally or vertically. A diagonal movement counts as two steps.  
The Manhattan norm or taxicab norm a.k.a. ''L''<sup>1</sup> norm resembles movement of taxicabs in Manhattan – it can only traverse horizontally or vertically. A diagonal movement counts as two steps.  


The Chebyshevian norm aka ''L''<sup>inf</sup> norm is the opposite of the Manhattan norm – it is the maximum number of steps along any axis, so a diagonal movement is the same as a horizontal or vertical one.  
The Chebyshevian norm a.k.a. ''L''<sup>inf</sup> norm is the opposite of the Manhattan norm – it is the maximum number of steps along any axis, so a diagonal movement is the same as a horizontal or vertical one.  


Note that the dual norm of ''L''<sup>1</sup> is ''L''<sup>inf</sup>, and vice versa. Thus, the Manhattan norm corresponds to the ''L''<sup>inf</sup> tuning space, and the Chebyshevian norm corresponds to the ''L''<sup>1</sup> tuning space. The dual of ''L''<sup>2</sup> norm is itself, so the Euclidean norm corresponds to Euclidean tuning as one may expect.
Note that the dual norm of ''L''<sup>1</sup> is ''L''<sup>inf</sup>, and vice versa. Thus, the Manhattan norm corresponds to the ''L''<sup>inf</sup> tuning space, and the Chebyshevian norm corresponds to the ''L''<sup>1</sup> tuning space. The dual of ''L''<sup>2</sup> norm is itself, so the Euclidean norm corresponds to Euclidean tuning as one may expect.
Line 50: Line 50:


== General formulation ==
== General formulation ==
In general, the temperament optimization problem (except for the destretch) can be defined as follows. 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. An optional eigenmonzo list M<sub>C</sub> can be added. The goal is to find the generator list G by
In general, the temperament optimization problem (except for the destretch) can be defined as follows. 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. An optional eigenmonzo list M<sub>C</sub> can be added. 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 60: Line 60:
<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>


== Common tunings ==
== Common tunings ==
A good number of common tuning schemes have been given names. The following table shows some of them by weight-skew against the order.  
A good number of common tuning schemes have been given names. The following table shows some of them by weight–skew against the order.  


{| class="wikitable"
{| class="wikitable"
|+Table of common tunings
|+Table of common tunings
|-
|-
! Weight-skew\Order !! Chebyshevian<br>(''L''<sup>1</sup> tuning) !! Euclidean<br>(''L''<sup>2</sup> tuning) !! Manhattan<br>(''L''<sup>infinity</sup> tuning)
! Weight–Skew\Order !! Chebyshevian<br>(''L''<sup>1</sup> tuning) !! Euclidean<br>(''L''<sup>2</sup> tuning) !! Manhattan<br>(''L''<sup>infinity</sup> tuning)
|-
|-
| Tenney<br>Tenney-Weil || TC tuning<br><br> || [[TE tuning]]<br>[[TWE tuning]] || [[TOP tuning]]<br><br>
| Tenney<br>Tenney-Weil || TC tuning<br><br> || [[TE tuning]]<br>[[TWE tuning]] || [[TOP tuning]]<br><br>