Optimization: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
And EOP
More clarifications; adopt "just tuning map"
Line 5: Line 5:
== Taxonomy ==
== Taxonomy ==
Roughly speaking, there are two types of tunings with diverging philosophies: ''prime-based tunings'' and ''target tunings''.  
Roughly speaking, there are two types of tunings with diverging philosophies: ''prime-based tunings'' and ''target tunings''.  
* A prime-based tuning is optimized for the [[formal prime]]s, but they are representative for the set of all intervals. There are two equivalent perspectives. First, in the [[Vals and tuning space|tuning space]], it minimizes the errors of formal primes. Second, in the [[Monzos and interval space|interval space]], it rates all intervals through a norm, which serves as a complexity measure, and it minimizes the maximum [[damage]] (i.e. error divided by complexity) for all intervals.  
* A prime-based tuning is optimized for the [[formal prime]]s, but they are representative for the set of all intervals. There are two equivalent perspectives. First, in the [[Vals and tuning space|tuning space]], it minimizes the errors of formal primes. Second, in the [[Monzos and interval space|interval space]], it rates the [[complexity]] of all intervals through a norm, and it minimizes the maximum [[damage]] (i.e. error divided by complexity) for all intervals.  
* A target tuning is optimized for a particular set of intervals and considers the rest irrelevant. However, the interval does not get infinite complexity even if it is disregarded due to the normed nature of the interval space, so these tunings also correspond to all-interval damage minimizations of some sorts.  
* A target tuning is optimized for a particular set of intervals and considers the rest irrelevant. However, the interval does not get infinite complexity even if it is disregarded due to the normed nature of the interval space, so these tunings also correspond to all-interval damage minimizations of some sorts.  


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 space or the norm. 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]] 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.  


=== Weight ===
=== Weight ===
Line 30: Line 30:


=== Order ===
=== Order ===
The order of the norm determines what is a unit step in the space.  
The order of the norm determines what is a unit step in the interval space.  


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.  
Line 36: Line 36:
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 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 Chebyshevian norm aka ''L''<sup>infinity</sup> norm is the opposite of the Manhattan norm – it is the maximum number of steps in any direction, so a diagonal movement is the same as a horizontal or vertical one.  
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.  


It should be noted that the dual norm of ''L''<sup>1</sup> is ''L''<sup>infinity</sup>, and vice versa. Thus, the Manhattan norm corresponds to the ''L''<sup>infinity</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.


== Enforcement ==
== Enforcement ==
Line 44: Line 44:


=== Destretch ===
=== Destretch ===
Destretch is a postprocess to enforce a pure interval. The most common destretched tuning is [[POTE tuning]], which works as a quick approximation to the more sophisticated CTWE tuning.  
Destretch is a postprocess to enforce a pure interval. The result is no longer optimal measured by the original norm, but it often works as a quick approximation to more sophisticated tunings. The most common destretched tuning is [[POTE tuning]], which approximates [[CTWE tuning]].  


=== Constraint ===
=== Constraint ===
Constraint is a logical method to enforce one or more pure intervals. A pure interval added this way is known as an [[Eigenmonzo|eigenmonzo a.k.a. unchanged-interval]]. It defines a feasible region for optimization, and the result measured by the original norm remains optimal.
Constraint is a logical method to enforce one or more pure intervals. A pure interval added this way is known as an [[Eigenmonzo|eigenmonzo a.k.a. unchanged-interval]]. It defines a feasible region for optimization, and the result measured by the original norm is feasibly optimal.


== 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 intonation point]] (JIP) 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 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


Minimize
Minimize
Line 70: Line 70:


== Common tunings ==
== Common tunings ==
A good number of tunings have been given names. The following table shows some common tuning schemes 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"
Line 92: Line 92:
* [http://x31eq.com/temper/primerr.pdf|''Prime Based Error and Complexity Measures''] ("primerr.pdf") by [[Graham Breed]]
* [http://x31eq.com/temper/primerr.pdf|''Prime Based Error and Complexity Measures''] ("primerr.pdf") by [[Graham Breed]]


[[Category:Math]]
[[Category:Regular temperament tuning]]
[[Category:Regular temperament tuning]]

Revision as of 05:29, 8 June 2023

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 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.

Taxonomy

Roughly speaking, there are two types of tunings with diverging philosophies: prime-based tunings and target tunings.

  • A prime-based tuning is optimized for the formal primes, but they are representative for the set of all intervals. There are two equivalent perspectives. First, in the tuning space, it minimizes the errors of formal primes. Second, in the interval space, it rates the complexity of all intervals through a norm, and it minimizes the maximum damage (i.e. error divided by complexity) for all intervals.
  • A target tuning is optimized for a particular set of intervals and considers the rest irrelevant. However, the interval does not get infinite complexity even if it is disregarded due to the normed nature of the interval space, so these tunings also correspond to all-interval damage minimizations of some sorts.

This article focuses on prime-based tunings. See the dedicated page (→ Target tunings) for target tunings.

Norm

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 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.

Weight

The weight, represented by a diagonal transformation matrix, determines the importance of each formal prime. Since the tuning space and the interval space are dual to each other, rating of importance in the tuning space is equivalent to rating of complexity in the interval space. The Tenney weight is the most common weight:

[math]\displaystyle{ \displaystyle W = \operatorname {diag} (1/\log_2 (Q)) }[/math]

which indicates that the prime harmonic q in Q = 2 3 5 …] has the importance of 1/log2(q). Its dual states that q has the complexity of log2(q).

Skew

An orthogonal space treats divisive ratios as equally important as multiplicative ratios, yet divisive ratios are sometimes thought to be more important. For example, 5/3 is sometimes found to be more important than 15. The skew is introduced to address that.

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.

Order

The order of the norm determines what is a unit step in the interval space.

The Euclidean norm aka L2 norm resembles real-world distances.

The Manhattan norm or taxicab norm aka L1 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 Linf 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 L1 is Linf, and vice versa. Thus, the Manhattan norm corresponds to the Linf tuning space, and the Chebyshevian norm corresponds to the L1 tuning space. The dual of L2 norm is itself, so the Euclidean norm corresponds to Euclidean tuning as one may expect.

Enforcement

Enforcement is the technique where certain intervals are forced to be tuned as desired. The octave is the most common interval subject to enforcement, and is often assumed to be the enforced interval, but other intervals are possible. The two common methods are destretch and constraint.

Destretch

Destretch is a postprocess to enforce a pure interval. The result is no longer optimal measured by the original norm, but it often works as a quick approximation to more sophisticated tunings. The most common destretched tuning is POTE tuning, which approximates CTWE tuning.

Constraint

Constraint is a logical method to enforce one or more pure intervals. A pure interval added this way is known as an eigenmonzo a.k.a. unchanged-interval. It defines a feasible region for optimization, and the result measured by the original norm is feasibly optimal.

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 MC can be added. The goal is to find the generator list G by

Minimize

[math]\displaystyle{ \displaystyle \lVert GV_{WX} - J_{WX} \rVert_p }[/math]

subject to

[math]\displaystyle{ \displaystyle (GV - J)M_{\rm C} = O }[/math]

where (·)WX denotes the weight-skew transformation, found by

[math]\displaystyle{ \displaystyle \begin{align} V_{WX} &= VWX \\ J_{WX} &= JWX \end{align} }[/math]

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.

Table of common tunings
Weight-skew\Order Chebyshevian
(L1 tuning)
Euclidean
(L2 tuning)
Manhattan
(Linfinity tuning)
Tenney
Tenney-Weil
TC tuning

TE tuning
TWE tuning
TOP tuning

Equilateral
Equilateral-Weil
EC tuning

Frobenius tuning
EWE tuning
EOP tuning

Benedetti/Wilson
Benedetti/Wilson-Weil
BC tuning

BE tuning
BWE tuning
BOP tuning

Each has a constrained and/or destretched variant. E.g. for TE tuning there is CTE tuning, and for TWE tuning there is CTWE tuning.

See also

External links