BOP tuning: Difference between revisions

Mike Battaglia (talk | contribs)
Mike Battaglia (talk | contribs)
Line 27: Line 27:




Now, if our weighting matrix is the usual <math>1/log(p)</math> Tenney-weighting matrix, then the above is equivalent to [[Paul Erlich]]'s theorem that the tuning that minimizing the max Tenney-weighted error on the primes also minimizes the max Tenney-weighted error on all intervals. This is called the [[TOP tuning]]. However, if we instead change the weighting matrix to <math>1/p^s</math> instead, then our Linf norm will be dual to a different, somewhat unusual weighted L1 norm on monzos: the one where the weighting on the primes is given by <math>p^s</math>, and the weighting for an arbitrary monzo <math>m = |a\, b\, c\, ...\rangle</math> is given by
Now, if our weighting matrix is the usual <math>1/\log(p)</math> Tenney-weighting matrix, then the above is equivalent to [[Paul Erlich]]'s theorem that the tuning that minimizing the max Tenney-weighted error on the primes also minimizes the max Tenney-weighted error on all intervals. This is called the [[TOP tuning]]. However, if we instead change the weighting matrix to <math>1/p^s</math> instead, then our Linf norm will be dual to a different, somewhat unusual weighted L1 norm on monzos: the one where the weighting on the primes is given by <math>p^s</math>, and the weighting for an arbitrary monzo <math>m = |a\, b\, c\, ...\rangle</math> is given by


<math>\text{sopfr}^s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ...</math>
<math>\text{sopfr}^s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ...</math>
Line 36: Line 36:




We now want to show that minimizing the max weighted-error according to this strangely weighted L1 norm is equivalent to minimizing the max weighted-error according to the true weighting that we want. To do this, we consider what happens to the evaluation of max-weighted error on all rationals, for any given tuning, if we keep the tuning as is but simply change the weighting on the rationals to the thing we want. To prove our result, we need only show that
We now want to show that the max weighted-error according to this strangely weighted L1 norm is equivalent to the max weighted-error according to the true weighting that we want. To do this, we consider what happens, for any particular tuning, if we simply switch weighting schemes on the rationals to the thing we want. How does this re-weighting change our evaluation of the error of that tuning? To prove our result, we need only show that


1. Changing the weighting scheme to the thing we want does not make the max weighted error on all rationals any better
# Changing the weighting scheme to the thing we want does not make the max weighted error on all rationals any better
2. Likewise, it doesn't make it any worse
# Likewise, it doesn't make it any worse


The first part is easy: for any tuning map, we know that the max "strange L1"-weighted error is equal to that of one of the primes, and we know that the primes agree in weighting on both metrics. Since we know that the weighting on the worst prime doesn't change, we know that after we switch weightings, the new max error can be no better than the thing we had.
The first part is easy: for any tuning map, we know that the max "strange L1"-weighted error is equal to that of one of the primes, and we know that the primes agree in weighting on both metrics. Since we know that the weighting on the worst prime doesn't change, we know that after we switch weightings, the new max error can be no better than the thing we had before.


To show the second part, all we need to show is that all rationals are weighted more '''strongly''' with our strange L1 metric than with the true metric we want. In particular, we want to show the following:
To show the second part, all we need to show is that all rationals are weighted ''more strongly'' with our strange L1 metric than with the true metric we want. In particular, we want to show the following:


<math>\text{sopfr}^s(n/d) \leq (n/d)^s</math>
<math>\text{sopfr}^s(n/d) \leq (n/d)^s</math>


where the left hand side is our strange metric and the right hand side is the true metric. Since we are ''dividing'' by this weighting, for any rational, the weighted error for the same amount of mistuning will be larger given the weighting scheme on the left than the weighting scheme on the right. This means that we have
where the left hand side is our strange metric and the right hand side is the true metric. Since we are ''dividing'' by this weighting, for any rational, the weighted error for the same amount of mistuning will be larger given the weighting scheme on the left than the weighting scheme on the right. That is, the above would entail we have


<math>\frac{\text{err}_{n/d}}{\text{sopfr}^s(n/d)} \geq \frac{\text{err}_{n/d}}{(n/d)^s}</math>
<math>\frac{\text{err}_{n/d}}{\text{sopfr}^s(n/d)} \geq \frac{\text{err}_{n/d}}{(n/d)^s}</math>


To show this is fairly easy. Remember our definition of the strange L1 metric:
Where that <math>\text{err}_{n/d}</math> denotes unweighted error (which is the same on both sides, as we are not changing the tuning, just the weighting).
 
If we can show the above, this means we have shown that after re-weighting, the weighted error on all rationals goes ''down'' -- except at the primes, where the error (and in particular the worst error) remains the same. This would give us our desired result.
 
 
The proof is fairly easy. Remember our definition of the strange L1 metric:


<math>\text{sopfr}^s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ...</math>
<math>\text{sopfr}^s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ...</math>
Line 70: Line 75:
# Since the nonzero terms on the left side are strictly positive, their sum must be less than their product, which is in turn less than the product of the associated "true" terms given above.
# Since the nonzero terms on the left side are strictly positive, their sum must be less than their product, which is in turn less than the product of the associated "true" terms given above.


As a result, we have shown that for any particular tuning map, the max weighted error according to our strange L1 weighting will be the max weighted error according to the true metric we want: it gets no better and gets no worse. Since both are given by the Linf norm on error maps -- aka the max-abs <math>1/p^s</math> weighted error on the primes -- finding the tuning map in a particular temperament that minimizes this quantity is equivalent to finding the tuning map that minimizes the weighted error on all rationals according to ''both'' metrics.
So we have our desired result.
 


As a result, we have our main theorem:
As a result, we have shown that for any particular tuning map, the max weighted error of the primes is simultaneously the max weighted error according to ''both'' metrics - the strange one and the one we really want. This leads to our main theorem:


'''Theorem:''' to minimize the <math>1/(nd)^s</math> weighted error on all rationals, one needs only minimize the <math>1/p^s</math> weighted error on the primes.
'''Theorem:''' to minimize the <math>1/(nd)^s</math> weighted error on all rationals, one needs only minimize the <math>1/p^s</math> weighted error on the primes.