Talk:The Riemann zeta function and tuning
![]() |
This article is deemed to be of high priority for the Xenharmonic Wiki, as it is often seen by new users or easily accessed from the main page or sidebar. Edits made to this article will have a significantly larger impact than on others, and poorly-written content will stand out more. As a result, it has been semi-protected to prevent disruptive editing and vandalism.
Please be mindful of this when making edits to the article. |
![]() |
This page also contains archived Wikispaces discussion. |
Zeta troughs?
Would it be possible to use this function to calculate increasingly deep troughs as well as peaks, so as to produce a sequence of EDOs that have increasingly high levels of relative error for their size & inconsistency between various limits? That could be an interesting addition to the lists for people who want to produce intentionally perverse & dissonant music. --Yourmusic Productions (talk) 17:42, 6 April 2021 (UTC)
- Yes, although since we are looking at the absolute value of the zeta function can be no greater than 0. So, any EDO which has a zeta value of 0 is "maximally inharmonic," in a sense. According to the Riemann hypothesis, anyway, the function can only get to 0 if we're on the critical line, which means we're weighting rationals as [math]\displaystyle{ 1/(nd)^{0.5} }[/math]. But even on other lines there will always be local minima. Strangely, the touch tone "DTMF" frequencies were chosen, they say, to be maximally inharmonic, because they didn't want to confuse harmonics of the DTMF tones with other tones. You may think that this would mean they went for a zeta zero, but if you look you will see that all of the touch tone frequencies (which form a subset of an equal temperament) magically happen to synchronize with a local *maximum* of the zeta function - though a relatively small one - to within rounding error in Hz. In other words, the DTMF folks went with a relatively inharmonic region of EDO space (14-EDO ish), but then they maximized the harmonicity within that region. Very strange... Mike Battaglia (talk) 11:13, 9 April 2021 (UTC)
Review needed
This page is linked from almost every important edo, and I would consider it "high priority". Despite the length of the page and numerous derivations, some questions and problems remain:
- The construction itself remains largely unmotivated. Why the specific error functions? There is a large amount of handwaving and heuristics. We can use different cyclic error functions which will not lead to zeta, but they seem equally valid. If there is no specific reason to use cosine functions with these specific weights, then this should be clearly mentioned. Currently it seems like the page is actively trying to obscure these facts to make it seem like the connection is more "natural" than it actually is.
- Why focus specifically on the critical strip? The page currently states
- As s approaches the value s = 1/2 of the critical line, the information content, so to speak, of the zeta function concerning higher primes increases [...]
- This is very vague and should be clearly explained.
- The derivation starts from the 'naive' definition of the zeta function, which does not converge for s < 1. At some point it switches to the analytic continuation. It is not clear why or how this is valid for this application (although empirically it seems to work out). I should note that being careless about such things is what leads people to ridiculous claims such as 1+2+3+... = -1/12.
Finally, I believe there are still a lot of inaccuracies, although those may be easily fixed. I am not an expert on this topic, it would be great to have the page checked by someone who actually is an expert on complex analysis or the like.
â Sintelđ (talk) 18:01, 5 April 2025 (UTC)
Recommendation to include Gene's derivation and explanation of its motivations
- Of all the derivations I've seen, I've found Gene's derivation to be the most intuitive, understandable and well-motivated. There's only really a small handful of minor issues, which except for one issue are not issues with the derivation but rather with how the derivation is likely to be perceived by a less mathematically-inclined audience:
- * The importance of squaring errors is that it achieves a balance between minimising the maximum error and minimising the sum of the error.
- * The importance of the cosine function is that it behaves like a version of the squared error that punishes things for being out more and is more forgiving to things that are only somewhat out (which is an intuitively desirable property).
- * The importance of the step where we introduce the Von Mangoldt function corresponds to fixing a real flaw where we've not even tried to preserve a certain mathematical property implicit in the previous weighting: specifically, the 1/log2(p) weighting is the unique weighting that has two important properties. Firstly, adjacent harmonics should have about the same complexity/weight, so that the difference in complexity/weight between adjacent harmonics tends to 1/1 as the harmonics go to infinity; this is to reflect the intuitive desire to have EG 25, 26, 27 be of similar complexity/importance, with 25 slightly less complex than 26 and 26 slightly less than 27. Secondly, we want the complexity to correspond to complexity when stacking; 81 is four times as complex as 3 because it's 34. We can also explain it as being the unique prime weighting that assigns the logarithmic size of every harmonic as its complexity. For these reasons this is generally considered to be the "natural" weighting because it weights the primes so that the prime factorisations of harmonics have the intuitively "expected" complexity of decreasing smoothly and respecting how they're reached in terms of factors. Therefore, we need motivations to change this weighting cuz it's generally been considered the most mathematically natural choice of "default" weighting for primes.
- * This one I think is debatable, but since I saw people complain about it: the step where we say that a certain expression is a "known one" for zeta is perhaps not satisfying enough for the curious reader, but it at least makes sense from an exposition perspective to make the derivation more accessible so that we don't include some unnecessary technical mathematical details.
- The issue that doesn't depend on a less mathematically-inclined audience is this: whether the analytic continuation meaningfully preserves the assumptions we put into it. This is the big one, and as far as I can see, the only flaw in the derivation. The derivation would be "perfect" (in the sense of being mathematically clear and well-motivated) if we instead took the 1 line, but then we'd get less information, so there is a desire to get more information on higher-limit behaviour, but the cost is that the result is being pulled from a mathematical blackbox.
- Overall, I'm of the opinion that it absolutely should be kept on the main page for zeta because it also connects many other topics in the mathematics of tuning theory in a natural way, but I do agree that it could be more accessible by explaining what might not be obvious to a reader within the derivation itself, or maybe in a notes section so that the derivation doesn't need to become longer than it already is, so that someone already familiar with the motivation can continue reading undisturbed.
- Oh I forgot there's one other unaddressed motivational issue which is the change of weighting to the reciprocal of a power of a prime; specifically, while the principle of addressing errors of prime powers is correct, this change definitely deserves some elucidation beyond "to make it converge". Luckily, I do have an explanation: if we count the number of times a given prime p occurs in prime factorisations of all harmonics in the harmonic series (meaning we are counting with repetition), we find it's 1/(p - 1), which surprisingly means the average number of 2's in a harmonic, when counting with repetition, is exactly 1. This comes from half of all harmonics having at least one 2 (+1/2), a quarter having at least two 2's (+1/4), an eighth having at least three 2's (+1/8), etc. so that we have 1/2 + 1/4 + 1/8 + ... = 1, which can be verified empirically: the sum from 1 to 2n will always have 2n factors of 2 counted. Point being, if we fix 1, the only change made by zeta is using 1/p instead of 1/(p - 1), so that it's slightly biased to larger primes but is still asymptotically correct, so a bonus if anything (given we want more high-limit behaviour captured and we know the behaviour at 1 is fine because it can be reached by converging to 1 from s > 1). --Godtone (talk) 15:11, 8 April 2025 (UTC)
EDT list
I fixed some errors in the list of peak EDTs in the 'Removing primes' section. I did this by visually inspecting the graph, so it would be nice if someone could double check using a more sophisticated method.
â Sintelđ (talk) 10:24, 9 April 2025 (UTC)
Reworking page
I am working on a new version of this page, on User:Sintel/Zeta_working_page. I would love to hear any feedback.
â Sintelđ (talk) 16:23, 13 April 2025 (UTC)
- Re: "When we talk about how well an equal temperament (ET) approximates just intonation, we're essentially asking: "How accurately can this system represent the harmonic series?""
- I believe this is wrong/misleading. The reason the list of EDOs given by zeta records is so sparse is because it measures only pure relative error and doesn't care whether you are looking at 2edo or 2000edo. It's fundamentally not fair to characterise it as "how accurately it can represent"; it's "how tone-efficiently it can represent for its size, with no other considerations". I've shown you get a lot more interesting EDOs/ETs if you multiply the resulting score by the size of the EDO/ET, and yet more if you consider things that, while not record peaks, are still better than one of the best n peaks found so far (where I suggest n = 3 as recovering almost all interesting tuning info). --Godtone (talk) 18:56, 14 April 2025 (UTC)
- Also, I'm not convinced that zeta integral is a useless metric to the point of not including it because it represents how well an equal temperament does when detuned so that it is a "peak" in a more general sense. In other words, because of this property, I firmly believe the zeta integral list makes more sense to think of as a "zeta EDO list" than the zeta peak list. You could say taking the values at the EDOs makes the most sense but after consideration of how zeta works/behaves, allowing octave tempering can be seen as a method of accounting for the "tendency" of an equal temperament (whether it generally tunes primes sharp or flat), hence resulting in only favouring systems that tend close to just. --Godtone (talk) 19:01, 14 April 2025 (UTC)
- Ok, it could be made more clear that it's a relative error measurement. It's there in the intro but not in the derivation. To be honest I wouldn't read that much into the "intuitive explanation" section, there's a lot of details that I'm skipping over deliberately.
- As for your second point, I don't personally believe integral or gap lists are that meaningful, if only because they depend on the choice of sigma = 1/2. But currently the plan is the leave the main lists as they are right now, so the integral list would be included. Also, the general sharp/flat tendency is taken into account already by taking non-integer peaks, so I do agree that restricting to integers is not that interesting.
- â Sintelđ (talk) 20:08, 14 April 2025 (UTC)
- Well, to be specific, I didn't say that zeta integral was intended to account for octave-tempering, I said I believed it corresponded to robustness of detuning the octave so that it seems to me more reasonable to consider the pure-octaves tunings for zeta integral equal temperaments than zeta peak equal temperaments. This can be demonstrated pretty directly by noting that the zeta integer peaks are meaningfully different from the zeta peaks. --Godtone (talk) 20:27, 14 April 2025 (UTC)
- Zeta integral and zeta peak integer are different metrics; zeta peak integer refers to the value of zeta at the pure-octave EDO while zeta integral refers to the integral/area under the curve between two zeros, which is only definable at s = 1/2 (assuming RH) because that's where the zeros are; similarly zeta gap refers to the distance between the two zeros adjoining the peak (normalized in some way?) and is therefore also specific to s = 1/2. Are you referring to peak integer edos instead? In that case the list is still on the working page.
- Lériendil (talk) 22:52, 14 April 2025 (UTC)
General concern about edit strategy
I generally am opposed to simply replacing a page that has had many small contributions over a long period of time and which has existed mostly unchanged unless that page is bad enough to the point of being hard to salvage/address the fundamental expository issues of without essentially rewriting it completely. I believed that the Fatherâ3 equivalence continuum was bad enough to warrant this strategy (I wanted to replace it with what is currently located at Fatherâ3 equivalence continuum/Godtone's approach, but in retrospect I should've tried moving the former to a sub-page as my intent wasn't deletion). I don't believe the zeta page is bad enough. The issues I believe that page has that I don't believe the zeta page has are:
- Lacking clear motivation as to why you'd want to make certain choices. Gene's derivation does not lack this and I just went through the effort of making explicit some things that might be non-obvious.
- Comprehensibility: even for a math-intimidated reader, the result is ultimately in edo lists of one kind or another, which IMO are accessible, given they stand out as lists of clickable numbers, and given you aren't required to understand all parts of a derivation to make use of the result. (For example, I don't understand the very last steps in Gene's derivation, but I understand them as being a mathematical exercise of showing equivalence so that it's in a sense a trivial (but important to work out for rigor) detail.) By contrast, the rational points at which temperaments are located in the continuum don't correspond to anything obvious unless you already know what sort of relation it's supposed to have.
Having said this, I don't understand the other derivations well enough to comment on their comprehensibility or well-motivatedness (which probably reflects badly on them TBH).
Point being, as a wiki, I believe the purpose is above all to document. To document well should not be a reason for replacing what many had previously collectively agreed was worth documenting through incremental changes. Therefore I believe it's much more productive to bring up specific sections of the zeta page that might be in dire need of change/replacement, rather than replacing the whole page outright. (Unless I've misunderstood how much or what User:Sintel/Zeta_working_page is supposed to replace exactly?) --Godtone (talk) 21:27, 14 April 2025 (UTC)
- I find it easier to start from scratch sometimes. Changes do pile up over time, but with nobody to act as a editor (in the publishing sense) it becomes a mess.
- My main contributions are rewriting the intro, adding a derivation that people can follow more easily, as well as just a general cleaning up of the page. The last part is already done partly now, with sections being moved to the appendix.
- Obviously I could just replace sections one edit at a time, ship of Theseus style, but I thought it'd be polite to let others review it before making big changes.
- â Sintelđ (talk) 22:47, 14 April 2025 (UTC)
- I largely concur with Godtone here; I'd rather review each section one by one and add insertions and changes from the working page into each where needed.
- Lériendil (talk) 22:50, 14 April 2025 (UTC)
- On more specific points, I believe that all three derivations should be included: the streamlined derivation based on Peter Buch's work should come first, while Gene's and Battaglia's come after. I think it's in general very edifying to see multiple routes of approach to the same concept, to show that concept's naturalness, and especially in this case these different derivations reflect different things you're actually measuring for, which lead to different variants of zeta - e.g. real vs absolute - and have bearing on the choice of sigma. Speaking of which, I think that the section on the "matter of sigma" should include all its current contents (excised from Gene's derivation) in addition to other writeup (which I plan to do) on why sigma = 1 is reasonable as well. Both Gene's and Battaglia's derivations provide good insight into the subtleties of this choice and I think they have a good cause to remain on the page as a result.
- Lériendil (talk) 22:57, 14 April 2025 (UTC)
- Yeah, that's the plan. To be clear, my reasoning for posting the link was asking for feedback on the writing that is there now. It's obviously a work-in-progress / incomplete page as it stands.
- â Sintelđ (talk) 23:04, 14 April 2025 (UTC)
Criticisms of and possible improvements to new list
If anyone doesn't think these lists are high-quality enough I first encourage naming a bunch of EDOs you don't think should be included in the list (note that 39edo isn't included in any list because it's 39et that's included, as 39edo is near a zeta valley), and then discussing how to improve it. I agree that there are a few ETs in the extended list that seem out of place, and that it seems to get slightly more dubious as we look at larger ETs. Therefore one fix is instead of looking at the absolute error (multiplying by the ET) we could still take tone-efficiency into account by multiplying by the square-root of the ET, but this is harder to motivate beyond "a balance between only caring about relative error (efficiency) and only caring about absolute error (tuning damage)", so it sort of implicates the inclusion of the latter list as a prerequisite so we have something to compare to. Another alteration is trying to improve the extended list. For example, we could include all ETs that do better than the second-best record-setter rather than the second-best scorer, so that we have a bound that is more forgiving than "second-best scorer" without including too many ETs as "better than third-best scorer" might be judged to do. This is again harder to motivate, but if we take both of these alterations as a given, the list is extremely high-quality. Again, s = 1/2 and s = 1 give the same results thru 311et, with the only difference being that s = 1/2 includes 37et and 121et. The resulting sequence includes every ET < 11, so I'll start it at 10. This sequence is:
10, 12, 14, 15, 17, 19, 22, 24, 26, 27, 29, 31, 34, 36, (37,) 38, 39, 41, 43, 46, 53, 58, 60, 63, 65, 68, 72, 77, 80, 84, 87, 94, 99, 103, 111, 118, (121,) 125, 130, 140, 152, 159, 171, 183, 217, 224, 243, 270, 282, 289, 296, 301, 311
I can say with confidence that every EDO >= 111 (except maybe 121) deserves to be here, though it's sad that 48, 50, 56, 106, 113, 137, 149, 161, 193, 202, 229, 239, 248, 277 (which I mention as being present in the extended list I added) are missed (which also very much deserve to be there).
The way I am judging is looking how many occurrences there are of that EDO in the optimal_edo_sequence
s for odd-limits 23 thru 123. For EDOs 72 or smaller it's possible to evaluate manually fairly easily, so that this is mainly for larger EDOs, because EG it's not obvious that 106et would be performant. Some EDOs like 190 appear very rarely by this metric, but as 190 has about the same score as 193 (so that IIRC zeta slightly prefers 190 to 193) it seems worth including. Examples of large EDOs present in none of these zeta lists discusssed so far but appearing abundantly in the optimal_edo_sequence
s for odd-limits 23 thru 123 are 181edo and 258edo, where the former is notably only two off from 183edo. 181 and 183 appear the same number of times (25), where ~half of the time only one of the two appear and the other ~half both appear. An example of a medium EDO that appears in a variety of altered zeta EDO lists but which hasn't appeared in any of these is 62edo, which appears in the optimal_edo_sequence
for every odd-limit 19 thru 77 except 27, as well as in the 93-, 95- and 97-odd-limit.
To my eye, the only EDOs that seem out of place in the extended list that I documented are 38, 39, 45, 60, 96, 176, 212, which I suspected intuitively, but confirmed via checking number of occurrences in the optimal_edo_sequence
s for odd-limits 19 thru 123: 38 has one appearance (39-odd-limit), 39 has zero (though that one's unfair cuz it's not octave-tempered but zeta tells us it really should be), 45 has zero, 60 has two (31- and 33-odd-limit), 96 has zero, 176 has zero and 212 has zero. But for some reason, zeta prefers 60et over 63et generally speaking.
--Godtone (talk) 18:10, 16 April 2025 (UTC)
- There simply isn't a need for any 'new list', zeta does what it does, and if you want to make your own list of 'good edos' you can do so, but just be honest that that is what you are doing.
- If you forced me to come up with a list I'd probably say 5, 7, 12, 19, 31, 41, 53, should be there for it to make any sense, everything else is a wash (to be honest I'm still kind of surprised by 27 being in the 'main' list.)
- Secondly, the reasoning you wrote doesn't make sense to me. You go from relative error to absolute error by dividing by the edo, not multiplying. Zeta does kind of look like a relative error measurent, but it isn't really, so it doesn't work out.
- â Sintelđ (talk) 20:00, 16 April 2025 (UTC)
- Take a close look at the expression at the end of Gene's derivation:
- [math]\displaystyle{ \displaystyle F_s(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\cos(2 \pi x \log_2 n)}{n^s} }[/math]
- This has the behaviour that it "rewards" for being in-tune and "punishes" for being out-of-tune, and it looks only at harmonics that are prime powers, with a simplicity weighting.
- It should hopefully be obvious from this expression that what it is measuring is in terms of steps of x equal temperament (because "(near-)perfectly in tune" means the cosine in the numerator evaluates to (nearly) 1 and "(near-)perfectly out of tune" means it evaluates to (nearly) -1), which we can confirm by noticing that the unaltered zeta graph has its record peaks grow very slowly/subtly, which should intuitively make sense: if you are measuring by cosine, for every interval that's in there's gonna be an interval that's out; you can't beat this, you can only try to prioritise the intervals that are lower complexity, and even that only works to a slight extent (as is evident from the flatness of the graph).
- If we divide by n, then we would get a very strange graph that as far as I can tell doesn't make any sense, because the "valleys in error" (which here, because of the sign flip, are peaks) would become smaller and smaller (regardless of the sign flip), so how would you even tell what a record is? (If you apply this reasoning correctly to something based on 1 - cos(2pi x) (like the previous step in Gene's derivation), then you get something fairly different, which would be a relative error score, because it'd always be strictly positive (except for at 0 equal temperament).)
- In other words, what zeta gives is a kind of "score" to an EDO based on contributions of prime power harmonics as being in- and out-of-tune, and this score is relative to its step size, therefore it seems to me that the correct alteration must be to multiply by the EDO, because that corresponds exactly to how much of an advantage (in terms of maximum cent error) a larger EDO necessarily has over a smaller one.
- Also, zeta contains a lot of interesting tuning information which is basically completely absent in the main lists because of being purely in terms of relative error and only looking at strict records.
- Also, "5, 7, 12, 19, 31, 41, 53" is guaranteed in practically any sane list derived from zeta.
- I've been trying to figure out how to make it more clear why I believe that the alteration is correct. So it seems like it must be correct to think of cosine as being a function that gives a reward or punishment in the -1 to 1 range so that confirms it is in some sense directly related to the step size. The question is rather whether multiplying by x is for sure the right adjustment to make it absolute. The reason I believe it is correct is because of how we expect the relative and absolute scoring function to behave w.r.t. contorted systems. Consider 53edo which is very strong in the 5-limit, so that its 5-limit mapping is preserved for quite a few multiples. The cosine will consider 53x-edo as having underlying relative errors as x times as off, and in the absolute sense this corresponds to the maximum offness being 1/x the size. Therefore, if we want to adjust for the fact that we are judging with a -1 to 1 range for harmonics that can only be up to 1/x as off, isn't the correct adjustment necessarily to multiply by x? --Godtone (talk) 15:42, 17 April 2025 (UTC)
Alternate list based on unmodified zeta function
Here's a list based purely on unmodified zeta, in case someone proves the alteration is wrong (though I'd still be interested in an "absolute" version of the list that includes an equal temperament if it's better than the 3rd-best-scorer so far). Because there's no accounting for the size of the equal temperament, I'm giving equal temperaments a lot of chances to appear to try to account for this bias, so that an equal temperament appears if it's better than the 10th-best-scorer so far. The other reason I give so many chances is that the resulting list is very similar and also surprisingly high-quality.
Take a look at User:Godtone/zeta#Top 10 and compare edos you're unsure about to User:Godtone/optimal_edo_sequences by looking for number of occurrences (please share any findings/concerns here or on the talk page for the zeta page I made).
A rather strange recurring theme is 60edo is liked by zeta a surprising amount, but looking at its low- and high-limit tuning profile it doesn't seem that remarkable to me. (A strange coincidence is some time ago I had a dream that this was a good edo. That doesn't happen often at all (dreaming about edos, let alone a specific one being good; the dream said its 11-limit was good; maybe that's true in the sense that the high errors of 5, 7 and 11 can easily cancel each-other out in ratios or composites, since zeta doesn't obey a val). Also happens to be significant as the simplest way to represent fourth-order ambiguities in my theory of functional harmony which I derived from first principles starting from Ringer scales (especially Perfect Ringer scales), so that (other than the 12edo intervals) it represents the most xenmelodically nontrivial categories available (which correspond to areas of nontrivial harmony).)
--Godtone (talk) 18:39, 17 April 2025 (UTC)
Top 20 (and top 10) zeta edos
Since I got increasingly curious how high-quality the lists can be using the "top n" strategy applied to zeta peaks, I've detailed them and shared the lightly-modified code here: User:Godtone/zeta (same page I linked before).