Diamond tradeoff: Difference between revisions

Cmloegcmluin (talk | contribs)
Example: explain edge case
Cmloegcmluin (talk | contribs)
focus and clean up formatting of example
Line 28: Line 28:


Here is the mapping, <math>M</math>:
Here is the mapping, <math>M</math>:


<math>
<math>
Line 36: Line 37:
</math>
</math>


This is a 5-limit temperament, so we consider the 5-limit tonality diamond: [1/1, 6/5, 5/4, 4/3, 3/2, 8/5, 5/3]. Of these seven pitches, there are only three we care about. We don't care about the unison, and half of the remaining pitches are octave-complements of the others are thus irrelevant. So, we'll only look at [4/3, 5/4, 6/5].
 
This is a 5-limit temperament, so we consider the 5-limit tonality diamond: {1/1, 6/5, 5/4, 4/3, 3/2, 8/5, 5/3}. Of these seven pitches, there are only three we care about. We don't care about the unison, and half of the remaining pitches are octave-complements of the others are thus irrelevant. So, we'll only look at {4/3, 5/4, 6/5}.


For each of these three diamond consonances, we want to find what generator is required in order that this pitch remains pure after tempering, or in other words, that it is an unchanged interval (sometimes called an [[eigenmonzo]]). And we want to know this for the situation where octaves are pure.  
For each of these three diamond consonances, we want to find what generator is required in order that this pitch remains pure after tempering, or in other words, that it is an unchanged interval (sometimes called an [[eigenmonzo]]). And we want to know this for the situation where octaves are pure.  


Let's do it for 4/3 first. So, we prepare a matrix out of these two unchanged intervals, 2/1 and 4/3, and call it <math>U</math>:
==== First diamond extrema ====
 
Let's do it for 4/3 first, {{vector|2 -1 0}}. So, we prepare a matrix out of these two unchanged intervals, 2/1 and 4/3, and call it <math>U</math>:
 


<math>
<math>
Line 50: Line 55:
</math>
</math>


One property of an unchanged interval of a tuning is that it is [https://mathworld.wolfram.com/Eigenvector.html eigenvector] of the projection matrix<ref>For now, the best explanation of projection matrices seems to be on the [[fractional monzo]]s page.</ref> for the tuning where the eigenvalue <math>λ</math> is 1. If the projection matrix is <math>P</math>, by the definition of eigenvectors, that means <math>P⋅U = λ⋅U</math>, or <math>P⋅U = 1⋅U</math>, or simply <math>P⋅U = U</math>. In other words, the projection matrix maps the interval to itself; it is unchanged by the tuning. Because we know what <math>U</math> is, we could solve for <math>P</math> now. But we don't want <math>P</math>; we want the generators. Fortunately, <math>P</math> is defined in terms of our desired generators, <math>G</math>, and our mapping, <math>M</math>, like this: <math>P = GM</math>. So if <math>P = G⋅M</math>, then we can substitute that in for <math>P</math>, and our equation will now be <math>G⋅M⋅U = U</math>. But we want to solve for our generators, so that's <math>G</math>. So if we right multiply both sides by the inverse of <math>(M⋅U)</math>, we get
<math>
G⋅M⋅U(MU)^{-1} = U(MU)^{-1} \\
G⋅\cancel{M⋅U}\cancel{(MU)^{-1}} = U(MU)^{-1} \\
G = U(MU)^{-1}
</math>


So with <math>MU</math> on the left side canceled out, the rest is busywork.
Next, we find the generators matrix <math>G</math> corresponding to the tuning where these two intervals are unchanged. The formula for this generators matrix is <math>G = U(MU)^{-1}</math> (for a full explanation of this formula, see [[Dave Keenan and Douglas Blumeyer's guide to RTT tuning#Unchanged interval tuning strategy]]). Here, let's work it out for our chosen <math>U</math>. First, we multiply <math>MU</math>:


We multiply <math>M⋅U</math>:


<math>
<math>
\begin{array} {c}
M \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 0 & -4 \\
1 & 0 & -4 \\
0 & 1 & 4 \\
0 & 1 & 4 \\
\end{array} \right]
\end{array} \right]
\end{array}
\begin{array} {c}
U \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 2 \\
1 & 2 \\
0 & -1 \\
0 & -1 \\
0 & 0 \\
0 & 0 \\
\end{array} \right] =
\end{array} \right]
\end{array}
 
\begin{array} {c} \\ = \end{array}
 
\begin{array} {c}
MU \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 1 \\
1 & 1 \\
0 & -1 \\
0 & -1 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


We take the inverse <math>(M⋅U)^{-1}</math> (which in this case is the same):
 
We take the inverse (which in this case is the same) (the best way to find a matrix inverse is to use a mathematical calculation tool such as Wolfram Language, but it can be done by hand; for a step-by-step demonstration of how to take the inverse, see [[Defactoring algorithms#Inversion by hand]]):
 


<math>
<math>
\begin{array} {c}
\\
\left[ \begin{array} {rrr}
1 & 1 \\
0 & -1 \\
\end{array} \right]^{-1}
\end{array}
\begin{array} {c} \\ = \end{array}
\begin{array} {c}
(MU)^{-1} \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 1 \\
1 & 1 \\
0 & -1 \\
0 & -1 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


Then find <math>G</math> which is <math>U⋅(M⋅U)^{-1}</math>:
 
Then find <math>G</math> which is <math>U(MU)^{-1}</math>:
 


<math>
<math>
\begin{array} {c}
U \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 2 \\
1 & 2 \\
Line 95: Line 129:
0 & 0 \\
0 & 0 \\
\end{array} \right]
\end{array} \right]
\end{array}
\begin{array} {c}
(MU)^{-1} \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 1 \\
1 & 1 \\
0 & -1 \\
0 & -1 \\
\end{array} \right] =
\end{array} \right]
\end{array}
 
\begin{array} {c} \\ = \end{array}
 
\begin{array} {c}
G \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & -1 \\
1 & -1 \\
Line 104: Line 148:
0 & 0 \\
0 & 0 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


Reading the columns from <math>G</math>, the first one confirms our period of 2/1, and the second column gives our generator 3/2. Which is unsurprising. In cents, that's 1200¢ × log₂(3/2) ≈ 701.955¢. The next unchanged interval will give a more interesting result.


So let's do 5/4 now. We prepare a matrix out of these two unchanged intervals, 2/1 and 5/4, and call it <math>U</math>:
Reading the columns from <math>G</math>, the first one {{vector|1 0 0}} confirms our period of 2/1, and the second column {{vector|-1 1 0}} gives our generator 3/2. Which is unsurprising. In cents, that's 1200¢ × log₂(3/2) ≈ 701.955¢. The next unchanged interval will give a more interesting result.
 
==== Second diamond extrema ====
 
So let's do 5/4 now, {{vector|-2 0 1}}. We prepare a matrix out of these two unchanged intervals, 2/1 and 5/4, and call it <math>U</math>:
 


<math>
<math>
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & -2 \\
1 & -2 \\
Line 116: Line 167:
0 & 1 \\
0 & 1 \\
\end{array} \right]
\end{array} \right]
</math>
</math>


We multiply <math>M⋅U</math>:
 
We multiply <math>MU</math>:
 


<math>
<math>
\begin{array} {c}
M \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 0 & -4 \\
1 & 0 & -4 \\
0 & 1 & 4 \\
0 & 1 & 4 \\
\end{array} \right]
\end{array} \right]
\end{array}
\begin{array} {c}
U \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & -2 \\
1 & -2 \\
0 & 0 \\
0 & 0 \\
0 & 1 \\
0 & 1 \\
\end{array} \right] =
\end{array} \right]
\end{array}
 
\begin{array} {c} \\ = \end{array}
 
\begin{array} {c}
MU \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & -2 \\
1 & -2 \\
0 & 4 \\
0 & 4 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


We take the inverse <math>(M⋅U)^{-1}</math>:
 
We take the inverse:
 


<math>
<math>
\begin{array} {c}
\\
\left[ \begin{array} {rrr}
1 & -2 \\
0 & 4 \\
\end{array} \right]^{-1}
\end{array}
\begin{array} {c} \\ = \end{array}
\begin{array} {c}
(MU)^{-1} \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & \frac12 \\
1 & \frac12 \\
0 & \frac14 \\
0 & \frac14 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


Then find <math>G</math> which is <math>U⋅(M⋅U)^{-1}</math>:
 
Then find <math>G</math> which is <math>U(MU)^{-1}</math>:
 


<math>
<math>
\begin{array} {c}
U \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & -2 \\
1 & -2 \\
Line 153: Line 244:
0 & 1 \\
0 & 1 \\
\end{array} \right]
\end{array} \right]
\end{array}
\begin{array} {c}
(MU)^{-1} \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & \frac12 \\
1 & \frac12 \\
0 & \frac14 \\
0 & \frac14 \\
\end{array} \right] =
\end{array} \right]  
\end{array}
 
\begin{array} {c} \\ = \end{array}
 
\begin{array} {c}
G \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 0 \\
1 & 0 \\
Line 162: Line 263:
0 & \frac14 \\
0 & \frac14 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


This tells us our generator is 5^(1/4). In cents, that's 1200¢ × log₂(5¹⸍⁴) ≈ 696.578¢.


Okay, one more unchanged interval to check: 6/5. We prepare a matrix out of these two unchanged intervals, 2/1 and 6/5, and call it <math>U</math>:
This tells us our generator is {{vector|0 0 <math>\frac14</math>}}, or 5^(1/4). In cents, that's 1200¢ × log₂(5¹⸍⁴) ≈ 696.578¢.
 
==== Third diamond extrema ====
 
Okay, one more unchanged interval to check: 6/5, which is {{vector|1 1 -1}}. We prepare a matrix out of these two unchanged intervals, 2/1 and 6/5, and call it <math>U</math>:
 


<math>
<math>
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 1 \\
1 & 1 \\
Line 174: Line 282:
0 & -1 \\
0 & -1 \\
\end{array} \right]
\end{array} \right]
</math>
</math>


We multiply <math>M⋅U</math>:
 
We multiply <math>MU</math>:
 


<math>
<math>
\begin{array} {c}
M \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 0 & -4 \\
1 & 0 & -4 \\
0 & 1 & 4 \\
0 & 1 & 4 \\
\end{array} \right]
\end{array} \right]
\end{array}
\begin{array} {c}
U \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 1 \\
1 & 1 \\
0 & 1 \\
0 & 1 \\
0 & -1 \\
0 & -1 \\
\end{array} \right] =
\end{array} \right]  
\end{array}
 
\begin{array} {c} \\ = \end{array}
 
\begin{array} {c}
MU \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 2 \\
1 & 2 \\
0 & -3 \\
0 & -3 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


We take the inverse <math>(M⋅U)^{-1}</math>:
 
We take the inverse:
 


<math>
<math>
\begin{array} {c}
\\
\left[ \begin{array} {rrr}
1 & 2 \\
0 & -3 \\
\end{array} \right]^{-1}
\end{array}
\begin{array} {c} \\ = \end{array}
\begin{array} {c}
(MU)^{-1} \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & \frac23 \\
1 & \frac23 \\
0 & -\frac13 \\
0 & -\frac13 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


Then find <math>G</math> which is <math>U⋅(M⋅U)^{-1}</math>:
 
Then find <math>G</math> which is <math>U(MU)^{-1}</math>:
 


<math>
<math>
\begin{array} {c}
U \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & 1 \\
1 & 1 \\
Line 211: Line 359:
0 & -1 \\
0 & -1 \\
\end{array} \right]
\end{array} \right]
\end{array}
\begin{array} {c}
(MU)^{-1} \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & \frac23 \\
1 & \frac23 \\
0 & -\frac13 \\
0 & -\frac13 \\
\end{array} \right] =
\end{array} \right]  
\end{array}
 
\begin{array} {c} \\ = \end{array}
 
\begin{array} {c}
G \\
\left[ \begin{array} {rrr}
\left[ \begin{array} {rrr}
1 & \frac13 \\
1 & \frac13 \\
Line 220: Line 378:
0 & \frac13 \\
0 & \frac13 \\
\end{array} \right]
\end{array} \right]
\end{array}
</math>
</math>


This tells us our generator is (10/3)^(1/3). In cents, that's 1200¢ × log₂((10/3)¹⸍³) ≈ 694.786¢.  
 
This tells us our generator is {{vector|<math>\frac13</math> <math>-\frac13</math> <math>\frac13</math>}}, or expressed another way, (10/3)^(1/3). In cents, that's 1200¢ × log₂((10/3)¹⸍³) ≈ 694.786¢.  
 
==== Determining the final range ====


We now have our generator sizes that give us pure consonances in the tonality diamond: 701.955¢, 696.578¢, and 694.786¢. The minimum of those is 694.786¢ and the maximum is 701.955¢, so that's our diamond tradeoff range. Anywhere inside that range, we are making at least one of our diamond consonances purer; outside it, we're making them all less pure.
We now have our generator sizes that give us pure consonances in the tonality diamond: 701.955¢, 696.578¢, and 694.786¢. The minimum of those is 694.786¢ and the maximum is 701.955¢, so that's our diamond tradeoff range. Anywhere inside that range, we are making at least one of our diamond consonances purer; outside it, we're making them all less pure.
This method works as long as you do not choose for your unchanged intervals any intervals that are separated by commas of the temperament. In that case, <math>MU</math> will come out singular, that is, determinant 0, with no inverse, which is math's way of telling you that there's no way to not change both intervals when one of them must be tempered to the other. For example, you couldn't set both 3/2 and 40/27 to be unchanged intervals of meantone, because they're off from each other by 81/80. But then again, you wouldn't try to do something weird like that in the first place, would you.


== See also ==
== See also ==