User:Overthink/The circle of relative error: Difference between revisions

Overthink (talk | contribs)
Overthink (talk | contribs)
added more theory
Line 1: Line 1:
== Introduction ==
[[File:Graph Harmonic Error 12et.png|alt=12edo 3: +2.0% 5: +13.7% 7: +31.2% 9: +3.9% 11: +48.7% 13: -40.5% 15: +11.7%|thumb|383x383px|Relative error of harmonics in 12edo]]In an [[equal temperament]], [[relative error]] is the amount by which the [[mapping]] of an interval or harmonic deviates from its [[Just intonation point|just value]]. For example, in [[12edo]] the relative error of [[3/2]] is -2.0%, and the relative error of  [[5/4]] is +13.7%. We can plot the relative error of harmonics in a graph like the one on the right. This graph lets us calculate the relative error of intervals. For example, the relative error of [[6/5]] is 13.7%-(-2.0%)=15.6% (not 15.7% due to rounding error). Note that absolute error can be found by multiplying the relative error by the equal division's step size, and in 12edo absolute and relative error are identical. However, one may not always want to use the nearest approximation of every harmonic. For example, in 12edo, using the second best approximation for harmonic 13 (relative error +59.5%) actually gives us less error overall due to cancellation of errors between harmonics. As an example, the relative error of 13/11 in this mapping is 59.5%-48.7%=10.8%. Compare this to the [[patent val]], where all primes use their nearest mappings, where 13/11 has an error of -40.5%-48.7%=-89.2%. If a prime is near perfectly off, the sharp and flat mappings are each the best about equally often, depending on the errors of the other harmonics. Therefore, it is natural to plot relative error not on a range from -50% to +50%, but on a circle.
[[File:Graph Harmonic Error 12et.png|alt=12edo 3: +2.0% 5: +13.7% 7: +31.2% 9: +3.9% 11: +48.7% 13: -40.5% 15: +11.7%|thumb|383x383px|Relative error of harmonics in 12edo]]In an [[equal temperament]], [[relative error]] is the amount by which the [[mapping]] of an interval or harmonic deviates from its [[Just intonation point|just value]]. For example, in [[12edo]] the relative error of [[3/2]] is -2.0%, and the relative error of  [[5/4]] is +13.7%. We can plot the relative error of harmonics in a graph like the one on the right. This graph lets us calculate the relative error of intervals. For example, the relative error of [[6/5]] is 13.7%-(-2.0%)=15.6% (not 15.7% due to rounding error). Note that absolute error can be found by multiplying the relative error by the equal division's step size, and in 12edo absolute and relative error are identical. However, one may not always want to use the nearest approximation of every harmonic. For example, in 12edo, using the second best approximation for harmonic 13 (relative error +59.5%) actually gives us less error overall due to cancellation of errors between harmonics. As an example, the relative error of 13/11 in this mapping is 59.5%-48.7%=10.8%. Compare this to the [[patent val]], where all primes use their nearest mappings, where 13/11 has an error of -40.5%-48.7%=-89.2%. If a prime is near perfectly off, the sharp and flat mappings are each the best about equally often, depending on the errors of the other harmonics. Therefore, it is natural to plot relative error not on a range from -50% to +50%, but on a circle.


Line 6: Line 7:




An interval is consistent if its relative error is less than 50%. This corresponds to the arc between the corresponding harmonics being less than 180 degrees, or a semicircle. An [[equal division of the octave]] is consistent in the q-odd-limit if and only if all of the arcs between two odd harmonics up to q (that don't cross the SFC) are less than 180 degrees. Note that for an EDO to be fully consistent, this property must hold with the SFC at exactly 50%. The longest arc between two harmonics is the one between the harmonic closest to the SFC counterclockwise of it and the closest harmonic clockwise of it. For example, in 12edo with the SFC at 50%, the closest harmonic clockwise of the SFC is 13 at -40.5%, and the closest counterclockwise of it is 11 at +48.7%, with the distance between them being 89.2%. However, the SFC does not have to be at 50%; what if we set it at -40% (which is equivalent to +60%) instead? Then, harmonic 13 would be counterclockwise of the SFC and therefore be mapped sharply with +59.5% relative error. Though harmonic 13 itself has greater error, this reduces the error of many intervals. For example, 13/11 now has a relative error of 59.5%-48.7%=10.8%. The maximum relative error of any interval in the 15-odd-limit is now 59.5%-(-3.9%)=63.4% instead; not consistent, but much better than the 89.2% we had before.
An interval is consistent if its relative error is less than 50%. This corresponds to the arc between the corresponding harmonics being less than 180 degrees, or a semicircle. An [[equal division of the octave]] is consistent in the q-odd-limit if and only if all of the arcs between two odd harmonics up to q (that don't cross the SFC) are less than 180 degrees. Note that for an EDO to be fully consistent, this property must hold with the SFC at exactly 50%. Also note that intervals like 3/1 and 3/2 are considered equivalent and have the same relative error due to octave equivalence. The longest arc between two harmonics is the one between the harmonic closest to the SFC counterclockwise of it and the closest harmonic clockwise of it. For example, in 12edo with the SFC at 50%, the closest harmonic clockwise of the SFC is 13 at -40.5%, and the closest counterclockwise of it is 11 at +48.7%, with the distance between them being 89.2%. However, the SFC does not have to be at 50%; what if we set it at -40% (which is equivalent to +60%) instead? Then, harmonic 13 would be counterclockwise of the SFC and therefore be mapped sharply with +59.5% relative error. Though harmonic 13 itself has greater error, this reduces the error of many intervals. For example, 13/11 now has a relative error of 59.5%-48.7%=10.8%. The maximum relative error of any interval in the 15-odd-limit is now 59.5%-(-3.9%)=63.4% instead; not consistent, but much better than the 89.2% we had before.
[[File:Relative Error Circle 35et.png|alt=35edo relative errors: 3: -47.4% 5: -26.7% 7: -25.7% 9: +5.3% 11: -8.0% 13: +48.5% 15: +25.9%|left|thumb|329x329px|Circle of relative error of 35edo]]


== Composite harmonics and dual-fifth systems ==
Up until now, we have assumed that mappings of composite harmonics are equal to the sum of the mappings of the primes they factor into. For example, the composite number 9 factors into primes as 3*3, and in 12edo, the mapping of harmonic 3 is 19 steps, so the mapping of harmonic 9 is 19+19=38 steps. Since the error of harmonic 3 in 12edo is low (-1.96%), this works out nicely. What if we are using a system where this doesn't work out so nicely, such as [[35edo]]? In this case, the best approximation of harmonic 3 is 55 steps (20 reduced), but the best approximation of harmonic 9 is 111 steps (6 reduced), not the 110=55*2 that we would get by doubling 3. The 110 step approximation of harmonic 9 has a relative error of -94.7%, or an absolute error of -32.5 cents, way too much. We must therefore use the 111 step approximation that's 5.3% sharp, but the ratio between this and the best approximation of 3, 55 steps, is inconsistent, being 56 steps. However, this inconsistent approximation of 3 at 56 steps is only barely inconsistent, being 52.6% sharp with +18.0 cents error, much more reasonable than the -32.5 cents of harmonic 9 in the 110 step mapping of it. If k is the relative error of harmonic 3 in N-edo by closest approximation, and k>1/4 (25%), then the relative error of harmonic 9 by direct approximation in N-edo is 1-2k, and the relative error of the approximation of 3/1 derived from "9/3" is 1-k. The relative error of harmonic 9 by patent val would be 2k, and this is greater than the relative error 1-k of the second-best 3/1 when 2k>1-k, which simplifies to k>1/3. In general, EDOs with more than 33.3% relative error on the fifth are better analyzed as dual-fifth, and EDOs with less than 1/3 are better analyzed as plain fifth. There are of course exceptions such as [[49edo]], where the relative error of 3/2 is just barely over 1/3 (+33.7%), but the strong sharpness of harmonics 5, 7, and 11 means it is better analyzed as plain-fifth, and in fact [[9/8]] and its inversion [[16/9]] are the only inconsistent intervals in the 11-odd-limit in 49edo by patent val.


Up until now, we have assumed that mappings of composite harmonics are equal to the sum of the mappings of the primes they factor into. For example, the composite number 9 factors into primes as 3*3, and in 12edo, the mapping of harmonic 3 is 19 steps, so the mapping of harmonic 9 is 19+19=38 steps. Since the error of harmonic 3 in 12edo is low (-1.96%), this works out nicely. But what if we are using a system where this doesn't work out so nicely, such as [[35edo]]?
However, when do we actually use the sharp fifth or the flat one? In 35edo, it is best to use the flat fifth in chords like 4:5:6, 4:6:7, and 4:6:11 that use odd harmonics 1 and 3, due to the flatness of harmonics 5, 7, and 11. In a chord like 6:7:9, 6:9:10, or 6:9:11, however, it is best to use the sharp fifth between 6 and 9. In a larger chord like 4:5:6:7:9:11 that includes all of harmonics 1, 3, and 9, it is best to use the flat fifth between 1 (4) and 3 (6), and the sharp fifth between 3 (6) and 9. While these chords work well, some don't, such as 8:10:12:15, which will have an interval almost 75% (about 25 cents) off no matter how it is tuned in 35edo. 35edo is actually quite optimal in its tunings for 5 and 7, both being about a quarter of a step flat to split the errors evenly in chords like 4:5:6 and 6:7:9, and while its 11 is not as optimal, it still works. Even prime 13 arguably works if its inconsistent flat mapping is used. The specifics of how a dual-fifth system works depends on the edo being used; for example, 47edo works differently from 35edo. I propose a wart notation for dual-prime systems using upside-down warts to represent dual primes, for example 35edo's best 13-limit "val" is 35qf, and 70edo's best "val" is 70ↄp. Note that upside-down letters are rotated 180 degrees from their regular versions. There is a slight possibility that the dual warts for 3 and 7, being q and p respectively, conflict with the regular warts for primes 59 and 53, but it is very unlikely that this will happen. However, I'm not going to explicitly define the details of this dual wart system, and someone else can do that if they want instead.