The Riemann zeta function and tuning: Difference between revisions
→Quick info: zeta peak edos: Fix error: switched pure octaves, rewrite |
detauify |
||
Line 27: | Line 27: | ||
== Quick info: zeta peak edos == | == Quick info: zeta peak edos == | ||
Best edos according to the zeta metric: {{EDOs|1, 2, 3, 5, 7, 10, 12, 19, 22, 31, 41, 53, 87, 118, 130, 171, 224, 270, 311}} | |||
Best edos according to the zeta metric (assuming pure octaves): {{EDOs|1, 2, 3, 4, 5, 7, 10, 12, 19, 22, 27, 31, 41, 53, 72, 99, 118, 130, 152, 171, 217, 224, 270,}} | |||
== Intuitive explanation == | == Intuitive explanation == | ||
We start with the basic concept of the mu function, which takes a cyclic function (a zigzag, in the case of mu) and sums up the values of that function scaled and weighted (canonically by a quadratic factor 1/n^2, but can be varied) to match each harmonic n. Technically, any cyclic function can be used this way. Specifically, complex exponentials are especially useful as a) they are analytic and b) they package the "weight" and the cyclic function together into a single function, where the weight corresponds to the real value of the input s, and so equal tunings are the imaginary part of the input. (Imaginary numbers most directly correspond to equal divisions of the [[zetave]] | We start with the basic concept of the mu function, which takes a cyclic function (a zigzag, in the case of mu) and sums up the values of that function scaled and weighted (canonically by a quadratic factor 1/n^2, but can be varied) to match each harmonic n. Technically, any cyclic function can be used this way. Specifically, complex exponentials are especially useful as a) they are analytic and b) they package the "weight" and the cyclic function together into a single function, where the weight corresponds to the real value of the input s, and so equal tunings are the imaginary part of the input. (Imaginary numbers most directly correspond to equal divisions of the "[[zetave|natural interval]]" <math>e^{2\pi}</math>, this is because of the close connection between complex exponentials and both e and the circle constant. To convert to edos, multiply the imaginary part by <math>\tfrac{2\pi}{\ln(2)}</math>.) The sum of complex exponentials corresponding to each harmonic is, by definition, the zeta function, and it turns out that the weight 1/sqrt(n) gives the optimal information on higher primes, corresponding to the critical line where all known zeroes lie (intuitively, smaller weights lead to higher primes dominating too much and obscuring lower primes, and larger weights lead to the converse). | ||
A link to the graph of zeta can be found at [https://samuelj.li/complex-function-plotter/#abs(zeta(i*2*pi*real(z)%2Fln(2)%2Bimag(z))) Zeta in Samuelj Plotter]. (In the top left menu, make sure that "Enable Checkerboard" is unticked and "Invert Gradient" and "Continuous Gradient" are ticked.) The function has been reoriented to place EDO size along the horizontal axis and weight along the vertical axis, and also scaled by < | A link to the graph of zeta can be found at [https://samuelj.li/complex-function-plotter/#abs(zeta(i*2*pi*real(z)%2Fln(2)%2Bimag(z))) Zeta in Samuelj Plotter]. (In the top left menu, make sure that "Enable Checkerboard" is unticked and "Invert Gradient" and "Continuous Gradient" are ticked.) The function has been reoriented to place EDO size along the horizontal axis and weight along the vertical axis, and also scaled by <math>\tfrac{2\pi}{\ln(2)}</math> to ensure that the real number line aligns with edos. One can see that with higher weights, the function approaches a cyclic function with a period of 1; this corresponds to the prime 2 dominating more and more extremely as other harmonics are weighted less with higher weights. You can see this easier by raising the entire expression to an absurdly high power, such as 100. Note, however, that this visualization is inaccurate beyond a few hundred: around 324.5 and 473.5, and in many cases after, there appear to be zeroes that are not on the critical line; this is an artifact of the way the function is approximated and is the ultimate reason why the Riemann hypothesis remains unsolved. | ||
== Gene Smith's original derivation == | == Gene Smith's original derivation == | ||
Line 230: | Line 226: | ||
For every strictly positive rational ''n''/''d'', there is a cosine with period {{nowrap|2π log<sub>2</sub>({{frac|''n''|''d''}})}}. This cosine peaks at {{nowrap|''x'' {{=}} {{sfrac|''N''|log<sub>2</sub>(''n''/''d'')}}}} for all integers ''N'', or in other words, the Nth-equal division of the rational number {{frac|''n''|''d''}}, and hits troughs midway between. | For every strictly positive rational ''n''/''d'', there is a cosine with period {{nowrap|2π log<sub>2</sub>({{frac|''n''|''d''}})}}. This cosine peaks at {{nowrap|''x'' {{=}} {{sfrac|''N''|log<sub>2</sub>(''n''/''d'')}}}} for all integers ''N'', or in other words, the Nth-equal division of the rational number {{frac|''n''|''d''}}, and hits troughs midway between. | ||
Our mysterious substitution above was chosen to set the units for this up nicely. The variable x now happens to be measured in divisions of the octave. (The original variable ''t'', which was the imaginary part of the zeta argument ''s'', can be thought of as the number of divisions of the interval {{nowrap|''e''<sup>2π</sup> ≈ 535.49}}, or what [[Keenan_Pepper|Keenan Pepper]] has called the "natural interval.") | Our mysterious substitution above was chosen to set the units for this up nicely. The variable x now happens to be measured in divisions of the octave. (The original variable ''t'', which was the imaginary part of the zeta argument ''s'', can be thought of as the number of divisions of the interval {{nowrap|''e''<sup>2π</sup> ≈ 535.49}}, or what [[Keenan_Pepper|Keenan Pepper]] has called the "[[zetave|natural interval]].") | ||
As mentioned in Gene's original zeta derivation, these cosine functions can be thought of as good approximations to the terms in the TE error computation, which are all the squared errors for the different primes. Rather than taking the square of the error, we instead put the error through the function {{sfrac|1 − cos(''x'')|2}}, which is "close enough" for small values of ''x''. Since we are always rounding off to the best mapping, this error is never more 0.5 steps of the edo, so since we have {{nowrap|−0.5 < x < 0.5}} we have a decent enough approximation. | As mentioned in Gene's original zeta derivation, these cosine functions can be thought of as good approximations to the terms in the TE error computation, which are all the squared errors for the different primes. Rather than taking the square of the error, we instead put the error through the function {{sfrac|1 − cos(''x'')|2}}, which is "close enough" for small values of ''x''. Since we are always rounding off to the best mapping, this error is never more 0.5 steps of the edo, so since we have {{nowrap|−0.5 < x < 0.5}} we have a decent enough approximation. |