The Mathematics of Tuning Systems

4 days ago (math.ucr.edu)

A bit too mathematical for my taste. I learned my tuning theory by owning a harpsichord, and learning to tune it. A harpsichord is more sensitive to the "rounding errors" in equal tuning, owing to the richer overtones, so equal temperament does not sound quite as good a compromise as it does on a piano. And those historical temperaments are so much easier to tune by ear. Besides that is what the they used at the time of Bach, so historically correct for playing Baroque music.

With real instruments, you must also manage inharmonicity.

A real piano string, for instance, is made of metal and resists bending slightly unlike an idealised string. This affects higher harmonics more than lower ones (think of all the bends in the string on the 7th harmonic, for example). This increases the harmonic frequencies slightly above exact integer multiples of the fundamental.

As a result, pianos require "stretched tuning" so the harmonics better match the higher notes. It's always a bit of a compromise. The higher harmonics will be more "off" than the lower ones.

So even if you were to tune the fundamental frequency of all the keys on a piano "perfectly" in a given key (so-called Just Intonation), the harmonics would not perfectly match up.

When you think the article is ending, you get more links for further indulging! Thanks.

Very cool explanation. Something I've come across a few times on here was wanting to explain how 12tet "includes" or handles approximations of intervals from other scales, and how that affects the musical choices of musicians or especially the notation choices for transcription of improvised music.

But it's impossible to explain without getting into like, what is even the problem solved by tuning systems. Without the intuition that comes from making music, programmers and engineers see the fractions & obvious series and get too fixated on finding the "perfect" system. When these are much more physical tools, created over time to make certain processes easier. Tuning systems are more like a woodworker's knives than like the unit circle: being perfect does not make them better tools for creation if they are already fit enough.

  • 12tet is a practical compromise between overtone approximation and playability.

    Any fretted or keyed acoustic instrument with more than 12 notes/octave is extremely difficult and expensive to build and hard to tune and play.

    The music is also hard to notate, because there are so many more possible pitch positions.

    So 12 notes became a practical default for instrument builders. And from there, ET became a practical default for tuning to allow smooth-ish modulation through different keys. The errors in the tuning are the same for every key, so the tuning relationships stay the same while the key root changes.

    That doesn't quite happen because overtone perception and beating effects aren't completely linear. But it avoids the obvious out-of-tune notes you get when playing in distant keys with non-ET tunings.

As we'll see, seeking the Pythagorean ideal causes trouble. It will unleash the devil in music.

^^ from the article. this kind of thing bothers me. what is the devil? for whom is it the devil? music doesnt havent to be "christian" to "sound good".

  • It's not a literal allusion to satan and never was, it's akin to the idiom "the devil is in the details."

    It was nearly or actually impossible to harmonize or progress tritones while following the medieval "rules" for church music composition. So it is someone complaining about their work, not a statement about musical morality or whatever.

    • multiply by 3^m/2^n is a human construction. and it breaks after a bunch of m,n. to expect it "not to break" is well an expectation. nature always has a comma, its not clockwork.

A very nicely written and detailed article, with many details I have not personally learned of, in my own music technology hacking so far .. if anyone else is interested in writing software for musical tuning systems, both Xenharmlib and PyTuning are very extensive libraries for the job .. Xenharmlib for C++ and PyTuning for python.

Xenharmlib has deep support for intervals, chords, scales, non-standard notations, and advanced topics like non-Western harmonics, diatonic set theory, and non-octave-repeating systems and also allows for the mathematical manipulation of ratios and structures (harmonic exploration).

PyTuning allows for generating scales from ratios/cents, EDO, just intonation, and custom temperaments and facilitates calculations such as frequency ratios, comma approximations, and temperament comparisons, aligning with the article's derivations and trade-off discussions at a similar depth.

I hope to see more math of music articles in the future .. its a fascinating subject indeed!