BOP tuning: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Mike Battaglia (talk | contribs)
BOP Tuning creation
 
Mike Battaglia (talk | contribs)
Line 80: Line 80:
= Proof of Optimality Even With Extra "Inconsistent" Mappings =
= Proof of Optimality Even With Extra "Inconsistent" Mappings =


It can sometimes be useful to look not just at "indirect" prime-based mappings, but also add extra "direct" mappings for important rationals -- deliberately inconsistent with the indirect ones -- for which the indirect mapping is subpar.
In the page on [[TOP_tuning#TOP_with_.22Inconsistent.22_Rational_Tuning_Extensions|TOP tuning]], it is shown that for full-limits (and certain "nice" subgroups), the TOP tuning remains optimal even if composite rationals are given extra "inconsistent" mappings, as long as the tuning on those mappings is no worse than the consistent one. Tuning maps with such a property are called '''admissible'''.


A good example of this is in 16-EDO, which has a perfectly good 9/8 at 225 cents, but which does not agree with the mapping of 3/2 at 675 cents. In this instance, the associated "2.3.5.9" sval would be <math>\langle 16\, 25\, 37\, 51|</math>, where it is seen that the mapping of 51 steps for 9 is "inconsistent" with the mapping of 25 steps for 3. Note that there is no mapping for 3 at all which will map 9/1 to 51 steps, since 51 is an odd number.
This is because the TOP tuning is the supremum of weighted error on all intervals, which is always found at a prime. Since the primes are never altered by changing composite rationals, any "improvement" will not improve on the worst weighted error, nor will it make it any worse given we only use admissible tuning maps.


It so happens that for some prime-limit temperament, the BOP tuning remains optimal even if we use "inconsistent" mappings for every possible composite rational in our prime-limit, regardless of if these are viewed as "extra" direct mappings in addition to the regular "consistent" ones, or even if we discard the original "consistent" ones entirely. More importantly, this result holds ''no matter what the inconsistent ratio mappings are'', as long as you are not changing the primes!
The same argument holds for the BOP tuning, since we again know the worst weighted error will always be found at a prime. So likewise, adding extra mappings for rationals that have better weighted error will neither increase or decrease the supremum on the entire temperament.


The one restriction we need to get this result is that we only look at tuning maps where our "inconsistent" mappings are no worse than the "consistent" ones would be. That is, if you have a tuning map with the "consistent" 9/8 tuned to 204 cents, that you don't deliberately tune the "inconsistent" 9/8 to something like 230 cents, which makes it worse for no reason.
As in the TOP case, some care is needed when extending this argument to arbitrary subgroup temperaments, as it is possible to use arbitrary mappings for rationals without requiring that the relevant primes even exist in the subgroup, so that there are no primes for them to be "inconsistent" with.


One way to express this restriction is to write it, for all rationals n/d, as
This property is particularly important for infinite-limit generalized patent vals, where it can be shown that regardless of whether ratios are mapped "consistently" via the prime mapping, or "inconsistently" to the nearest EDO-step, the same BOP tuning is optimal for all rational numbers.
 
<math>\text{directerr}(n/d) \leq \text{indirecterr}(n/d)</math>
 
where these refer to the direct and indirect ''unweighted'' error. Since the weighting doesn't change, we also have
 
<math>\frac{\text{directerr}(n/d)}{\text{true}_s(n/d)} \leq \frac{\text{indirecterr}(n/d)}{\text{true}_s(n/d)}</math>
 
As a result, we know that ''adding'' extra inconsistent rational mappings can never increase the max error, because we are only adding a new set of weighted errors that are guaranteed to be no worse than things already in the original set. As a result, the supremum of weighted error remains unchanged.
 
More subtly, we also know that ''removing'' the original rational mappings, and using ''only'' the inconsistent mappings, we get the same result. This is because the supremum is always obtained at a prime. Since the prime mappings are always consistent ''by definition'', there is no way to adjust their mapping to get an "inconsistent prime".
 
As a result, the suprema are unchanged either way.


= Applications Of The Above =
= Applications Of The Above =

Revision as of 17:06, 3 May 2019

For any temperament, the TOP tuning is the one that minimizes the max Tenney-weighted (i.e. [math]\displaystyle{ 1/\log(nd) }[/math]-weighted) error on all rationals mapped by that temperament.

It so happens that we can use the same recipe to define a closely related tuning that instead minimizes the max [math]\displaystyle{ 1/(nd)^s }[/math] weighting on all rationals, where s is a free parameter > 1. We will call this the "BOP" tuning for Benedetti Optimal.

Similarly to TOP, we will show that this is easily obtained by minimizing the max [math]\displaystyle{ 1/p^s }[/math] weighting on just the primes.

For now, we show that this result holds for all full-limits, and can be easily extended to certain "nice" subgroups. More work is needed to extend it to *all* subgroups, as well as to define an analogue to "TIPTOP".

Proof of Benedetti-Optimality On All Rationals

The proof is rather simple and similar to the TOP optimality proof.


First, we define a "naive" scaled L1 norm on monzos, where each prime is weighted p^s. We will write this naive L1 norm on a monzo as [math]\displaystyle{ \text{naive}_s(m) }[/math].

For an arbitrary monzo [math]\displaystyle{ m = |a\, b\, c\, ...\rangle }[/math], we have:

[math]\displaystyle{ \text{naive}_s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ... }[/math]


In comparison, the true weighting we want on monzos is:

[math]\displaystyle{ \text{true}_s(m) = 2^{s|a|} \cdot 3^{s|b|} \cdot 5^{s|c|} \cdot ... = 2^{s\|m\|_{T1}} }[/math]

where [math]\displaystyle{ \|...\|_{T1} }[/math] is the Tenney_Height.

Note that the true weighting is not a norm on monzos, but rather the exponential of a norm: the Tenney height. Our naive weighting agrees with the true one on the primes (and only the primes), and differs for all composite rationals.


Now, suppose [math]\displaystyle{ T }[/math] is some tuning map in weighted coordinates, giving the tuning on each prime, where the weighting is now given by the [math]\displaystyle{ 1/p^s }[/math] on the primes rather than the usual [math]\displaystyle{ 1/\log(p) }[/math]. Then we can define the associated "weighted error map" [math]\displaystyle{ E=T-J }[/math], where [math]\displaystyle{ J }[/math] is the JIP. This map gives the [math]\displaystyle{ 1/p^s }[/math]-weighted error of each prime.


We then look at the quantity

[math]\displaystyle{ \sup \frac{|\langle E|m \rangle|}{\text{naive}_s(m)} }[/math]

where [math]\displaystyle{ \langle E|m \rangle }[/math] is the signed error of the monzo m according to the error map E. This expression represents the maximum "naive"-weighted error on all rationals.

Since the naive norm is simply the L1 norm on the weighted monzos, we know via the definition of the dual norm that this is equal the Linf norm of the inverse-weighted error map. Since the Linf norm is just the max of the abs of the error map, we know that the max naive-weighted error on all rationals will be equal to the max naive-weighted error on the primes.


We now want to show that this same property holds for the true weighting we want on monzos, not the naive one. That is, we want to show:

[math]\displaystyle{ \sup \frac{|\langle E|m \rangle|}{\text{true}_s(m)} = \sup \frac{|\langle E|m \rangle|}{\text{naive}_s(m)} }[/math]

To see this, we need only to show that

  1. The max weighted error gets no better.
  2. The max weighted error gets no worse.


To show that the weighted error gets no better, we need only refer to our previous result that for any given tuning map the max "naive"-weighted error is obtained on a prime. Since the naive and true weightings are identical for primes, we know the weighted error for each prime will be identical for both metrics. Since the supremum is obtained on a prime, we know that the "true"-weighted error cannot be any better than the naive supremum.


To show the weighted error also gets no worse, we can show that for any monzo [math]\displaystyle{ m }[/math], we have

[math]\displaystyle{ \text{naive}_s(m) \leq \text{true}_s(m) }[/math]

Due to this result, we know that while the unweighted error stays the same, the weighting can only increase as we move from the "naive" to the "true" metric, so the weighted error can only go down.

To see that this inequality holds, note that we can rewrite it for some monzo [math]\displaystyle{ |a\, b\, c\, ... \rangle }[/math] as

[math]\displaystyle{ 2^s|a| + 3^s|b| + 5^s|c| + ... \leq 2^{s|a|} \cdot 3^{s|b|} \cdot 5^{s|c|} \cdot ... }[/math]


But as long as we have [math]\displaystyle{ s\geq 1 }[/math], this is easy to see because:

  1. For any particular prime [math]\displaystyle{ p }[/math] with integer coefficient [math]\displaystyle{ q }[/math], [math]\displaystyle{ p^s|q| \leq p^{s|q|} }[/math]
  2. 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 we have shown the supremum does no better and no worse, we now know that the supremums are the same. As a result, we have our main theorem:

Theorem: to minimize the [math]\displaystyle{ 1/(nd)^s }[/math] weighted error on all rationals, one needs only minimize the [math]\displaystyle{ 1/p^s }[/math] weighted error on the primes.

Extension to "Good" Subgroups

The above proof was only for prime limits. However, the above usually holds as long as you are working in a "nice" subgroup where the Tenney height looks like a scaled Lp norm. Examples include "prime power" subgroups such as 2.9.7.11. More work is needed to derive a corresponding result for non-nice subgroups.

Proof of Optimality Even With Extra "Inconsistent" Mappings

In the page on TOP tuning, it is shown that for full-limits (and certain "nice" subgroups), the TOP tuning remains optimal even if composite rationals are given extra "inconsistent" mappings, as long as the tuning on those mappings is no worse than the consistent one. Tuning maps with such a property are called admissible.

This is because the TOP tuning is the supremum of weighted error on all intervals, which is always found at a prime. Since the primes are never altered by changing composite rationals, any "improvement" will not improve on the worst weighted error, nor will it make it any worse given we only use admissible tuning maps.

The same argument holds for the BOP tuning, since we again know the worst weighted error will always be found at a prime. So likewise, adding extra mappings for rationals that have better weighted error will neither increase or decrease the supremum on the entire temperament.

As in the TOP case, some care is needed when extending this argument to arbitrary subgroup temperaments, as it is possible to use arbitrary mappings for rationals without requiring that the relevant primes even exist in the subgroup, so that there are no primes for them to be "inconsistent" with.

This property is particularly important for infinite-limit generalized patent vals, where it can be shown that regardless of whether ratios are mapped "consistently" via the prime mapping, or "inconsistently" to the nearest EDO-step, the same BOP tuning is optimal for all rational numbers.

Applications Of The Above

The above is an important result because it tells us, as the prime limit goes to infinity, that the same BOP tuning minimizes the max [math]\displaystyle{ 1/(nd)^s }[/math]-weighted error on all intervals regardless of whether the mappings used are entirely prime-based and consistent, entirely "direct" and inconsistent, an amalgamation of direct and indirect mappings, etc. No matter how you do it, the worst Tenney-weighted error can never be worse than that of the worst prime.

As a simpler example, this guarantees that the BOP tuning for 2.3.5.9 16-EDO, with the inconsistent mapping of 57 steps on the 9/1, is the same as the 2.3.5 tuning for 16-EDO.