The Riemann zeta function and tuning: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
BudjarnLambeth (talk | contribs)
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 7: Line 7:
If you look for a filter to quickly sort all the equal temperaments into those that approximate JI well and those that do not, the [[#Zeta edo lists|edo lists]] below can be useful. The caveat is that it collapses the variety of characteristics of a temperament to a one-dimensional rating, with little capacity to show the nuances of each system. It is therefore best to keep in mind that judging the temperaments by zeta is no replacement for investigating each temperament in detail.  
If you look for a filter to quickly sort all the equal temperaments into those that approximate JI well and those that do not, the [[#Zeta edo lists|edo lists]] below can be useful. The caveat is that it collapses the variety of characteristics of a temperament to a one-dimensional rating, with little capacity to show the nuances of each system. It is therefore best to keep in mind that judging the temperaments by zeta is no replacement for investigating each temperament in detail.  


There are other metrics besides zeta for other definitions of "approximating well", such as [[mu badness]] and the various [[:Category:Regular temperament tuning|optimised regular temperament tunings]] when applied to [[rank]]-1 (i.e. equal) temperaments.
There are other metrics besides zeta for other definitions of "approximating well", which you can find in: [[:Category:Regular temperament tuning|optimised regular temperament tunings]].


Much of the below is thanks to the insights of [[Gene Ward Smith]]. Below is the original derivation as he presented it, followed by a different derivation from [[Mike Battaglia]] below which extends some of the results.
Much of the below is thanks to the insights of [[Gene Ward Smith]]. Below is the original derivation as he presented it, followed by a different derivation from [[Mike Battaglia]] below which extends some of the results.
Line 91: Line 91:
<math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{\lfloor x \log_2 q \rceil^2}{q^s}</math>
<math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{\lfloor x \log_2 q \rceil^2}{q^s}</math>


Importantly, when ''s'' = 1, the weighting is 1/''p'' for a prime ''p'', so that it's very similar to a 1/(''p'' - 1) weighting. This latter weighting is equal to the average number of times prime ''p'' occurs as a factor in the harmonic series, counting repetition, so is of interest because it represents how many harmonics will feel damage from this prime being mistuned. Therefore, the weighting {{nowrap| 1/''p''  }} corresponds to under-prioritizing small primes slightly (with the effect being less slight the smaller the prime, so that at the most extreme, at prime 2 we have 1/2 instead of 1/1 weighting and at prime 3 we have 1/3 instead of 1/2 weighting).
Importantly, when {{nowrap|''s'' {{=}} 1}}, the weighting is 1/''p'' for a prime ''p'', so that it's very similar to a {{sfrac|1|''p'' 1}} weighting. This latter weighting is equal to the average number of times prime ''p'' occurs as a factor in the harmonic series, counting repetition, so is of interest because it represents how many harmonics will feel damage from this prime being mistuned. Therefore, the weighting {{nowrap| 1/''p''  }} corresponds to under-prioritizing small primes slightly (with the effect being less slight the smaller the prime, so that at the most extreme, at prime 2 we have 1/2 instead of 1/1 weighting and at prime 3 we have 1/3 instead of 1/2 weighting).


Seeing that we notate the power as ''s'', it might become apparent where the Riemann zeta function will eventually show up.
Seeing that we notate the power as ''s'', it might become apparent where the Riemann zeta function will eventually show up.


If ''s'' is greater than one, this does converge. However, we might want to make a few adjustments. For one thing, if the error is low enough that the tuning is consistent, then the error of the square of a prime is twice that of the prime, of the cube tripled, and so forth until the error becomes inconsistent. When the weighting uses logarithms and error measures are consistent, then the logarithmic weighting cancels this effect out, so we might consider that prime powers were implicitly included in the Tenney-Euclidean measure - in fact, the primary intuition behind Tenney weighting is that it is the weighting pattern that values 25, 27, and 29 approximately evenly in importance despite being different powers. We can go ahead and include them by adding a factor of {{sfrac|1|''n''}} for each prime power ''p''<sup>''n''</sup>. A somewhat peculiar but useful way to write the result of doing this is in terms of the {{w|von Mangoldt function}}, an {{w|arithmetic function}} on positive integers which is equal to ln(''p'') on prime powers ''p''<sup>''n''</sup>, and is zero elsewhere. This is written using a capital lambda, as Λ(''n''), and in terms of it we can include prime powers in our error function as
If ''s'' is greater than one, this does converge. However, we might want to make a few adjustments. For one thing, if the error is low enough that the tuning is consistent, then the error of the square of a prime is twice that of the prime, of the cube tripled, and so forth until the error becomes inconsistent. When the weighting uses logarithms and error measures are consistent, then the logarithmic weighting cancels this effect out, so we might consider that prime powers were implicitly included in the Tenney-Euclidean measure—in fact, the primary intuition behind Tenney weighting is that it is the weighting pattern that values 25, 27, and 29 approximately evenly in importance despite being different powers. We can go ahead and include them by adding a factor of {{sfrac|1|''n''}} for each prime power ''p''<sup>''n''</sup>. A somewhat peculiar but useful way to write the result of doing this is in terms of the {{w|von Mangoldt function}}, an {{w|arithmetic function}} on positive integers which is equal to ln(''p'') on prime powers ''p''<sup>''n''</sup>, and is zero elsewhere. This is written using a capital lambda, as Λ(''n''), and in terms of it we can include prime powers in our error function as


<math>\displaystyle \xi_\infty(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\lfloor x \log_2 n \rceil^2}{n^s}</math>
<math>\displaystyle \xi_\infty(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\lfloor x \log_2 n \rceil^2}{n^s}</math>
Line 359: Line 359:


===== Extended list of absolute zeta peak edos =====
===== Extended list of absolute zeta peak edos =====
If you look at the graph of zeta (for any zeta graph of interest), another issue quickly becomes evident: many equal temperaments of interest fail to have peaks of record height by only small amounts, so that we intuitively want to include them in a more comprehensive list. However, trying to "fix" this issue quickly leads into another issue: how many "nearly record" edos should we include, and why? The smallest alteration we can make is to allow an equal temperament that does better than the second-best-scoring equal temperament so far. But sometimes we have two very strong equal temperaments appear in quick succession, and given the motivation is to find a more comprehensive list anyways, here we'll include any equal temperament that does better than the third-best-scoring equal temperament so far. The motivation for this cutoff is that you intuitively might expect that the three best equal temperaments found so far represent roughly how good we can do in a given range of step sizes, so that they define what is "normal" for that range, that is, it's the heuristic of the "rule of three". Again, the list for ''s'' = 1/2 is almost identical to ''s'' = 1 for equal temperaments up to 311et, though this time the differences are less trivial: [[176edo|176et]] and [[202edo|202et]] only appear for ''s'' = 1/2, so are put in brackets. The list is {{EDOs| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 22, 24, 26, 27, 29, 31, 34, 36, 38, 39, 41, 43, 45, 46, 48, 50, 53, 56, 58, 60, 63, 65, 68, 72, 77, 80, 84, 87, 89, 94, 96, 99, 103, 106, 111, 113, 118, 121, 125, 130, 137, 140, 145, 149, 152, 159, 161, 166, 171, (176,) 183, 190, 193, 198, (202,) 212, 217, 224, 229, 239, 243, 248, 255, 270, 277, 282, 289, 301, 311, ... }}.
If you look at the graph of zeta (for any zeta graph of interest), another issue quickly becomes evident: many equal temperaments of interest fail to have peaks of record height by only small amounts, so that we intuitively want to include them in a more comprehensive list. However, trying to "fix" this issue quickly leads into another issue: how many "nearly record" edos should we include, and why? The smallest alteration we can make is to allow an equal temperament that does better than the second-best-scoring equal temperament so far. But sometimes we have two very strong equal temperaments appear in quick succession, and given the motivation is to find a more comprehensive list anyways, here we'll include any equal temperament that does better than the third-best-scoring equal temperament so far. The motivation for this cutoff is that you intuitively might expect that the three best equal temperaments found so far represent roughly how good we can do in a given range of step sizes, so that they define what is "normal" for that range, that is, it's the heuristic of the "rule of three". Again, the list for ''s'' = 1/2 is almost identical to ''s'' = 1 for equal temperaments up to 311et, though this time the differences are less trivial: [[176edo|176et]] and [[202edo|202et]] only appear for ''s'' = 1/2, so are put in brackets. The list is {{EDOs| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 22, 24, 26, 27, 29, 31, 34, 36, 38, 39*, 41, 43, 45, 46, 48, 50, 53, 56, 58, 60, 63, 65, 68, 72, 77, 80, 84, 87, 89, 94, 96, 99, 103, 106, 111, 113, 118, 121, 125, 130, 137, 140, 145, 149, 152, 159, 161, 166, 171, (176,) 183, 190, 193, 198, (202,) 212, 217, 224, 229, 239, 243, 248, 255, 270, 277, 282, 289, 301, 311, ... }}.


The equal temperaments added relative to the non-extended list of only things that are records proper are: {{EDOs| 6, 8, 11, 13, 16, 21, 29, 36, 38, 39*, 43, 45, 48, 50, 56, 60, 63, 77, 80, 89, 96, 103, 106, 113, 121, 125, 137, 145, 149, 159, 161, 166, (176,) 190, 193, (202,) 229, 239, 248, 255, 277, 282, 289, 301 }}. * 39et is a notable example because [[39edo]] corresponds to a zeta valley, so it's surprising that it would be included here; the reason that it is included is because this is ''not'' 39edo, but 39 ''equal temperament'', corresponding to a 3.8{{cent}} flat-tempered octave so that it is actually ~39.124edo, that is, it corresponds to the 173rd zeta peak, known by the shorthand 173zpi (where i stands for index). Therefore, this may prove a good testcase for the effects of zeta-informed octave-tempering, though given the size of the stretch, the difference is likely to be subtle, but the fact that it "changes zeta's mind" this much is itself interesting. You can also interpret this result differently, which is as evidence that you should not include equal temperaments worse than the third-best-scoring equal temperament so far, given the somewhat dubious inclusion of 39et, however it should be noted that this is more to do with that at the very beginning of the list there aren't many equal temperaments to "beat" so that beating the third-best-scoring equal temperament so far is easy, though arguably this isn't a flaw because people are often more likely to try a smaller equal temperament. It's also perhaps worth noting that 37et almost makes this extended list, but the omission of 37et is much better addressed by no-3's zeta.
The equal temperaments added relative to the non-extended list of only things that are records proper are: {{EDOs| 6, 8, 11, 13, 16, 21, 29, 36, 38, 39*, 43, 45, 48, 50, 56, 60, 63, 77, 80, 89, 96, 103, 106, 113, 121, 125, 137, 145, 149, 159, 161, 166, (176,) 190, 193, (202,) 229, 239, 248, 255, 277, 282, 289, 301 }}. * 39et is a notable example because [[39edo]] corresponds to a zeta valley, so it's surprising that it would be included here; the reason that it is included is because this is ''not'' 39edo, but 39 ''equal temperament'', corresponding to a 3.8{{cent}} flat-tempered octave so that it is actually ~39.124edo, that is, it corresponds to the 173rd zeta peak, known by the shorthand 173zpi (where i stands for index). Therefore, this may prove a good testcase for investigating the effects of zeta-based octave-tempering, though given the size of the stretch, the difference is likely to be subtle, but the fact that it "changes zeta's mind" this much is itself interesting. You can also interpret this result differently, which is as evidence that you should not include equal temperaments worse than the third-best-scoring equal temperament so far, given the somewhat dubious inclusion of 39et, however it should be noted that this is more to do with that at the very beginning of the list there aren't many equal temperaments to "beat" so that beating the third-best-scoring equal temperament so far is easy, though arguably this isn't a flaw because people are often more likely to try a smaller equal temperament. It's also perhaps worth noting that 37et almost makes this extended list, but the omission of 37et is much better addressed by no-3's zeta.


==== Zeta integral edos ====
==== Zeta integral edos ====
Line 566: Line 566:
=== Anti-record edos ===
=== Anti-record edos ===
==== Zeta valley edos ====
==== Zeta valley edos ====
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.
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,}}… Zeta valley EDOs can be thought of as pure-octave tunings that tend to deviate from ''p''-limit JI as much as possible while still preserving octaves, and can serve as "more xenharmonic" tunings. Zeta valley EDOs are only measured with pure octaves, since "tempered-octave zeta valley edos" would simply be any zero of Z(x). 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|{{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.
Notice that there is a very large jump from [[79edo]] to [[5941edo]]. We know that record {{nowrap|{{abs|Z(x)}}}} scores, both with tempered octaves and pure octaves, grow 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).


=== ''k''-ary-peak edos ===
=== ''k''-ary-peak edos ===