Constrained tuning/Analytical solution to constrained Euclidean tunings: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Created page with "== Preliminaries == The projection map is useful in a lot of ways. We will work extensively with the projection map in the course of solving constrained tunings. First, it m..."
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{breadcrumb}}
This article gives an analytical form of Euclidean-normed [[constrained tuning]]s.
== Preliminaries ==
== Preliminaries ==
The projection map is useful in a lot of ways. We will work extensively with the projection map in the course of solving constrained tunings.  
The [[projection map]] is useful in a lot of ways. We will work extensively with the projection map in the course of solving constrained tunings.  


First, it manifests itself as a form of tuning map. Its columns represent tunings of formal primes in terms of monzos. The tuning map in the logarithmic scale can be obtained by multiplying the projection map by the JIP on the left.  
First, it manifests itself as a form of [[tuning map]]. Its columns represent tunings of [[formal prime]]s in terms of [[monzo]]s. The tempered tuning map in the logarithmic scale can be obtained by multiplying the projection map by the [[just tuning map]] on the left.  


<math>\displaystyle T = JP</math>
<math>\displaystyle T = JP</math>


where T is the tuning map, J the JIP, and P the projection map.  
where ''T'' is the tempered tuning map, ''J'' the just tuning map, and ''P'' the projection map.  
 
The projection map multipled by a [[temperament mapping matrix]] on the left yields its [[tmonzos and tvals|tempered monzos]]. In particular, if ''V'' is the temperament mapping matrix of ''P'', then
 
<math>\displaystyle VP = V</math>


The projection map multipled by a temperament map on the left yields its tempered monzos. In particular, if A is the temperament map of P, then
Second, the projection map multipled by a monzo list on the right yields the tunings of the list in terms of monzos. In particular, if ''M'' is the [[comma list]] of ''P'', then


<math>\displaystyle AP = A</math>
<math>\displaystyle PM = O</math>


Second, the projection map multipled by a monzo list on the right yields the tunings of the list in terms of monzos. In particular, if B is the comma list of P, then
For any Euclidean aka ''L''<sup>2</sup> tuning without constraints, the weight–skew transformed projection map is


<math>\displaystyle PB = O</math>
<math>\displaystyle P_X = V_X^+ V_X</math>


For any Euclidean aka L<sub>2</sub> tunings, the weighted projection map is
where <sup>+</sup> is the [[pseudoinverse]], and ''V''<sub>''X''</sub> = ''VX'' is the weight–skew transformed val list of the temperament. Removing the transformation, it is


<math>\displaystyle P_W = V^+V</math>
<math>\displaystyle P = XV_X^+ V_X X^+ = X(VX)^+V</math>


where V = AW is the weighted val list of the temperament. Removing the weight, it is
== CEE tuning ==
Let us start with CEE tuning (constrained equilateral-Euclidean tuning): the weight–skew transformation is represented by an identity matrix, which will be omitted below, and the constraint is the octave.  


<math>\displaystyle P = WV^+VW^{-1} = W(AW)^+A</math>
Denote the constraint by ''M''<sub>''I''</sub>. In the case of CEE, it is the octave:


== CFE tuning ==
<math>\displaystyle M_I = [ \begin{matrix} 1 & 0 & \ldots & 0 \end{matrix} \rangle</math>
Let us start with CFE tuning (<u>c</u>onstrained <u>F</u>rob<u>e</u>nius tuning) since its weighter is the identity matrix and the constraint is simply the octave.


As a concrete example, consider septimal meantone, whose mapping is
but it works as long as it is the first ''r'' elements of the [[subgroup basis matrix|subgroup basis]].
 
We will denote the projection map by ''P''. The goal is to work out the constrained projection map ''P''<sub>C</sub>, which also satisfies


<math>\displaystyle  
<math>\displaystyle  
A =
VP_{\rm C} = V \\
P_{\rm C}M = O
</math>
 
in addition to
 
<math>\displaystyle P_{\rm C} M_I = M_I</math>
 
Since ''P'' is characteristic of the temperament and is independent of the specific tuning, notice
 
<math>\displaystyle P = P_{\rm C}^+P_{\rm C}</math>
 
That makes the pseudoinverse of ''P''<sub>C</sub> easier to work with than ''P''<sub>C</sub> itself, as
 
<math>\displaystyle
P_{\rm C}^+ M_I
= P_{\rm C}^+P_{\rm C} M_I
= P M_I
</math>
 
Both ''P''<sub>C</sub><sup>+</sup>''M''<sub>''I''</sub> and ''PM''<sub>''I''</sub> are the same slice of the first ''r'' columns of ''P''.
 
With the first ''r'' rows and columns removed, the remaining part in the mapping will be dubbed the minor matrix, denoted ''V''<sub>M</sub>. The minor matrix of the projection map
 
<math>\displaystyle P_{\rm M} = V_{\rm M}^+ V_{\rm M} </math>
 
forms an orthogonal projection map filling the bottom-right section of ''P''<sub>C</sub><sup>+</sup>.
 
In general, if ''M''<sub>''I''</sub> is the first ''r'' elements of the subgroup basis, then ''P''<sub>C</sub> is of the form
 
<math>\displaystyle
P_{\rm C} =
\begin{bmatrix}
V^+VM_I & \begin{matrix} O \\ V_{\rm M}^+V_{\rm M} \end{matrix}
\end{bmatrix}^+
</math>
 
== Otherwise normed tuning ==
If there is a weight–skew transformation ''X'', such as CTWE tuning, the transformation should be applied to the map and the constraint first:
 
<math>\displaystyle
\begin{align}
V_X &= VX \\
(M_I)_X &= X^+ M_I
\end{align}
</math>
 
Working from here, we find the weight–skew transformed projection map (''P''<sub>C</sub>)<sub>''X''</sub>:
 
<math>\displaystyle
(P_{\rm C})_X =
\begin{bmatrix}
V_X^+ V_X (M_I)_X & \begin{matrix} O \\ (V_X)_{\rm M}^+ (V_X)_{\rm M} \end{matrix}
\end{bmatrix}^+
</math>
 
To reconstruct the original projection map, apply
 
<math>\displaystyle P_{\rm C} = X (P_{\rm C})_X X^+</math>
 
== Nontrivially constrained tuning ==
What if the constraint is something more complex, especially when it is not the first ''r'' elements of the subgroup basis? It turns out we can always transform the subgroup basis to encapsulate the constraint. Such a subgroup basis matrix ''S'' is formed by the constraint and its orthonormal complement.
 
<math>\displaystyle S = [\begin{matrix} M_I & M_I^\perp \end{matrix}] </math>
 
For example, if the temperament is in the subgroup basis of 2.3.5.7, and if the constraint is 2.5/3, then
 
<math>\displaystyle
M_I =
\begin{bmatrix}
1 & 0 \\
0 & -1 \\
0 & 1 \\
0 & 0
\end{bmatrix},
M_I^\perp =  
\begin{bmatrix}
\begin{bmatrix}
1 & 0 & -4 & -13 \\
0 & 0 \\
0 & 1 & 4 & 10
1/\sqrt{2} & 0 \\
1/\sqrt{2} & 0 \\
0 & 1
\end{bmatrix},
S =
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & -1 & 1/\sqrt{2} & 0 \\
0 & 1 & 1/\sqrt{2} & 0 \\
0 & 0 & 0 & 1
\end{bmatrix}
\end{bmatrix}
</math>
</math>


Denote the constraint by B<sub>C</sub>. In this case, it is the octave:
We should apply this ''S'' to the map and the constraint to convert them into the working basis:
 
<math>\displaystyle
\begin{align}
V_S &= VS \\
(M_I)_S &= S^{-1}M_I
\end{align}
</math>


<math>\displaystyle B_{\rm C} = [ \begin{matrix} 1 & 0 & 0 & 0 \end{matrix} \rangle</math>
Proceed as before. The projection map found this way will be in the working basis. To reconstruct the original projection map, apply


but it works as long as it is the first ''r'' elements of the subgroup basis.
<math>\displaystyle P_{\rm C} = S (P_{\rm C})_S S^{-1}</math>


We will also denote the projection map by P. For septimal meantone,
Similarly, if there is a weight–skew transformation ''X'', it should be applied to the map and the constraint first:


<math>\displaystyle  
<math>\displaystyle  
P = \frac{1}{446}
\begin{align}
\begin{bmatrix}
V_X &= VX \\
117 & 146 & 116 & -61 \\
(M_I)_X &= X^+ M_I
146 & 186 & 160 & -38 \\
\end{align}
116 & 160 & 176 & 92 \\
-61 & -38 & 92 & 413
\end{bmatrix}
</math>
</math>


The goal is to work out the constrained projection map P<sub>C</sub>, which also satisfies
and then the basis transformation matrix should be found out in this weight–skew transformed space:


<math>\displaystyle  
<math>\displaystyle  
AP_{\rm C} = A \\
S = [\begin{matrix} M_I & M_I^\perp \end{matrix}]
P_{\rm C}B = O
</math>
</math>


in addition to
We should apply this ''S'' to the weight–skew transformed map and the weight–skew transformed constraint to convert them into the working basis:
 
<math>\displaystyle
\begin{align}
V_{XS} &= VXS \\
(M_I)_{XS} &= (XS)^+ M_I
\end{align}
</math>


<math>\displaystyle P_{\rm C} B_{\rm C} = B_{\rm C}</math>
Proceed as before. The projection map found this way will be weight–skew transformed and in the working basis. To reconstruct the original projection map, apply


Since P is characteristic of the temperament and is independent of the specific tuning, notice
<math>\displaystyle P_{\rm C} = XS (P_{\rm C})_{XS} (XS)^+</math>


<math>\displaystyle P = P_{\rm C}^+P_{\rm C}</math>
== Example ==
Let us try tuning septimal meantone to CEE.


where <sup>+</sup> is the pseudoinverse. That makes the pseudoinverse of P<sub>C</sub> easier to work with than P<sub>C</sub> itself, as
Its mapping is


<math>\displaystyle  
<math>\displaystyle  
P_{\rm C}^+ B_{\rm C}
V =
= P_{\rm C}^+P_{\rm C} B_{\rm C}
\begin{bmatrix}
= P B_{\rm C}
1 & 0 & -4 & -13 \\
0 & 1 & 4 & 10
\end{bmatrix}
</math>
</math>


Both P<sub>C</sub><sup>+</sup>B<sub>C</sub> and PB<sub>C</sub> are the same slice of the first ''r'' columns of P.
The projection map is


With the first ''r'' rows and columns removed, the remaining part in the mapping will be dubbed the minor of A, denoted A<sub>M</sub>. For septimal meantone, it is
<math>\displaystyle
\begin{align}
P &= V^+V \\
&= \frac{1}{446}
\begin{bmatrix}
117 & 146 & 116 & -61 \\
146 & 186 & 160 & -38 \\
116 & 160 & 176 & 92 \\
-61 & -38 & 92 & 413
\end{bmatrix}
\end{align}
</math>
 
The minor matrix of the mapping is


<math>\displaystyle A_{\rm M} = \begin{bmatrix} 1 & 4 & 10\end{bmatrix}</math>
<math>\displaystyle V_{\rm M} = \begin{bmatrix} 1 & 4 & 10\end{bmatrix}</math>


That forms a projection map filling the bottom-right section of P<sub>C</sub><sup>+</sup> as
and the minor matrix of the projection map is


<math>\displaystyle  
<math>\displaystyle  
A_{\rm M}^+A_{\rm M} = \frac{1}{117}
\begin{align}
P_{\rm M} &= V_{\rm M}^+V_{\rm M} \\
&= \frac{1}{117}
\begin{bmatrix}  
\begin{bmatrix}  
1 & 4 & 10 \\
1 & 4 & 10 \\
Line 93: Line 214:
10 & 40 & 100
10 & 40 & 100
\end{bmatrix}
\end{bmatrix}
\end{align}
</math>
</math>


Line 119: Line 241:
</math>
</math>


In general, if B<sub>C</sub> is the first ''r'' elements of the subgroup basis, then P<sub>C</sub> is of the form
The tuning map ''T''<sub>C</sub> is
 
<math>\displaystyle
P_{\rm C} =
\begin{bmatrix}
PB_{\rm C} & \begin{matrix} O \\ A_{\rm M}^+A_{\rm M} \end{matrix}
\end{bmatrix}^+
</math>
 
== Nontrivial constraint and/or weight ==
What if the constraint is something more complex, especially when it is not the first ''r'' elements of the subgroup basis? It turns out we can always transform the subgroup basis to encapsulate the constraint. Such a subgroup is formed by the constraint and its orthonormal complement.
 
For example, if the temperament is in the subgroup basis of 2.3.5.7, and the constraint is 2.5/3:
 
<math>\displaystyle B_{\rm C} = [[ \begin{matrix} 1 & 0 & 0 & 0 \end{matrix} \rangle, [ \begin{matrix} 0 & -1 & 1 & 0 \end{matrix} \rangle]</math>
 
Then the basis transformation matrix will be
 
<math>\displaystyle
S = [B_{\rm C} \vert B_{\rm C}^\perp] =
\begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & -1 & 1/\sqrt{2} & 0 \\
0 & 1 & -1/\sqrt{2} & 0 \\
0 & 0 & 0 & 1
\end{bmatrix}
</math>
 
We should apply this S to the map and the constraint to convert them into the working basis:


<math>\displaystyle  
<math>\displaystyle  
A_S = AS \\
\begin{align}
(B_{\rm C})_S = S^{-1}B_{\rm C}
T_{\rm C} &= JP_{\rm C} \\
&= \langle \begin{matrix} 1200 & 1896.8843 & 2787.5374 & 3368.8435 \end{matrix} ]
\end{align}
</math>
</math>


The projection map found this way will be also in the working basis. To convert it back, apply
[[Category:Math]]
 
<math>\displaystyle P = S P_S S^{-1}</math>
 

Latest revision as of 20:43, 25 November 2024

This article gives an analytical form of Euclidean-normed constrained tunings.

Preliminaries

The projection map is useful in a lot of ways. We will work extensively with the projection map in the course of solving constrained tunings.

First, it manifests itself as a form of tuning map. Its columns represent tunings of formal primes in terms of monzos. The tempered tuning map in the logarithmic scale can be obtained by multiplying the projection map by the just tuning map on the left.

[math]\displaystyle{ \displaystyle T = JP }[/math]

where T is the tempered tuning map, J the just tuning map, and P the projection map.

The projection map multipled by a temperament mapping matrix on the left yields its tempered monzos. In particular, if V is the temperament mapping matrix of P, then

[math]\displaystyle{ \displaystyle VP = V }[/math]

Second, the projection map multipled by a monzo list on the right yields the tunings of the list in terms of monzos. In particular, if M is the comma list of P, then

[math]\displaystyle{ \displaystyle PM = O }[/math]

For any Euclidean aka L2 tuning without constraints, the weight–skew transformed projection map is

[math]\displaystyle{ \displaystyle P_X = V_X^+ V_X }[/math]

where + is the pseudoinverse, and VX = VX is the weight–skew transformed val list of the temperament. Removing the transformation, it is

[math]\displaystyle{ \displaystyle P = XV_X^+ V_X X^+ = X(VX)^+V }[/math]

CEE tuning

Let us start with CEE tuning (constrained equilateral-Euclidean tuning): the weight–skew transformation is represented by an identity matrix, which will be omitted below, and the constraint is the octave.

Denote the constraint by MI. In the case of CEE, it is the octave:

[math]\displaystyle{ \displaystyle M_I = [ \begin{matrix} 1 & 0 & \ldots & 0 \end{matrix} \rangle }[/math]

but it works as long as it is the first r elements of the subgroup basis.

We will denote the projection map by P. The goal is to work out the constrained projection map PC, which also satisfies

[math]\displaystyle{ \displaystyle VP_{\rm C} = V \\ P_{\rm C}M = O }[/math]

in addition to

[math]\displaystyle{ \displaystyle P_{\rm C} M_I = M_I }[/math]

Since P is characteristic of the temperament and is independent of the specific tuning, notice

[math]\displaystyle{ \displaystyle P = P_{\rm C}^+P_{\rm C} }[/math]

That makes the pseudoinverse of PC easier to work with than PC itself, as

[math]\displaystyle{ \displaystyle P_{\rm C}^+ M_I = P_{\rm C}^+P_{\rm C} M_I = P M_I }[/math]

Both PC+MI and PMI are the same slice of the first r columns of P.

With the first r rows and columns removed, the remaining part in the mapping will be dubbed the minor matrix, denoted VM. The minor matrix of the projection map

[math]\displaystyle{ \displaystyle P_{\rm M} = V_{\rm M}^+ V_{\rm M} }[/math]

forms an orthogonal projection map filling the bottom-right section of PC+.

In general, if MI is the first r elements of the subgroup basis, then PC is of the form

[math]\displaystyle{ \displaystyle P_{\rm C} = \begin{bmatrix} V^+VM_I & \begin{matrix} O \\ V_{\rm M}^+V_{\rm M} \end{matrix} \end{bmatrix}^+ }[/math]

Otherwise normed tuning

If there is a weight–skew transformation X, such as CTWE tuning, the transformation should be applied to the map and the constraint first:

[math]\displaystyle{ \displaystyle \begin{align} V_X &= VX \\ (M_I)_X &= X^+ M_I \end{align} }[/math]

Working from here, we find the weight–skew transformed projection map (PC)X:

[math]\displaystyle{ \displaystyle (P_{\rm C})_X = \begin{bmatrix} V_X^+ V_X (M_I)_X & \begin{matrix} O \\ (V_X)_{\rm M}^+ (V_X)_{\rm M} \end{matrix} \end{bmatrix}^+ }[/math]

To reconstruct the original projection map, apply

[math]\displaystyle{ \displaystyle P_{\rm C} = X (P_{\rm C})_X X^+ }[/math]

Nontrivially constrained tuning

What if the constraint is something more complex, especially when it is not the first r elements of the subgroup basis? It turns out we can always transform the subgroup basis to encapsulate the constraint. Such a subgroup basis matrix S is formed by the constraint and its orthonormal complement.

[math]\displaystyle{ \displaystyle S = [\begin{matrix} M_I & M_I^\perp \end{matrix}] }[/math]

For example, if the temperament is in the subgroup basis of 2.3.5.7, and if the constraint is 2.5/3, then

[math]\displaystyle{ \displaystyle M_I = \begin{bmatrix} 1 & 0 \\ 0 & -1 \\ 0 & 1 \\ 0 & 0 \end{bmatrix}, M_I^\perp = \begin{bmatrix} 0 & 0 \\ 1/\sqrt{2} & 0 \\ 1/\sqrt{2} & 0 \\ 0 & 1 \end{bmatrix}, S = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & -1 & 1/\sqrt{2} & 0 \\ 0 & 1 & 1/\sqrt{2} & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} }[/math]

We should apply this S to the map and the constraint to convert them into the working basis:

[math]\displaystyle{ \displaystyle \begin{align} V_S &= VS \\ (M_I)_S &= S^{-1}M_I \end{align} }[/math]

Proceed as before. The projection map found this way will be in the working basis. To reconstruct the original projection map, apply

[math]\displaystyle{ \displaystyle P_{\rm C} = S (P_{\rm C})_S S^{-1} }[/math]

Similarly, if there is a weight–skew transformation X, it should be applied to the map and the constraint first:

[math]\displaystyle{ \displaystyle \begin{align} V_X &= VX \\ (M_I)_X &= X^+ M_I \end{align} }[/math]

and then the basis transformation matrix should be found out in this weight–skew transformed space:

[math]\displaystyle{ \displaystyle S = [\begin{matrix} M_I & M_I^\perp \end{matrix}] }[/math]

We should apply this S to the weight–skew transformed map and the weight–skew transformed constraint to convert them into the working basis:

[math]\displaystyle{ \displaystyle \begin{align} V_{XS} &= VXS \\ (M_I)_{XS} &= (XS)^+ M_I \end{align} }[/math]

Proceed as before. The projection map found this way will be weight–skew transformed and in the working basis. To reconstruct the original projection map, apply

[math]\displaystyle{ \displaystyle P_{\rm C} = XS (P_{\rm C})_{XS} (XS)^+ }[/math]

Example

Let us try tuning septimal meantone to CEE.

Its mapping is

[math]\displaystyle{ \displaystyle V = \begin{bmatrix} 1 & 0 & -4 & -13 \\ 0 & 1 & 4 & 10 \end{bmatrix} }[/math]

The projection map is

[math]\displaystyle{ \displaystyle \begin{align} P &= V^+V \\ &= \frac{1}{446} \begin{bmatrix} 117 & 146 & 116 & -61 \\ 146 & 186 & 160 & -38 \\ 116 & 160 & 176 & 92 \\ -61 & -38 & 92 & 413 \end{bmatrix} \end{align} }[/math]

The minor matrix of the mapping is

[math]\displaystyle{ \displaystyle V_{\rm M} = \begin{bmatrix} 1 & 4 & 10\end{bmatrix} }[/math]

and the minor matrix of the projection map is

[math]\displaystyle{ \displaystyle \begin{align} P_{\rm M} &= V_{\rm M}^+V_{\rm M} \\ &= \frac{1}{117} \begin{bmatrix} 1 & 4 & 10 \\ 4 & 16 & 40 \\ 10 & 40 & 100 \end{bmatrix} \end{align} }[/math]

In fact,

[math]\displaystyle{ \displaystyle P_{\rm C}^+ = \begin{bmatrix} 117/446 & 0 & 0 & 0 \\ 146/446 & 1/117 & 4/117 & 10/117 \\ 116/446 & 4/117 & 16/117 & 40/117 \\ -61/446 & 10/117 & 40/117 & 100/117 \end{bmatrix} }[/math]

Hence,

[math]\displaystyle{ \displaystyle P_{\rm C} = \frac{1}{117} \begin{bmatrix} 117 & 146 & 116 & -61 \\ 0 & 1 & 4 & 10 \\ 0 & 4 & 16 & 40 \\ 0 & 10 & 40 & 100 \end{bmatrix} }[/math]

The tuning map TC is

[math]\displaystyle{ \displaystyle \begin{align} T_{\rm C} &= JP_{\rm C} \\ &= \langle \begin{matrix} 1200 & 1896.8843 & 2787.5374 & 3368.8435 \end{matrix} ] \end{align} }[/math]