Generator embedding optimization/Zero-damage method

Revision as of 22:56, 27 October 2026 by Sintel (talk | contribs) (Split two)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[math]\displaystyle{ \def\slant#1{\style{display: inline-block; margin: -.05em; transform: skew(-14deg) translateX(.03em);}{#1}} \def\smallLLzigzag{\hspace{-1.4mu}\style{display: inline-block; transform: scale(.62, 1.24) translateY(.05em); font-family: sans-serif;}{ꗨ\hspace{-2.6mu}ꗨ}\hspace{-1.4mu}} \def\smallRRzigzag{\hspace{-1.4mu}\style{display: inline-block; transform: scale(-.62, 1.24) translateY(.05em); font-family: sans-serif;}{ꗨ\hspace{-2.6mu}ꗨ}\hspace{-1.4mu}} \def\llzigzag{\hspace{-1.6mu}\style{display: inline-block; transform: scale(.62, 1.24) translateY(.07em); font-family: sans-serif;}{ꗨ\hspace{-3mu}ꗨ}\hspace{-1.6mu}} \def\rrzigzag{\hspace{-1.6mu}\style{display: inline-block; transform: scale(-.62, 1.24) translateY(.07em); font-family: sans-serif;}{ꗨ\hspace{-3mu}ꗨ}\hspace{-1.6mu}} \def\largeLLzigzag{\hspace{-1.8mu}\style{display: inline-block; transform: scale(.62, 1.24) translateY(.09em); font-family: sans-serif;}{ꗨ\hspace{-3.5mu}ꗨ}\hspace{-1.8mu}} \def\largeRRzigzag{\hspace{-1.8mu}\style{display: inline-block; transform: scale(-.62, 1.24) translateY(.09em); font-family: sans-serif;}{ꗨ\hspace{-3.5mu}ꗨ}\hspace{-1.8mu}} \def\LargeLLzigzag{\hspace{-2.5mu}\style{display: inline-block; transform: scale(.62, 1.24) translateY(.1em); font-family: sans-serif;}{ꗨ\hspace{-4.5mu}ꗨ}\hspace{-2.5mu}} \def\LargeRRzigzag{\hspace{-2.5mu}\style{display: inline-block; transform: scale(-.62, 1.24) translateY(.1em); font-family: sans-serif;}{ꗨ\hspace{-4.5mu}ꗨ}\hspace{-2.5mu}} }[/math] The second optimization power we'll take a look at is [math]\displaystyle{ p = 1 }[/math], for miniaverage tuning schemes.

Note that miniaverage tunings have not been advocated by tuning theorists thus far. We've included this section largely in order to complete the set of methods with exact solutions, one for each of the key optimization powers [math]\displaystyle{ 1 }[/math], [math]\displaystyle{ 2 }[/math], and [math]\displaystyle{ ∞ }[/math].[note 1] So, you may prefer to skip ahead to the next section if you're feeling more practically minded. However, the method for [math]\displaystyle{ p = ∞ }[/math] is related but more complicated, and its explanation builds upon this method's explanation, so it may still be worth it to work through this one first.

The high-level summary here is that we're going to collect every tuning where one target-interval for each generator is tuned pure simultaneously. Then we will check each of those tunings' damages, and choose the tuning of those which causes the least damage.

The zero-damage point set

The method for finding the miniaverage leverages the fact that the sum graph changes slope wherever a target-interval is tuned pure. The minimum must be found among the points where [math]\displaystyle{ r }[/math] target-intervals are all tuned pure at once, where [math]\displaystyle{ r }[/math] is the rank of the temperament. This is because this is the maximum number of linearly independent intervals that could be pure at once, given only [math]\displaystyle{ r }[/math] generators to work with. You can imagine that for any point you could find where only [math]\displaystyle{ r - 1 }[/math] intervals were pure at once, that point would be found on a line along which all [math]\displaystyle{ r - 1 }[/math] of those intervals remain pure, but if you follow it far enough in one direction, you'll reach a point where one additional interval is also pure.

These points taken together are known as the zero-damage point set. This is the first of two methods we'll look at in this article which make use of a point set. The other is the method for finding the minimax, which uses a different point set called the "coinciding-damage point set"; this method is slightly trickier than the miniaverage one, though, and so we'll be looking at it next, right after we've covered the miniaverage method here.

So, in essence, this method works by narrowing the infinite space of tuning possibilities down to a finite set of points to check. We gather these zero-damage points, find the damage (specifically the sum of damages to the target-intervals, AKA the power sum where [math]\displaystyle{ p = 1 }[/math]) at each point, and then choose the one with the minimum damage out of those. And that'll be our miniaverage tuning (unless there's a tie, but more on that later).

Gather and process zero-damage points

Let's practice this method by working through an example. For our target-interval list, we can use our recommended scheme, the truncated integer limit triangle (or "TILT" for short), colorized here so we'll be able to visualize their combinations better in the upcoming step. This is the 6-TILT, our default target list for 5-limit temperaments.


[math]\displaystyle{ \mathrm{T} = \begin{array} {c} \ \ \begin{array} {c} \textbf{i}_1 & \ \ \ \textbf{i}_2 & \ \ \ \textbf{i}_3 & \ \ \ \textbf{i}_4 & \ \ \ \textbf{i}_5 & \ \ \ \textbf{i}_6 & \ \ \ \textbf{i}_7 & \ \ \ \textbf{i}_8 \\ \frac21 & \ \ \ \frac31 & \ \ \ \frac32 & \ \ \ \frac43 & \ \ \ \frac52 & \ \ \ \frac53 & \ \ \ \frac54 & \ \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r|r|r|r|r|r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{-1} & \style{background-color:#98CC70;padding:5px}{2} & \style{background-color:#3FBC9D;padding:5px}{-1} & \style{background-color:#41B0E4;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{-2} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#FFF200;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{-1} & \style{background-color:#3FBC9D;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{-1} & \style{background-color:#7977B8;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{1} & \style{background-color:#41B0E4;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} }[/math]


And let's use a classic example for our temperament: meantone.

Unchanged-interval bases

We can compute ahead of time how many points we should find in our zero-damage point set, because it's simply the number of combinations of [math]\displaystyle{ r }[/math] of them. With meantone being a rank-2 temperament, that's [math]\displaystyle{ {{8}\choose{2}} = 28 }[/math] points (8 choose 2 is 28).

Each of these 28 points may be represented by an unchanged-interval basis, symbolized as [math]\displaystyle{ \mathrm{U} }[/math]. An unchanged-interval basis is simply a matrix where each column is a prime-count vector representing a different interval that the tuning of this temperament should leave unchanged. So for example, the matrix ⟨[-1 1 0⟩ [0 -1 1⟩] tells us that [math]\displaystyle{ \frac32 }[/math] = [-1 1 0⟩ and [math]\displaystyle{ \frac53 }[/math] = [0 -1 1⟩ are to be left unchanged. (The "basis" part of the name tells us that furthermore every linear combination of these vectors is also left unchanged, such as 2×[-1 1 0⟩ + -1×[0 -1 1⟩ = [-2 3 -1⟩, AKA [math]\displaystyle{ \frac{27}{20} }[/math]. It also technically tells us that none of the vectors is already a linear combination of the others, i.e. that it is full-column-rank; this may not be true of all of these matrices we're assembling using this automatic procedure, but that's okay because any of these that aren't truly bases will be eliminated for that reason in the next step.)

Note that this unchanged-interval basis [math]\displaystyle{ \mathrm{U} }[/math] is different than our held-unchanged-interval basis [math]\displaystyle{ H }[/math]. There are a couple main differences:

  1. We didn't ask for these unchanged-interval bases [math]\displaystyle{ \mathrm{U} }[/math]; they're just coming up as part of this algorithm.
  2. These unchanged-interval bases completely specify the tuning. A held-interval basis [math]\displaystyle{ \mathrm{H} }[/math] has shape [math]\displaystyle{ (d, h) }[/math] where [math]\displaystyle{ h \leq r }[/math], but an unchanged-interval basis [math]\displaystyle{ \mathrm{U} }[/math] always has shape [math]\displaystyle{ (d, r) }[/math]. (Remember, [math]\displaystyle{ r }[/math] is the rank of the temperament, or in other words, the count of generators.)

So here's the full list of 28 unchanged-interval bases corresponding to the zero-damage points for any 5-limit rank-2 temperament (meantone or otherwise), given the 6-TILT as its target-interval set. Use the colorization to better understand the nature of these combinations:


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(1,2)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#FDBC42;padding:5px}{0} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#FDBC42;padding:5px}{1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#FDBC42;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(1,3)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac43 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#FFF200;padding:5px}{-1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(1,4)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac43 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{2} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{-1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(1,5)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#3FBC9D;padding:5px}{-1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{0} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(1,6)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#41B0E4;padding:5px}{0} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{-1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(1,7)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(1,8)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#F69289;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#F69289;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} , }[/math]


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(2,3)} \\ \ \ \begin{array} {rrr} \frac31 & \ \ \frac32 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{-1} \\ \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#FFF200;padding:5px}{1} \\ \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(2,4)} \\ \ \ \begin{array} {rrr} \frac31 & \ \ \frac43 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{2} \\ \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{-1} \\ \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(2,5)} \\ \ \ \begin{array} {rrr} \frac31 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{-1} \\ \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#3FBC9D;padding:5px}{0} \\ \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(2,6)} \\ \ \ \begin{array} {rrr} \frac31 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{0} \\ \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#41B0E4;padding:5px}{-1} \\ \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(2,7)} \\ \ \ \begin{array} {rrr} \frac31 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(2,8)} \\ \ \ \begin{array} {rrr} \frac31 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#FDBC42;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#FDBC42;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} , }[/math]


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(3,4)} \\ \ \ \begin{array} {rrr} \frac32 & \ \ \frac43 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FFF200;padding:5px}{-1} & \style{background-color:#98CC70;padding:5px}{2} \\ \style{background-color:#FFF200;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{-1} \\ \style{background-color:#FFF200;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(3,5)} \\ \ \ \begin{array} {rrr} \frac32 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FFF200;padding:5px}{-1} & \style{background-color:#3FBC9D;padding:5px}{-1} \\ \style{background-color:#FFF200;padding:5px}{1} & \style{background-color:#3FBC9D;padding:5px}{0} \\ \style{background-color:#FFF200;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(3,6)} \\ \ \ \begin{array} {rrr} \frac32 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FFF200;padding:5px}{-1} & \style{background-color:#41B0E4;padding:5px}{0} \\ \style{background-color:#FFF200;padding:5px}{1} & \style{background-color:#41B0E4;padding:5px}{-1} \\ \style{background-color:#FFF200;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(3,7)} \\ \ \ \begin{array} {rrr} \frac32 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FFF200;padding:5px}{-1} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#FFF200;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#FFF200;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(3,8)} \\ \ \ \begin{array} {rrr} \frac32 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#FFF200;padding:5px}{-1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#FFF200;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#FFF200;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} , }[/math]


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(4,5)} \\ \ \ \begin{array} {rrr} \frac43 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#98CC70;padding:5px}{2} & \style{background-color:#3FBC9D;padding:5px}{-1} \\ \style{background-color:#98CC70;padding:5px}{-1} & \style{background-color:#3FBC9D;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(4,6)} \\ \ \ \begin{array} {rrr} \frac43 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#98CC70;padding:5px}{2} & \style{background-color:#41B0E4;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{-1} & \style{background-color:#41B0E4;padding:5px}{-1} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(4,7)} \\ \ \ \begin{array} {rrr} \frac43 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#98CC70;padding:5px}{2} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#98CC70;padding:5px}{-1} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(4,8)} \\ \ \ \begin{array} {rrr} \frac43 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#98CC70;padding:5px}{2} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#98CC70;padding:5px}{-1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} , }[/math]


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(5,6)} \\ \ \ \begin{array} {rrr} \frac52 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#3FBC9D;padding:5px}{-1} & \style{background-color:#41B0E4;padding:5px}{0} \\ \style{background-color:#3FBC9D;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{-1} \\ \style{background-color:#3FBC9D;padding:5px}{1} & \style{background-color:#41B0E4;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(5,7)} \\ \ \ \begin{array} {rrr} \frac52 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#3FBC9D;padding:5px}{-1} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#3FBC9D;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#3FBC9D;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(5,8)} \\ \ \ \begin{array} {rrr} \frac52 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#3FBC9D;padding:5px}{-1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#3FBC9D;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#3FBC9D;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} , }[/math]


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(6,7)} \\ \ \ \begin{array} {rrr} \frac53 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#41B0E4;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#41B0E4;padding:5px}{-1} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#41B0E4;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(6,8)} \\ \ \ \begin{array} {rrr} \frac53 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#41B0E4;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#41B0E4;padding:5px}{-1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#41B0E4;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} , }[/math]


[math]\displaystyle{ \begin{array} {c} \mathrm{U}_{(7,8)} \\ \ \ \begin{array} {rrr} \frac54 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#7977B8;padding:5px}{-2} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#7977B8;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#7977B8;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} }[/math]


Canonicalize and filter deficient matrices

But many of these unchanged-interval bases are actually redundant with each other, by which we mean that they correspond to the same tuning. Said another way, some of these unchanged-interval bases are different bases for the same set of unchanged-intervals.

In order to identify such redundancies, we will put all of our unchanged-interval bases into their canonical form, following the canonicalization process that has already been described for comma bases, because they are bases, tall matrices (have more rows than columns), and their columns represent intervals. Putting matrices into canonical form is a way to determine if, for some definition of "same", they represent the same information. So here's what they look like in that form (no more color here on out; the point about combinations has been made):


[math]\displaystyle{ \scriptsize \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} , \\[35pt] \scriptsize \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & 0 \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \\[35pt] \scriptsize \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \\[35pt] \scriptsize \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac58 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-3} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} }[/math]


Note, for example, that our matrix representing [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac43 }[/math] (the 14th one here) has been simplified to a matrix representing [math]\displaystyle{ \frac21 }[/math] and [math]\displaystyle{ \frac31 }[/math]; this is as if to say: why define the problem as tuning [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac43 }[/math] pure, when there's only two total different prime factors between these two intervals, so we may as well just use our two generators to make both of those basis primes pure. In fact, any combination of intervals that includes no prime 5 here will have been simplified to this same unchanged-interval basis.

Also note that many intervals are now subunison (less than [math]\displaystyle{ \frac11 }[/math], with a denominator greater than the numerator; for example [math]\displaystyle{ \frac34 }[/math]). While this may be unnatural for musicians to think about, it's just the way the canonicalization math works out, and is irrelevant to tuning, because any damage to an interval will be the same as to its reciprocal.

In some cases at this point, we would eliminate some unchanged-interval bases, those that through the process of canonicalization were simplified to fewer than [math]\displaystyle{ r }[/math] intervals, i.e. they lost a column (or more than one column). In this example, that has not occurred to any of our matrices; in order for it to have occurred, our target-interval set would have needed to include linearly dependent intervals. For example, the intervals [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac94 }[/math] are linearly dependent, and we see these in the 10-TILT that's the default for a 7-limit temperament. So in that case, the unchanged-interval bases that result from the combination of those pairs of intervals will be eliminated. This captures the fact that if you were to purely tune the interval which the others are multiples of, all the others will also be purely tuned, so this is not truly a combination of distinct intervals to purely tune.

De-dupe

And we also see that our [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac65 }[/math] matrix has been changed to [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac54 }[/math]. This may be less obvious in terms of it being a simplification, but it does illuminate how tuning [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac65 }[/math] pure is no different than tuning [math]\displaystyle{ \frac32 }[/math] and [math]\displaystyle{ \frac54 }[/math] pure.

And so now it's time to actually eliminate those redundancies!


[math]\displaystyle{ \scriptsize \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & 0 \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac32 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-1} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-1} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-2} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac34 & \ \ \frac58 \\ \end{array} \\ \left[ \begin{array} {r|r} {-2} & {-3} \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} }[/math]


Counting only 11 matrices still remaining, that means we must have eliminated 17 of them as redundant from our original set of 28.

Convert to generators

Now we just need to convert each of these unchanged-interval bases [math]\displaystyle{ \mathrm{U}_{(i,j)} }[/math] to a corresponding generator embedding [math]\displaystyle{ G }[/math]. To do this, we use the formula [math]\displaystyle{ G = \mathrm{U}(M\mathrm{U})^{-1} }[/math], where [math]\displaystyle{ M }[/math] is the temperament mapping (the derivation of this formula, and examples of working through this calculation, are both described later in this article here: Only held-intervals method).[note 2]


[math]\displaystyle{ \scriptsize \begin{array} {c} \ \ \begin{array} {rrr} \frac{2}{1} & \frac{3}{2} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & {-1} \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{2}{1} & \sqrt[4]{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 \\ 0 & 0 \\ 0 & \frac14 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \sqrt[3]{\frac{10}{3}} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & \frac13 \\ 0 & {-\frac13} \\ 0 & \frac13 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \sqrt[5]{\frac{162}{5}} & \sqrt[5]{\frac{15}{2}} \\ \end{array} \\ \left[ \begin{array} {rrr} \frac15 & {-\frac15} \\ \frac45 & \frac15 \\ {-\frac15} & \frac15 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{3}{\sqrt[4]{5}} & \sqrt[4]{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 0 & 0 \\ 1 & 0 \\ {-\frac14} & \frac14 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \sqrt[6]{\frac{324}{5}} & \sqrt[6]{\frac{45}{4}} \\ \end{array} \\ \left[ \begin{array} {rrr} \frac13 & {-\frac13} \\ \frac23 & \frac13 \\ {-\frac16} & \frac16 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{81}{40} & \frac{3}{2} \\ \end{array} \\ \left[ \begin{array} {rrr} {-3} & {-1} \\ 4 & 1 \\ {-1} & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{9}{2\sqrt[2]{5}} & \frac{3}{2} \\ \end{array} \\ \left[ \begin{array} {rrr} {-1} & {-1} \\ 2 & 1 \\ {-\frac12} & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \sqrt[3]{\frac{640}{81}} & \sqrt[3]{\frac{10}{3}} \\ \end{array} \\ \left[ \begin{array} {rrr} \frac73 & \frac13 \\ {-\frac43} & {-\frac13} \\ \frac13 & \frac13 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{8\sqrt[2]{5}}{9} & \frac{2\sqrt[2]{5}}{3} \\ \end{array} \\ \left[ \begin{array} {rrr} 3 & 1 \\ {-2} & {-1} \\ \frac12 & \frac12 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{160}{81} & \frac{40}{27} \\ \end{array} \\ \left[ \begin{array} {rrr} 5 & 3 \\ {-4} & {-3} \\ 1 & 1 \\ \end{array} \right] \end{array} }[/math]


Note that every one of those unusual looking values above—whether it be [math]\displaystyle{ \frac21 }[/math], [math]\displaystyle{ \frac{81}{40} }[/math], [math]\displaystyle{ \frac{8\sqrt[2]{5}}{9} }[/math], or otherwise in the first column—or [math]\displaystyle{ \frac32 }[/math], [math]\displaystyle{ \frac{40}{27} }[/math], [math]\displaystyle{ \sqrt[3]{\frac{10}{3}} }[/math], or otherwise in the second column—is an approximation of [math]\displaystyle{ \frac21 }[/math] or [math]\displaystyle{ \frac32 }[/math], respectively.

At this point, the only inputs affecting our results have been [math]\displaystyle{ M }[/math] and [math]\displaystyle{ \mathrm{T} }[/math]: [math]\displaystyle{ M }[/math] appears in our formula for [math]\displaystyle{ G }[/math], and our target-interval set [math]\displaystyle{ \mathrm{T} }[/math] was our source of intervals for our set of unchanged-interval bases. Notably [math]\displaystyle{ W }[/math] is missing from that list of inputs affecting our results. So at this point, it doesn't seem to matter what our damage weight slope is (or what the complexity function used for it is, if other than log-product complexity); this list of candidate [math]\displaystyle{ G }[/math]'s is valid in any case of [math]\displaystyle{ W }[/math]. But don't worry; [math]\displaystyle{ W }[/math] will definitely affect the results soon; actually, it comes into play in the next step.

Find damages at points

As the next step, we find the [math]\displaystyle{ 1 }[/math]-sum of the damages to the target-interval set for each of those tunings. We'll work through one example. Let's just grab that third [math]\displaystyle{ G }[/math], then, the one with [math]\displaystyle{ \frac21 }[/math] and [math]\displaystyle{ \sqrt[3]{\frac{10}{3}} }[/math].

This is one way to write the formula for the damages of a tuning of a temperament, in weighted cents. You can see the close resemblance to the expression shared earlier in the Algebraic setup section:


[math]\displaystyle{ \textbf{d} = |\,𝒋GM\mathrm{T}W - 𝒋G_{\text{j}}M_{\text{j}}\mathrm{T}W\,| }[/math]


As discussed in Dave Keenan & Douglas Blumeyer's guide to RTT/Tuning fundamentals#Absolute errors, these vertical bars mean to take the absolute value of each entry of this vector, not to take its magnitude.

As discussed elsewhere, we can simplify this to:


[math]\displaystyle{ \textbf{d} = |\,𝒋(GM - G_{\text{j}}M_{\text{j}})\mathrm{T}W\,| }[/math]


So here's that. Since we've gone with simplicity-weight damage here, we'll be using [math]\displaystyle{ S }[/math] to represent our simplicity-weight matrix rather than the generic [math]\displaystyle{ W }[/math] for weight matrix:


[math]\displaystyle{ \textbf{d} = \Huge | \scriptsize \begin{array} {ccc} 𝒋 \\ \left[ \begin{array} {rrr} 1200.000 & 1901.955 & 2786.314 \\ \end{array} \right] \end{array} ( \begin{array} {ccc} G \\ \left[ \begin{array} {rrr} 1 & \frac13 \\ 0 & {-\frac13} \\ 0 & \frac13 \\ \end{array} \right] \end{array} \begin{array} {ccc} M \\ \left[ \begin{array} {rrr} 1 & 1 & 0 \\ 0 & 1 & 4 \\ \end{array} \right] \end{array} - \begin{array} {ccc} I \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right] \end{array} ) \begin{array} {ccc} \mathrm{T} \\ \left[ \begin{array} {r|r|r|r|r|r|r|r} \;\;1 & \;\;\;0 & {-1} & 2 & {-1} & 0 & {-2} & 1 \\ 0 & 1 & 1 & {-1} & 0 & {-1} & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & {-1} \\ \end{array} \right] \end{array} \begin{array} {ccc} S \\ \left[ \begin{array} {rrr} \frac{1}{\log_2(2)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\log_2(3)} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\log_2(6)} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\log_2(12)} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\log_2(10)} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(15)} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(20)} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(30)} \\ \end{array} \right] \end{array} \Huge | }[/math]


Let's start chipping away at this from the left. As our first act, let's consolidate [math]\displaystyle{ 𝒋 }[/math]:


[math]\displaystyle{ \textbf{d} = \Huge | \scriptsize \begin{array} {ccc} 𝒋 \\ \left[ \begin{array} {rrr} 1200 & 1901.955 & 2786.314 \\ \end{array} \right] \end{array} ( \begin{array} {ccc} G \\ \left[ \begin{array} {rrr} 1 & \frac13 \\ 0 & {-\frac13} \\ 0 & \frac13 \\ \end{array} \right] \end{array} \begin{array} {ccc} M \\ \left[ \begin{array} {rrr} 1 & 1 & 0 \\ 0 & 1 & 4 \\ \end{array} \right] \end{array} - \begin{array} {ccc} I \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right] \end{array} ) \begin{array} {ccc} \mathrm{T} \\ \left[ \begin{array} {r|r|r|r|r|r|r|r} \;\;1 & \;\;\;0 & {-1} & 2 & {-1} & 0 & {-2} & 1 \\ 0 & 1 & 1 & {-1} & 0 & {-1} & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & {-1} \\ \end{array} \right] \end{array} \begin{array} {ccc} S \\ \left[ \begin{array} {rrr} \frac{1}{\log_2(2)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\log_2(3)} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\log_2(6)} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\log_2(12)} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\log_2(10)} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(15)} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(20)} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(30)} \\ \end{array} \right] \end{array} \Huge | }[/math]


Distribute the [math]\displaystyle{ 𝒋 }[/math]. We find [math]\displaystyle{ 𝒋GM = 𝒕 }[/math], the tempered-prime tuning map, and [math]\displaystyle{ 𝒋G_{\text{j}}M_{\text{j}} = 𝒋 }[/math], the just-prime tuning map.


[math]\displaystyle{ \textbf{d} = \Huge | \scriptsize ( \begin{array} {ccc} 𝒕 \\ \left[ \begin{array} {rrr} 1200.000 & 1894.786 & 2779.144 \\ \end{array} \right] \end{array} - \begin{array} {ccc} 𝒋 \\ \left[ \begin{array} {rrr} 1200 & 1901.955 & 2786.314 \\ \end{array} \right] \end{array} ) \begin{array} {ccc} \mathrm{T} \\ \left[ \begin{array} {r|r|r|r|r|r|r|r} \;\;1 & \;\;\;0 & {-1} & 2 & {-1} & 0 & {-2} & 1 \\ 0 & 1 & 1 & {-1} & 0 & {-1} & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & {-1} \\ \end{array} \right] \end{array} \begin{array} {ccc} S \\ \left[ \begin{array} {rrr} \frac{1}{\log_2(2)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\log_2(3)} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\log_2(6)} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\log_2(12)} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\log_2(10)} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(15)} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(20)} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(30)} \\ \end{array} \right] \end{array} \Huge | }[/math]


And now we can replace [math]\displaystyle{ 𝒕 - 𝒋 }[/math] with a single variable [math]\displaystyle{ 𝒓 }[/math], which represents the retuning map, which unsurprisingly is just the map which tells us by how much to retune (mistune) each of the primes (this object will come up a lot more when working with all-interval tuning schemes).


[math]\displaystyle{ \textbf{d} = \Huge | \scriptsize \begin{array} {ccc} 𝒓 \\ \left[ \begin{array} {rrr} 0.000 & {-7.169} & {-7.169} \\ \end{array} \right] \end{array} \begin{array} {ccc} \mathrm{T} \\ \left[ \begin{array} {r|r|r|r|r|r|r|r} \;\;1 & \;\;\;0 & {-1} & 2 & {-1} & 0 & {-2} & 1 \\ 0 & 1 & 1 & {-1} & 0 & {-1} & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & {-1} \\ \end{array} \right] \end{array} \begin{array} {ccc} S \\ \left[ \begin{array} {rrr} \frac{1}{\log_2(2)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\log_2(3)} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\log_2(6)} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\log_2(12)} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\log_2(10)} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(15)} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(20)} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(30)} \\ \end{array} \right] \end{array} \Huge | }[/math]


And multiplying that by our [math]\displaystyle{ \mathrm{T} }[/math] gives us [math]\displaystyle{ \textbf{e} }[/math], the target-interval error list:


[math]\displaystyle{ \textbf{d} = \Huge | \scriptsize \begin{array} {ccc} \textbf{e} \\ \left[ \begin{array} {rrr} 0.000 & {-7.169} & {-7.169} & 7.169 & {-7.169} & 0.000 & {-7.169} & 0.000 \\ \end{array} \right] \end{array} \begin{array} {ccc} S \\ \left[ \begin{array} {rrr} \frac{1}{\log_2(2)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\log_2(3)} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\log_2(6)} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\log_2(12)} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\log_2(10)} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(15)} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(20)} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(30)} \\ \end{array} \right] \end{array} \Huge | }[/math]


Our weights are all positive. The important part is to take the absolute value of the errors. So we can take care of that and get [math]\displaystyle{ |\textbf{e}|S }[/math]:


[math]\displaystyle{ \textbf{d} = \scriptsize \begin{array} {ccc} |\textbf{e}| \\ \left[ \begin{array} {rrr} |0.000| & |{-7.169}| & |{-7.169}| & |7.169| & |{-7.169}| & |0.000| & |{-7.169}| & |0.000| \\ \end{array} \right] \end{array} \begin{array} {ccc} S \\ \left[ \begin{array} {rrr} \frac{1}{\log_2(2)} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\log_2(3)} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\log_2(6)} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\log_2(12)} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\log_2(10)} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(15)} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(20)} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\log_2(30)} \\ \end{array} \right] \end{array} }[/math]


And now we multiply that by the weights to get the damages, [math]\displaystyle{ \textbf{d} }[/math].


[math]\displaystyle{ \textbf{d} = \scriptsize \left[ \begin{array} {rrr} 0.000 & 4.523 & 2.773 & 2.000 & 2.158 & 0.000 & 1.659 & 0.000 \\ \end{array} \right] }[/math]


And finally since this tuning scheme is all about the sum of damages, we're actually looking for [math]\displaystyle{ \llzigzag \textbf{d} \rrzigzag _1 }[/math]. So we total these up, and get our final answer: 0.000 + 4.523 + 2.773 + 2.000 + 2.158 + 0.000 + 1.659 + 0.000 = 13.114. And that's in units of simplicity-weighted cents, ¢(S), by the way.

Choose the winner

Now, if we repeat that entire damage calculation process for every one of the eleven tunings we identified as candidates for the miniaverage, then we'd have found the following list of tuning damages: 21.338, 9.444, 13.114, 10.461, 15.658, 10.615, 50.433, 26.527, 25.404, 33.910, and 80.393. So 13.114 isn't bad, but it's apparently not the best we can do. That honor goes to the second tuning there, which has only 9.444 ¢(S) total damage.

Lo and behold, if we cross reference that with our list of [math]\displaystyle{ G }[/math] candidates from earlier, the second one is quarter-comma meantone, the tuning where the fifth is exactly the fourth root of five:


[math]\displaystyle{ G = \left[ \begin{array} {rrr} 1 & 0 \\ 0 & 0 \\ 0 & \frac14 \\ \end{array} \right] }[/math]


Often people will prefer to have the tuning in terms of the cents sizes of the generators, which is our generator tuning map [math]\displaystyle{ 𝒈 }[/math][note 3], but again we can find that as easily as [math]\displaystyle{ 𝒋G }[/math]:


[math]\displaystyle{ 𝒈 = \begin{array} {ccc} 𝒋 \\ \left[ \begin{array} {rrr} 1200.000 & 1901.955 & 2786.314 \\ \end{array} \right] \end{array} \begin{array} {ccc} G \\ \left[ \begin{array} {rrr} 1 & 0 \\ 0 & 0 \\ 0 & \frac14 \\ \end{array} \right] \end{array} }[/math]


And that works out to ⟨1200.000 696.578].

Tie-breaking

With the 6-TILT miniaverage tuning of meantone (with simplicity-weight damage), we've solved for a unique tuning based on [math]\displaystyle{ G }[/math] that miniaverages the damage to this temperament [math]\displaystyle{ M }[/math].

But sometimes we have a tie between tunings for least average damage, though. For example, if we had we done a unity-weight tuning, in which case [math]\displaystyle{ W = I }[/math], and included the interval [math]\displaystyle{ \frac85 }[/math] in our set, we would have found that quarter-comma meantone tied with another tuning, one with generators of [math]\displaystyle{ \sqrt[5]{\frac{2560}{81}} }[/math] and [math]\displaystyle{ \sqrt[5]{\frac{200}{27}} }[/math], which are approximately 1195.7 ¢ and 693.352 ¢.

In this case, we fall back to our general method, which is equipped to find the true optimum somewhere in between these two extreme ends of goodness, albeit as an approximate solution.[note 4] This method is discussed here: power limit method. Or, if you'd like a refresher on how to think about non-unique tunings, please see Dave Keenan & Douglas Blumeyer's guide to RTT/Tuning fundamentals#Non-unique tunings.

We note that there may be a way to find an exact solution to a nested miniaverage, in a similar fashion to the nested minimax discussed in the coinciding-damage method section below, but it raises some conceptual issues about what a nested miniaverage even means.[note 5] We have done some pondering of this problem but it remains open; we didn't prioritize solving it, on account of the fact that nobody uses miniaverage tunings anyway.

With held-intervals

The zero-damage method is easily modified to handle held-intervals along with target-intervals.[note 6] In short, rather than assembling our set of unchanged-interval bases [math]\displaystyle{ \mathrm{U}_1 }[/math] through [math]\displaystyle{ \mathrm{U}_n }[/math] (where [math]\displaystyle{ n = {{k}\choose{r}} }[/math]) corresponding to the zero-damage points by finding every combination of [math]\displaystyle{ r }[/math] different ones of our [math]\displaystyle{ k }[/math] target-intervals (one for each generator to be responsible for tuning exactly), instead we must first reserve [math]\displaystyle{ h }[/math] (held-unchanged-interval count) columns of each [math]\displaystyle{ \mathrm{U}_n }[/math] for the held-intervals, leaving only the remaining [math]\displaystyle{ r - h }[/math] columns to be assembled from the target-intervals as normal. So, we'll only have [math]\displaystyle{ {{k}\choose{r - h}} }[/math] candidate tunings / zero-damage points / unchanged-interval bases in this case.

In other words, if [math]\displaystyle{ \mathrm{U}_n }[/math] is one of the unchanged-interval bases characterizing a candidate miniaverage tuning, then it must contain [math]\displaystyle{ \mathrm{H} }[/math] itself, the held-interval basis, which does not yet fully characterize our tuning, leaving some wiggle room (otherwise we'd just use the "only held-intervals" approach, discussed later).

For example, if seeking a held-octave miniaverage tuning of a 5-limit, rank-2 temperament with the 6-TILT as our target-interval set, then [math]\displaystyle{ h = 1 }[/math] (only the octave), [math]\displaystyle{ k = 8 }[/math] (there's 8 target-intervals in the 6-TILT), and [math]\displaystyle{ r = 2 }[/math] (meaning of "rank-2"). So we're looking at [math]\displaystyle{ {{k}\choose{r - h}} = {{(8)}\choose{(2) - (1)}} = {{8}\choose{1}} = 8 }[/math] unchanged-interval bases. That's significantly less than the [math]\displaystyle{ {{8}\choose{2}} = 28 }[/math] we had to slog through when [math]\displaystyle{ h = 0 }[/math] in the earlier example, so this will be much faster to compute. All we're doing here, really, is checking each possible tuning where we pair one of our target-intervals with the octave as our unchanged-interval basis.

So, with our unchanged-interval basis (colorized to grey to help visualize its presence in the upcoming steps):


[math]\displaystyle{ \begin{array} {c} \mathrm{U} \\ \ \ \begin{array} {rrr} \frac21 \\ \end{array} \\ \left[ \begin{array} {rrr} \style{background-color:#D3D3D3;padding:5px}{1} \\ \style{background-color:#D3D3D3;padding:5px}{0} \\ \style{background-color:#D3D3D3;padding:5px}{0} \\ \end{array} \right] \end{array} }[/math]


We have the unchanged-interval bases for our zero-damage points:


[math]\displaystyle{ \small \begin{array} {c} \mathrm{U}_{(1)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac21 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#F69289;padding:5px}{1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#F69289;padding:5px}{0} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#F69289;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(2)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#FDBC42;padding:5px}{0} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#FDBC42;padding:5px}{1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#FDBC42;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(3)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac43 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#FFF200;padding:5px}{-1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#FFF200;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(4)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac43 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{2} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{-1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(5)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac52 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#3FBC9D;padding:5px}{-1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{0} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#3FBC9D;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(6)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#41B0E4;padding:5px}{0} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{-1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#41B0E4;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(7)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac54 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#7977B8;padding:5px}{-2} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{0} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#7977B8;padding:5px}{1} \\ \end{array} \right] \end{array} , \begin{array} {c} \mathrm{U}_{(8)} \\ \ \ \begin{array} {rrr} \frac21 & \ \ \frac65 \\ \end{array} \\ \left[ \begin{array} {r|r} \style{background-color:#D3D3D3;padding:5px}{1} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{1} \\ \style{background-color:#D3D3D3;padding:5px}{0} & \style{background-color:#D883B7;padding:5px}{-1} \\ \end{array} \right] \end{array} }[/math]


(Note that [math]\displaystyle{ \mathrm{U}_{(1)} }[/math] here pairs [math]\displaystyle{ \frac21 }[/math] with [math]\displaystyle{ \frac21 }[/math]. That's because the octave happens to appear both in our held-interval basis [math]\displaystyle{ \mathrm{H} }[/math] and our target-interval list [math]\displaystyle{ \mathrm{T} }[/math]. We could have chosen to remove [math]\displaystyle{ \frac21 }[/math] from [math]\displaystyle{ \mathrm{T} }[/math] upon adding it to [math]\displaystyle{ \mathrm{H} }[/math], because once you're insisting a particular interval takes no damage there's no sense also including it in a list of intervals to minimize damage to. But we chose to leave [math]\displaystyle{ \mathrm{T} }[/math] alone to make our points above more clearly, i.e. with [math]\displaystyle{ k }[/math] remaining equal to [math]\displaystyle{ 8 }[/math].)[note 7]

Now we canonicalize (no need for color anymore; the point has been made about the combinations of target-intervals with held-intervals):


[math]\displaystyle{ \begin{array} {c} \ \ \begin{array} {rrr} \frac21 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 \\ 0 \\ 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} }[/math]


Note that [math]\displaystyle{ \mathrm{U}_1 }[/math], the one which had two copies of the octave, has been canonicalized down to a single column, because its vectors are obviously not linearly independent. So it will be filtered out in the next step. Actually, since that's the only eliminated point, let's go ahead and do the next step too, which is deduping; we have a lot of dupes:


[math]\displaystyle{ \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac53 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & {-1} \\ 0 & 1 \\ \end{array} \right] \end{array} }[/math]


Now convert each [math]\displaystyle{ \mathrm{U}_i }[/math] to a [math]\displaystyle{ G_i }[/math]:


[math]\displaystyle{ \begin{array} {c} \ \ \begin{array} {rrr} \frac{2}{1} & \frac{3}{2} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & {-1} \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{2}{1} & \sqrt[4]{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 \\ 0 & 0 \\ 0 & \frac14 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \sqrt[3]{\frac{10}{3}} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & \frac13 \\ 0 & {-\frac13} \\ 0 & \frac13 \\ \end{array} \right] \end{array} }[/math]


And convert those to generator tuning maps: ⟨1200 701.955], ⟨1200 696.578], and ⟨1200 694.786]. Note that every one of these has a pure-octave period. Then check the damage sums: 353.942 ¢(U), 89.083 ¢(U), and 110.390 ¢(U), respectively. So that tells us that we want the middle result of these three, ⟨1200 696.578], as the minimization of the [math]\displaystyle{ 1 }[/math]-mean of unity-weight damage to the 6-TILT, when we're constrained to the octave being unchanged.

For a rank-3 temperament, with 2 held-intervals, we'd again have 8 choose 1 = 8 tunings to check. With 1 held-interval, we'd have 8 choose 2 = 28 tunings to check.

For all-interval tuning schemes

We can adapt the zero-damage method to compute all-interval tuning schemes where the dual norm power [math]\displaystyle{ \text{dual}(q) }[/math] is equal to [math]\displaystyle{ 1 }[/math]..

Maxization

Per the heading of this section, we might call these "minimax-MS" schemes, where the 'M' here indicates that their interval complexity functions have been "maxized", as opposed to "Euclideanized"; that is, the power and matching root from their norm or summation form has been changed to [math]\displaystyle{ ∞ }[/math] instead of to [math]\displaystyle{ 2 }[/math]. "Maxization" can be thought of as a reference to the fact that distance measured by [math]\displaystyle{ ∞ }[/math]-norms (maxes, remember) resembles distance traveled by "Max the magician" to get from point A to point B; he can teleport through all dimensions except the one he needs to travel furthest in, i.e. the maximum distance he had to go in any one dimension, is the defining distance. (To complete the set, the [math]\displaystyle{ 1 }[/math]-norms could be referred to as "taxicabized", referencing that this is the type of distance a taxicab on a grid of streets would travel… though would these tunings really be "-ized" if this is the logical starting point?)

And to be clear, the [math]\displaystyle{ \textbf{i} }[/math]-norm is maxized here—has norm power [math]\displaystyle{ ∞ }[/math]—because the norm power on the retuning magnitude is [math]\displaystyle{ 1 }[/math], and these norm powers must be duals.

Tuning schemes such as these are not very popular, because where Euclideanizing [math]\displaystyle{ \text{lp-C}() }[/math] already makes tunings less psychoacoustically plausible, maxizing it makes tunings even less plausible.

Example

Let's compute the minimax-MS tuning of meantone temperament. We begin by assembling our list of unchanged-interval bases. This list will be much shorter than it was with ordinary tuning schemes, because the size of this list increases combinatorially with the count of target-intervals, and with only three (proxy) target-intervals here for a 5-limit temperament.


[math]\displaystyle{ \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac31 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 1 & 0 \\ 0 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac31 & \ \ \frac51 \\ \end{array} \\ \left[ \begin{array} {r|r} 0 & 0 \\ 1 & 0 \\ 0 & 1 \\ \end{array} \right] \end{array} }[/math]

Neither the canonicalizing, filtering deficient matrices, nor the de-duping steps will have any effect for all-interval tuning computations. Any combination from the set of prime intervals will already be in canonical form, full-column-rank, and distinct from any other combination. Easy peasy.

So now we convert to generators, using the [math]\displaystyle{ G = \mathrm{U}(M\mathrm{U})^{-1} }[/math] trick:


[math]\displaystyle{ \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \frac32 \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & {-1} \\ 0 & 1 \\ 0 & 0 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac21 & \ \ \sqrt[4]{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 \\ 0 & 0 \\ 0 & \frac14 \\ \end{array} \right] \end{array} , \begin{array} {c} \ \ \begin{array} {rrr} \frac{3}{\sqrt[4]{5}} & \ \ \sqrt[4]{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 0 & 0 \\ 1 & 0 \\ {-\frac14} & \frac14 \\ \end{array} \right] \end{array} }[/math]


So these are our candidate generator embeddings. In other words, if we seek to minimize the [math]\displaystyle{ 1 }[/math]-norm of the retuning map for meantone temperament, these are 3 pairs of generators we should check. Though remember we can simplify to checking the [math]\displaystyle{ 1 }[/math]-sum, which is just another way of saying the sum of the retunings. So each of these generator pairs corresponds to a pair of primes being tuned pure, because these are the tunings where the sum of retunings is minimized.

If we want primes 2 and 3 to both be pure, we use generators of [math]\displaystyle{ \frac21 }[/math] and [math]\displaystyle{ \frac32 }[/math] (Pythagorean tuning). If we want primes 2 and 5 to be pure, we use generators of [math]\displaystyle{ \frac21 }[/math] and [math]\displaystyle{ \sqrt[4]{5} }[/math] (quarter-comma tuning). If we want primes 3 and 5 to be pure, we use generators [math]\displaystyle{ \frac{3}{\sqrt[4]{5}} ≈ 2.006 }[/math] and [math]\displaystyle{ \sqrt[4]{5} }[/math] (apparently named "quarter-comma 3eantone" tuning).

We note that at the analogous point in the zero-damage method for ordinary tunings, we pointed out that the choice of [math]\displaystyle{ W }[/math] was irrelevant up to this point; similarly, here, the choice of [math]\displaystyle{ S }[/math] has thus far been irrelevant, though it will certainly affect things in the next step.

To decide between these candidates, we check each of them for the magnitude of the error on the primes.

  • Pythagorean tuning causes a magnitude of 9.262 ¢/oct of error (all on prime 5).
  • Quarter-comma tuning causes a magnitude of 3.393 ¢/oct of error (all on prime 3).
  • Quarter-comma 3eantone tuning causes a magnitude of 5.377 ¢/oct of error (all on prime 2).

And so quarter-comma tuning is our winner with the least retuning magnitude. That's the minimax-MS tuning of meantone.

Footnotes

  1. ↑ Another reason we wrote the method for this optimization power up is because it was low-hanging fruit, on account of the fact that it was already described on the wiki in the Target tunings page, where it is presented as a method for finding "minimax" tunings, not miniaverage tunings. This is somewhat misleading, because while this method works for any miniaverage tuning scheme, it only works for some minimax tuning schemes under very specific conditions (which that page does meet, and so it's not outright wrong). The conditions are: unity-weight damage (check), and all members of the target-interval set expressible as products of other members (check, due to their choice of target-interval set, closely related to a tonality diamond, plus octaves are constrained to be unchanged). The reason why these are the two necessary conditions for this miniaverage method working for a minimax tuning scheme is because when you are solving for the minimax, you actually want the tunings where the target-intervals' damages equal each other, not where they are zero, and these zero-damage tunings will only match the tunings where other intervals' damages equal each other in the case where two intervals' damages being equal implies that another target's damage is zero, because that other target is the product of those first two; and the unity-weight damage requirement is to ensure that the slopes of each target's hyper-V are all the same, because otherwise the points where two damages are equal like this will no longer line up directly over the point where the third target's damage is zero. For more information on this problem, please see the discussion page for the problematic wiki page, where we are currently requesting the page be updated accordingly.
  2. ↑ Note that this technique for converting zero-damage points to generator tunings is much simpler than the technique described on the Target tunings page. The Target tunings page uses eigendecomposition, which unnecessarily requires you to find the commas for the temperament, compute a full projection matrix [math]\displaystyle{ P }[/math], and then when you need to spit a generator tuning map [math]\displaystyle{ 𝒈 }[/math] out at the end, requires the computation of a generator detempering to do so (moreover, it doesn't explain or even mention eigendecomposition; it assumes the reader knows how and when to do them, cutting off at the point of listing the eigenvectors—a big thanks to Sintel for unpacking the thought process in that article for us). The technique described here skips the commas, computing the generator embedding [math]\displaystyle{ G }[/math] directly rather than via [math]\displaystyle{ P = GM }[/math], and then when you need to spit a generator tuning map out at the end, it's just [math]\displaystyle{ 𝒈 = 𝒋G }[/math], which is much simpler than the generator detempering computation.

    The Target tunings approach and this approach are quite similar conceptually. Here's the Target tunings approach:

    [math]\displaystyle{ \scriptsize \begin{array} {c} P \\ \left[ \begin{array} {rrr} 1 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & \frac14 & 1 \\ \end{array} \right] \end{array} = \\ \scriptsize \begin{array} {c} \mathrm{V} \\ \left[ \begin{array} {r|r|r} \style{background-color:#98CC70;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#F2B2B4;padding:5px}{-4} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#F2B2B4;padding:5px}{4} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{1} & \style{background-color:#F2B2B4;padding:5px}{-1} \\ \end{array} \right] \end{array} \begin{array} {c} \textit{Λ} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{array} \right] \end{array} \begin{array} {c} \mathrm{V} \\ \left[ \begin{array} {r|r|r} \style{background-color:#98CC70;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#F2B2B4;padding:5px}{-4} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#F2B2B4;padding:5px}{4} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{1} & \style{background-color:#F2B2B4;padding:5px}{-1} \\ \end{array} \right]^{{\Large-1}} \end{array} }[/math]

    And the technique demonstrated here looks like this:

    [math]\displaystyle{ \scriptsize \begin{array} {c} G \\ \left[ \begin{array} {rrr} 1 & 1 \\ 0 & 0 \\ 0 & \frac14 \\ \end{array} \right] \end{array} = \\ \scriptsize \begin{array} {c} \mathrm{U} \\ \left[ \begin{array} {r|r} \style{background-color:#98CC70;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{1} \\ \end{array} \right] \end{array} \Large ( \scriptsize \begin{array} {c} M \\ \left[ \begin{array} {rrr} 1 & 0 & {-4} \\ 0 & 1 & 4 \\ \end{array} \right] \end{array} \begin{array} {c} \mathrm{U} \\ \left[ \begin{array} {r|r} \style{background-color:#98CC70;padding:5px}{1} & \style{background-color:#98CC70;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{0} \\ \style{background-color:#98CC70;padding:5px}{0} & \style{background-color:#98CC70;padding:5px}{1} \\ \end{array} \right] \end{array} \Large )^{-1} \scriptsize }[/math]

    So in the Target tunings approach, [math]\displaystyle{ P }[/math] is the projection matrix, [math]\displaystyle{ \mathrm{V} }[/math] is a matrix consisting of a list of unrotated vectors—both ones with scaling factor 1 (unchanged-intervals) and those with scaling factor 0 (commas)—and [math]\displaystyle{ \textit{Λ} }[/math] is a diagonal scaling factors matrix, where you can see along the main diagonal we have 1's paired with the unrotated vectors for unchanged-intervals and 0's paired with the unrotated vectors for commas.

    In our approach, we instead solve for [math]\displaystyle{ G }[/math] by leaving the commas out of the equation, and simply using the mapping [math]\displaystyle{ M }[/math] instead.

    In addition to being much more straightforward and easier to understand, our technique gives the same results and reduces computation time by 50% (it took the computation of a miniaverage-U tuning for a rank-3, 11-limit temperament with 15 target-intervals from 12 seconds down to 8).
  3. ↑ Technically this gives us the tunings of the generators, in ¢/g.
  4. ↑ The article for the minimax tuning scheme, Target tunings, suggests that you fall back to the miniRMS method to tie-break between these, but that sort of misses the point of the problem. The two tied points are on extreme opposite ends of the slice of good solutions, and the optimum solution lies somewhere in between them. We don't want the tie-break to choose one or the other extreme; we want to find a better solution somewhere in between them.
  5. ↑ There does not seem to be any consensus about how to identify a true optimum in the case of multiple solutions when [math]\displaystyle{ p=1 }[/math]. See https://en.wikipedia.org/wiki/Least_absolute_deviations#Properties, https://www.researchgate.net/publication/223752233_Dealing_with_the_multiplicity_of_solutions_of_the_l1_and_l_regression_models, and https://stats.stackexchange.com/questions/275931/is-it-possible-to-force-least-absolute-deviations-lad-regression-to-return-the.
  6. ↑ In fact, the Target tunings page of the wiki uses this more complicated approach in order to realize pure octaves, and so the authors of this page had to reverse engineer from it how to make it work without any held-intervals.
  7. ↑ Held-intervals should generally be removed if they also appear in the target-interval list [math]\displaystyle{ \mathrm{T} }[/math]. If these intervals are not removed, the correct tuning can still be computed; however, during optimization, effort will have been wasted on minimizing damage to these intervals, because their damage would have been held to 0 by other means anyway. In general, it should be more computationally efficient to remove these intervals from [math]\displaystyle{ \mathrm{T} }[/math] in advance, rather than submit them to the optimization procedures as-is. Duplication of intervals between these two sets will most likely occur when using a target-interval set scheme (such as a TILT or OLD) that automatically chooses the target-interval set.