The Riemann zeta function and tuning: Difference between revisions
No edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
Line 15: | Line 15: | ||
Suppose ''x'' is a variable representing some equal division of the octave. For example, if {{nowrap|''x'' {{=}} 80}}, ''x'' reflects 80edo with a step size of 15 cents and with pure octaves. Suppose that ''x'' can also be continuous, so that it can also represent fractional or "nonoctave" divisions as well. The [[Bohlen–Pierce scale]], 13 equal divisions of 3/1, is approximately 8.202 equal divisions of the "octave" (although the octave itself does not appear in this tuning), and would hence be represented by a value of {{nowrap|''x'' {{=}} 8.202}}. | Suppose ''x'' is a variable representing some equal division of the octave. For example, if {{nowrap|''x'' {{=}} 80}}, ''x'' reflects 80edo with a step size of 15 cents and with pure octaves. Suppose that ''x'' can also be continuous, so that it can also represent fractional or "nonoctave" divisions as well. The [[Bohlen–Pierce scale]], 13 equal divisions of 3/1, is approximately 8.202 equal divisions of the "octave" (although the octave itself does not appear in this tuning), and would hence be represented by a value of {{nowrap|''x'' {{=}} 8.202}}. | ||
Now suppose that [https://www.desmos.com/calculator/krigk43int | Now suppose that [https://www.desmos.com/calculator/krigk43int {{rr|''x''}}] denotes the difference between ''x'' and the integer nearest to ''x'': | ||
<math>\rround{x} = \abs{x - \floor{x + \frac{1}{2}}}</math> | <math>\rround{x} = \abs{x - \floor{x + \frac{1}{2}}}</math> | ||
For example, | For example, {{nowrap|{{rr|8.202}} {{=}} 0.202}}, since it is the difference between 8.202 and the nearest integer, which is 8. Meanwhile, {{nowrap|{{rr|7.95}} {{=}} 0.05}}, which is the difference between 7.95 and the nearest integer, which is 8. This represents the absolute relative error of the octave in equal tuning ''x'', or alternatively how much x is detuned from an edo. | ||
For any value of ''x'', we can construct a ''p''-limit [[Patent_val|generalized patent val]]. We do so by rounding {{nowrap|''x'' log<sub>2</sub>(''q'')}} to the nearest integer for each prime ''q'' up to ''p''. For example, for {{nowrap|''x'' {{=}} 12}}, we find 2 at 12, 3 at 19, 5 at 28, etc. Now consider [https://www.desmos.com/calculator/4uamhon9tt the function] | For any value of ''x'', we can construct a ''p''-limit [[Patent_val|generalized patent val]]. We do so by rounding {{nowrap|''x'' log<sub>2</sub>(''q'')}} to the nearest integer for each prime ''q'' up to ''p''. For example, for {{nowrap|''x'' {{=}} 12}}, we find 2 at 12, 3 at 19, 5 at 28, etc. Now consider [https://www.desmos.com/calculator/4uamhon9tt the function] | ||
Line 27: | Line 27: | ||
Here, the numerator represents the relative error on each prime, and the denominator represents a weight factor of the logarithm of each prime, so the function represents a p-limit badness metric. | Here, the numerator represents the relative error on each prime, and the denominator represents a weight factor of the logarithm of each prime, so the function represents a p-limit badness metric. | ||
This function has local minima, corresponding to associated generalized patent vals. The minima occur for values of ''x'' which are the [[Tenney-Euclidean_Tuning|Tenney-Euclidean tuning]]s of the octaves of the associated vals, while ξ<sub>''p''</sub> for these minima is the square of the [[ | This function has local minima, corresponding to associated generalized patent vals. The minima occur for values of ''x'' which are the [[Tenney-Euclidean_Tuning|Tenney-Euclidean tuning]]s of the octaves of the associated vals, while ξ<sub>''p''</sub> for these minima is the square of the [[Tenney–Euclidean metrics|Tenney–Euclidean relative error]] of the val—equal to the TE error times the TE complexity, and sometimes known as "TE simple badness." | ||
Now suppose we don't want a formula for any specific prime limit, but which applies to all primes. We can't take the above sum to infinity, since it doesn't converge. However, we could [https://www.desmos.com/calculator/0qhhewlsaz change the weighting factor to a power] so that it does converge: | Now suppose we don't want a formula for any specific prime limit, but which applies to all primes. We can't take the above sum to infinity, since it doesn't converge. However, we could [https://www.desmos.com/calculator/0qhhewlsaz change the weighting factor to a power] so that it does converge: | ||
Line 89: | Line 89: | ||
- \arctan\left(\frac{2t}{4n+1}\right)\right)</math> | - \arctan\left(\frac{2t}{4n+1}\right)\right)</math> | ||
Since the arctangent function is holomorphic in the strip with imaginary part between −1 and 1, it follows from the above formula, or arguing from the previous one, that θ is holomorphic in the strip with imaginary part between −{{frac|1|2}} and {{frac|1|2}}. It may be described for real arguments as an odd real analytic function of ''x'', increasing when {{nowrap|{{ | Since the arctangent function is holomorphic in the strip with imaginary part between −1 and 1, it follows from the above formula, or arguing from the previous one, that θ is holomorphic in the strip with imaginary part between −{{frac|1|2}} and {{frac|1|2}}. It may be described for real arguments as an odd real analytic function of ''x'', increasing when {{nowrap|{{abs|''x''}} > 6.29}}. Plots of it may be studied by use of the Wolfram [http://functions.wolfram.com/webMathematica/FunctionPlotting.jsp?name=RiemannSiegelTheta online function plotter]. | ||
Using the theta and zeta functions, we define the {{w|Z function}} as | Using the theta and zeta functions, we define the {{w|Z function}} as | ||
Line 279: | Line 279: | ||
Since the second is a simple monotonic transformation of the first, we can see that the same function basically measures both the relative error on just the prime powers, and also on all unreduced rationals, at least in the sense that edos will be ranked identically by both measures. The third function is really just the second function divided by a constant, since we only really care about letting <math>t</math> vary—we instead typically set <math>\sigma</math> to some value which represents the weighting "rolloff" on rationals. So, all three of these functions will rank edos identically. | Since the second is a simple monotonic transformation of the first, we can see that the same function basically measures both the relative error on just the prime powers, and also on all unreduced rationals, at least in the sense that edos will be ranked identically by both measures. The third function is really just the second function divided by a constant, since we only really care about letting <math>t</math> vary—we instead typically set <math>\sigma</math> to some value which represents the weighting "rolloff" on rationals. So, all three of these functions will rank edos identically. | ||
We also note that, above, Gene tended to look at things in terms of the Z(''t'') function, which is defined so that we have {{nowrap|{{ | We also note that, above, Gene tended to look at things in terms of the Z(''t'') function, which is defined so that we have {{nowrap|{{abs|Z(''t'')}} {{=}} {{abs|ζ(''t'')}}}}. So, the absolute value of the Z function is also monotonically equivalent to the above set of expressions, so that any one of these things will produce the same ranking on edos. | ||
It turns out that using the same principles of derivation above, we can also derive another expression, this time for the relative error on only the harmonics—i.e. those intervals of the form <math>1/1, 2/1, 3/1, ... n/1, ...</math>. This was studied in a paper by Peter Buch called [[:File:Zetamusic5.pdf|"Favored cardinalities of scales"]]. The expression is: | It turns out that using the same principles of derivation above, we can also derive another expression, this time for the relative error on only the harmonics—i.e. those intervals of the form <math>1/1, 2/1, 3/1, ... n/1, ...</math>. This was studied in a paper by Peter Buch called [[:File:Zetamusic5.pdf|"Favored cardinalities of scales"]]. The expression is: | ||
Line 300: | Line 300: | ||
== Zeta edo lists == | == Zeta edo lists == | ||
=== Record edos === | === Record edos === | ||
The prime-approximating strength of an edo can be determined by the magnitude of Z(''x''). Since a higher {{nowrap|{{ | The prime-approximating strength of an edo can be determined by the magnitude of Z(''x''). Since a higher {{nowrap|{{abs|Z(''x'')}}}} correlates to a stronger tuning, we would like to find a sequence with successively larger {{nowrap|{{abs|Z(''x'')}}}}-associated values satisfying some property. | ||
==== Zeta peak edos ==== | ==== Zeta peak edos ==== | ||
If we examine the increasingly larger peak values of {{nowrap|{{ | If we examine the increasingly larger peak values of {{nowrap|{{abs|Z(''x'')}}}}, we find they occur with values of ''x'' such that {{nowrap|Z'(''x'') {{=}} 0}} near to integers, so that there is a sequence of [[edo]]s {{EDOs| 1, 2, 3, 4, 5, 7, 10, 12, 19, 22, 27, 31, 41, 53, 72, 99, 118, 130, 152, 171, 217, 224, 270, 342, 422, 441, 494, 742, 764, 935, 954, 1012, 1106, 1178, 1236, 1395, 1448, 1578, 2460, 2684, 3395, 5585, 6079, 7033, 8269, 8539, 11664, 14348, 16808, 28742, 34691, 36269, 57578, 58973, 95524, 102557, 112985, 148418, 212147, 241200,}} … of '''zeta peak edos'''. This is listed in the On-Line Encyclopedia of Integer Sequences as {{OEIS|A117536}}. Note that these peaks occur close to integer values, but are never exactly located at an integer; this can be interpreted as the zeta function suggesting detuned ([[stretched and compressed tuning|stretched or compressed]]) octaves for the edo in question, similar to the [[TOP tuning]] (although the two tunings are in general not the same). As a result, this list can also be thought of as "tempered-octave zeta peak edos." | ||
==== Zeta peak integer edos ==== | ==== Zeta peak integer edos ==== | ||
Alternatively (as [[groundfault]] has found), if we do not allow octave detuning and instead look at only the record {{nowrap|{{ | Alternatively (as [[groundfault]] has found), if we do not allow octave detuning and instead look at only the record {{nowrap|{{abs|Z(''x'')}}}} zeta scores corresponding to exact edos with pure octaves, we get {{EDOs| 1, 2, 3, 5, 7, 10, 12, 19, 22, 31, 41, 53, 87, 118, 130, 171, 224, 270, 311, 472, 494, 742, 1065, 1106, 1395, 1578, 2460, 2684, 3566, 4231, 4973, 5585, 8269, 8539, 14124, 14348, 16808, 28742, 30631, 34691, 36269, 57578, 58973,}} … of '''zeta peak integer edos'''. Edos not present in the previous list but present here include {{EDOs| 87, 311, 472, 1065, 3566, 4231, 4973, 14124, 30631,}} … and edos present in the previous list but not present here include {{EDOs| 4, 27, 72, 99, 152, 217, 342, 422, 441, 764, 935, 954, 1012, 1178, 1236, 1448, 3395, 6079, 7033, 11664,}} … with 72's removal perhaps being the most surprising, showing the strength of 53 in that 72 does not improve on 53's peak. This definition may be better for measuring how accurate edos are without detuned octaves, whereas the previous list assumes that the octave is tempered along with all other intervals. This list can thus also be thought of as "pure-octave zeta peak edos." | ||
==== Zeta integral edos ==== | ==== Zeta integral edos ==== | ||
Similarly, if we take the integral of {{nowrap|{{ | Similarly, if we take the integral of {{nowrap|{{abs|Z(''x'')}}}} between successive zeros, and use this to define a sequence of increasing values for this integral, these again occur near integers and define an edo. This sequence, the '''zeta integral edos''', goes {{EDOs| 2, 5, 7, 12, 19, 31, 41, 53, 72, 130, 171, 224, 270, 764, 954, 1178, 1395, 1578, 2684, 3395, 7033, 8269, 8539, 14348, 16808, 36269, 58973,}} … This is listed in the OEIS as {{OEIS|A117538}}. The zeta integral edos seem to be, on the whole, the best of the zeta function sequences, but the other two should not be discounted; the peak values seem to give more weight to the lower primes, and the zeta gap sequence discussed below to the higher primes. | ||
==== Zeta gap edos ==== | ==== Zeta gap edos ==== | ||
Line 511: | Line 511: | ||
=== Anti-record edos === | === Anti-record edos === | ||
==== Zeta valley edos ==== | ==== Zeta valley edos ==== | ||
In addition to looking at {{nowrap|{{ | In addition to looking at {{nowrap|{{abs|Z(x)}}}} maxima, we can also look at {{nowrap|{{abs|Z(x)}}}} ''minima'' for integer values of ''x''. These correspond to ''zeta valley edos'', and we get a list of edos {{EDOs| 1, 8, 18, 39, 55, 64, 79, 5941, 8294,}} … These tunings tend to deviate from ''p''-limit JI as much as possible while still preserving octaves, and can serve as "more xenharmonic" tunings. Keep in mind, however, that the ''most'' xenharmonic tunings would not contain octaves at all. | ||
Notice the sudden jump from [[79edo]] to [[5941edo]]. We know that {{nowrap|{{ | Notice the sudden jump from [[79edo]] to [[5941edo]]. We know that {{nowrap|{{abs|Z(x)}}}} grows logarithmically on average. If we assume the scores of integer edos are uniformly distributed on the interval {{nowrap|[0, ''c'' log(''x'')]}}, the probability for the next edo to have a zeta score less than a given small value is also very small, so we would expect valley edos to be rarer than peak edos. So, it would be more productive to find edos which zeta score is simply less than a given threshold. | ||
Note that "tempered-octave zeta valley edos" would simply be any zero of Z(x). | Note that "tempered-octave zeta valley edos" would simply be any zero of Z(x). | ||
Line 657: | Line 657: | ||
From this we may deduce that {{nowrap|{{sfrac|θ(''t'')|π}} ≈ ''r'' ln(''r'') − ''r'' − {{sfrac|1|8}}}}, where {{nowrap|''r'' {{=}} {{sfrac|''t''|2π}} {{=}} {{sfrac|''x'' ln(2)}}}}; hence while x is the number of equal steps to an octave, ''r'' is the number of equal steps to an "''e''-tave", meaning the interval of ''e'', which is {{nowrap|{{sfrac|1200|ln(2)}} {{=}} 1731.234{{cent}}}}. | From this we may deduce that {{nowrap|{{sfrac|θ(''t'')|π}} ≈ ''r'' ln(''r'') − ''r'' − {{sfrac|1|8}}}}, where {{nowrap|''r'' {{=}} {{sfrac|''t''|2π}} {{=}} {{sfrac|''x'' ln(2)}}}}; hence while x is the number of equal steps to an octave, ''r'' is the number of equal steps to an "''e''-tave", meaning the interval of ''e'', which is {{nowrap|{{sfrac|1200|ln(2)}} {{=}} 1731.234{{cent}}}}. | ||
Recall that Gram points near to pure-octave edos, where ''x'' is an integer, can be expected to correspond to peak values of {{nowrap|{{ | Recall that Gram points near to pure-octave edos, where ''x'' is an integer, can be expected to correspond to peak values of {{nowrap|{{abs|ζ}} {{=}} {{abs|Z}}}}. We can find these Gram points by Newton's method applied to the above formula. If {{nowrap|''r'' {{=}} {{sfrac|''x''|ln(2)}}}}, and if {{nowrap|''n'' {{=}} ⌊''r'' ln(''r'') − ''r'' + {{frac|3|8}}⌋}} is the nearest integer to {{sfrac|θ(2π''r'')|π}}, then we may set {{nowrap|''r''<sup>+</sup> {{=}} {{sfrac|''r'' + ''n'' + {{frac|1|8}}|ln(''r'')}}}}. This is the first iteration of Newton's method, which we may repeat if we like, but in fact no more than one iteration is really required. This is the first black magic formula, giving an adjusted "Gram" tuning from the orginal one. | ||
For an example, consider {{nowrap|''x'' {{=}} 12}}, so that {{nowrap|''r'' {{=}} {{sfrac|12|ln(2)}} {{=}} 17.312}}. Then {{nowrap|''r'' ln(''r'') − ''r'' − {{sfrac|1|8}} {{=}} 31.927}}, which rounded to the nearest integer is 32, so {{nowrap|''n'' {{=}} 32}}. Then {{nowrap|{{sfrac|''r'' + ''n'' + {{frac|1|8}}|ln(''r'')}} {{=}} 17.338}}, corresponding to {{nowrap|''x'' {{=}} 12.0176}}, which means a single step is 99.853 cents and the octave is tempered to twelve of these, which is 1198.238 cents. | For an example, consider {{nowrap|''x'' {{=}} 12}}, so that {{nowrap|''r'' {{=}} {{sfrac|12|ln(2)}} {{=}} 17.312}}. Then {{nowrap|''r'' ln(''r'') − ''r'' − {{sfrac|1|8}} {{=}} 31.927}}, which rounded to the nearest integer is 32, so {{nowrap|''n'' {{=}} 32}}. Then {{nowrap|{{sfrac|''r'' + ''n'' + {{frac|1|8}}|ln(''r'')}} {{=}} 17.338}}, corresponding to {{nowrap|''x'' {{=}} 12.0176}}, which means a single step is 99.853 cents and the octave is tempered to twelve of these, which is 1198.238 cents. |