Oct 22

Music and an Accident of Mathematics

by Anton Schwartz

Did you know that much of what we understand as music rests on a big mathematical coincidence? Namely, that two to the \frac{7}{12} power is approximately equal to 1.5.

    {\Large\[2^\frac{7}{12} \approx 1.5\]}

If you’ll stick with me for a minute I’ll show you what I mean.

Consider these two basic facts of music:

  1. The circle of fifths tells us that if we start on a note and move up or down a fifth 12 times, we get back to the same note we started on (though in a different octave).
  2. The two most fundamental intervals in music are the octave and the fifth. The frequencies of two notes an octave apart have a ratio of 2:1. For a perfect fifth, the ratio is 3:2.

The problem is… (1) and (2) can’t both be correct. We have to choose!
Let’s see why that is.

Almost all of the #music we listen to relies on a crazy #coincidence of #math. Click To Tweet

The A string on a bass has a frequency of 55 Hz, or 55 vibrations per second. (The unit of frequency, hertz, abbreviated Hz, means vibrations per second.) When we multiply 55 by 1.5, what we get is the frequency of the note (E) a fifth higher—namely, 82.5 Hz. We can get the frequency of B by going up another fifth from E: it has a frequence of 123.75 Hz because 123.75 = 82.5 × 1.5 = 55 × 1.5 × 1.5. If we continue to generate all the notes by going up in fifths twelve times, we arrive again at A:

A → E → B → F# → Db → Ab → Eb → Bb → F → C → G → D → A

The frequency of this high A, 7 octaves above the original one, is 55 Hz multiplied by 1.5 twelve times, which is to say 55  \times1.5^{12} or 7136 Hz.

Since this A is seven octaves above the low A (55 Hz) we started with, we could have found its frequency by just doubling 55 seven times. After all, moving up an octave just doubles a note’s frequency, right?

By that reasoning the frequency of that high A is 55 \times 2^7, which is to say 7040 Hz.

That’s close to 7136 Hz but not the same. The two pitches differ by 23.45 cents, or approximately a quarter of a half-step.

Listen to what I’m talking about. Here’s an example of a starting note (middle C), followed by G, D, A… going around the circle of fifths and finally arriving back at C. In each case the next note is a fifth higher, 1.5 times the frequency of the previous one. (Sometimes we lower it an octave so it stays in the same general range.) We keep the original C playing underneath. Listen to the sequence and the final C that it arrives at. And notice how out of tune it sounds with the original C:

Moving around the Circle of Fifths: Intonation Diverges

What you’re hearing is the 23.45 cent difference that’s accumulated over the course of the journey around the circle of fifths.

What’s up with that?!?

The Problem

The inescapable bad news is that our notion of an octave—the most basic interval, found throughout nature and representing a 2:1 ratio of frequencies—and our notion of a perfect fifth—the second most basic interval, also found throughout nature and representing a 3:2 ratio of frequencies—are incompatible with the very notion of the circle of fifths—the notion that moving up a fifth twelve times should move us up seven octaves from the original note.

But the good news is that they’re close enough that we can “fudge it” and never even worry about the difference. (Almost never, anyhow. It does cause subtile problems in situations where musicians do tune their fifths to a 3:2 ratio, such as a choir in a church.)

The Solution: Equal Temperament

The solution is to redefine the perfect fifth so that it is compatible with the octave. Instead of using the 3:2 ratio, we divide up an octave into twelve equal half steps and define a fifth to be equal to seven of those half steps. In other words, every half step interval represents a pitch ratio of \sqrt[12]{2}, i.e., 2^\frac{1}{12} — we design it that way so that twelve half steps together yield a ratio of 2^\frac{1}{12}\times 2^\frac{1}{12} \times\dots\times 2^\frac{1}{12} multiplied by itself 12 times, or \left(2^\frac{1}{12}\right)^{12}, which is equal to 2^\frac{12}{12} or, simply, 2. Thus twelve half steps make up an octave. We call this solution the Equal Temperament tuning system. In it, the perfect fifth, which is made up of seven half steps, has a ratio of 2^\frac{1}{12} multiplied by itself seven times, which is to say \left(2^\frac{1}{12}}\right)^7 or 2^\frac{7}{12}. Which equals 1.4983. That’s not 1.5 but it’s pretty darn close.

Listen to the difference. Here’s a “just” perfect fifth interval—two notes with a frequency ratio of 1.5:

Just Perfect Fifth Interval (3:2 Frequency Ratio)

And now listen to the same interval played with equal temperament, so that the frequency ratio is 1.4983:

Equal Tempered Fifth Interval (1.4983 Frequency Ratio)

Can you tell the difference? Most people don’t notice it. The telltale sign is the “beats” present in the equal-tempered version that are absent in the other one. Those are the pulsations in the sound—in this case, a bit more than one per second—caused by the misalignment of the lower and the higher pitched waves. A 3:2 ratio means that the higher pitch vibrates three times in the same amount of time that the lower pitch vibrates twice… so every other time the lower pitch vibrates, the two waves align. But with equal temperament, the alignment is not perfect. Like windshield wipers that are almost, but not quite in sync with the beat of the music that’s playing on the radio—or two metronomes keeping slightly different time—they are in and out of sync, periodically meeting up.

The Upshot

For all practical purposes, the adoption of Equal Temperament has put an end to the issue of systems of tuning in western music. Alternate tuning systems are still in use, and are discussed at great length in academia, but rarely, if ever, appear in the music listened to by the vast majority of people.

But if you’re interested…

Still, tuning systems are a fascinating subject. For instance, it turns out that the octave and the perfect fifth are not the only intervals to correspond to simple ratios of whole numbers. Rather, all of our western intervals can be expressed that way. Some more simply than others. (For example, the major third, as it appears in nature, represents a 5:4 ratio, whereas the tritone is 45:32.) Not only are these intervals incompatible with equal temperament, they are also incompatible with each other and the circle of fifths. If the ratio of a fifth is 3:2 then we ought to be able to derive the ratio of a major third by going up a fifth four times and down an octave twice. That corresponds to (\frac{3}{2})^4\times 2^{-2}. Which is \frac{81}{16}\times\frac{1}{4}  or  \frac{81}{64}. This is called the ditone or Pythagorean major third. And it is different from the just major third, the \frac{5}{4} ratio which is equal to not \frac{81}{64} but rather \frac{80}{64}. The difference between the two notes—a ratio of 81/80 or about 21.5 cents—has a name: the syntonic comma. (The gap in pitch between two variants of a given note is called a comma.) Likewise, three major thirds (each a 5:4 ratio) should add up to an octave (2:1 ratio), but in fact they yield (\frac{5}{4})^3 or \frac{125}{64}, which is 1.953, not 2 (which equals \frac{128}{64}). This comma has a name too: the diesis. It amounts to about 41 cents.

Epilogue: What is a coincidence, anyhow?

There are thousands upon thousands of books and articles written about tuning systems, in much, much more detail than I’ve touched on here. What surprises me so much is that every one I’ve seen “buries the lead.” For me, the most gripping part of the story is the obscure mathematical fact that lies at the heart of all of the music I listen to. There’s no shortages of “coincidences” in math. For instance, there’s a sequence of six 9’s in a row within the first 800 digits of π. What makes 2^\frac{7}{12} \approx 1.5 so different is that it has consequences. HUGE consequences. We think of music as not a random construct of society but something much bigger, many would say an essential part of the universe. How can it rely on a two things being not-quite-equal-but-really-close? Doesn’t that make all of music a coincidence?

Maybe the answer is that music is the same kind of coincidence as carbon based life on Earth. Life as we know it depends heavily on various properties of chemistry in conjunction with specific conditions on Earth. As far as I know, those properties and conditions have no special significance apart from the fact that they give rise to life… much the same way 2^\frac{7}{12} \approx 1.5 is of no particular importance except as far as music is concerned. In which case, music may be a coincidence, but it is no more of a coincidence than life itself.

Me, I suppose I’ll settle for that, for now.

As always, I welcome your thoughts!

Almost all of the #music we listen to relies on a crazy #coincidence of #math. Click To Tweet

14 Responses

  1. Peter Persoff says:

    In my circle of musical acquaintances (traditional Irish music mostly but also concertina afficionados who are interested in various ways of tuning) I’m about the only one who cares about this. Thank you for the audio samples — I was thinking of making my own audio samples and now I don’t have to. I would also like to hear the other comparisons between the major thirds.

    • Yes – how to tune the fiddle strings! Interestingly, the fifth, and its inverse the fourth, of all the equal tempered intervals, are the ones that are most accurate to their just tempered, integer ratio, counterpart. (Good thing too, because they’re the ones with the simplest ratios, which I’m guessing would mean that inaccuracies would be easier to hear for them than the rest.) I’ll try to add audio comparison of major thirds when I have a moment. Good idea, though I wonder how many people make it that far down into the post. :)

  2. Brett Gaines says:

    Thanks for the post. I read the whole thing then took about a 45 minute excursion through Wikipedia and the web to learn more about equal temperament as applied to the guitar and tuning. Among other things, I now have a better appreciation for why major-third intervals between the 2nd and 3rd strings on a properly tuned guitar have nearly driven me to drink for decades.

    • Yes, Brett, I have no idea how one would go about tuning a guitar (with equal-tempered frets) with harmonics (that obey just temperament)! Is that an argument for tuning using fully fretted notes and going equal temperament all the way?

      • Brett Gaines says:

        Anton, this article I found on my sojourn on the subject of guitar fretboard and equal temperament says it well, I think. It also explains why that major third interval between the 2nd and 3rd strings drives me nuts when the guitar is perfectly in tune. It’s 14 cents sharp! The article goes on to discuss various “do” and “don’t” tuning methods, with correct methods using both fretted notes and harmonics. Or, just use an electronic tuner like I do. :-)

        http://www.guyguitars.com/eng/handbook/Tuning/tuning.html

        “Equal temperament is the ultimate compromise. Tonal purity is sacrificed for ease of modulation. Depending on your viewpoint, equal temperament either a) makes every key equally in tune, or b) makes every key equally out of tune… The idea is to make it possible to play all intervals and chords, in all keys, with the same relative accuracy. Although every key is very slightly out of tune, every key is also useable. No key sounds worse than any other key. The same applies to all chords. Theoretically, that is. In practise certain intervals and chords can still sound dissonant. Thirds are especially troublesome, as the even-tempered minor third is 16 cents flat to the “pure” minor third and the even-tempered major third is 14 cents sharp of pure. The equal-tempered major sixth is 16 cents sharp of just, and the equal tempered major seventh is 12 cents sharp of just. The only interval which is identical in the two scales is the octave.”

  3. Susan Dahlseide says:

    Thanks for posting. I’m teaching piano and working in the math as I go along with my students. They’re really interested in the why’s and how’s. I can see this as a very useful tool, even its basic paradigm shift. Another way to reach the student is always welcome.

  4. Cameron says:

    I have a masters degree on music theory and this is quite possibly the dumbest thing I have ever read.

    • Keith Herbert says:

      Which part do you dispute?

  5. Keith Herbert says:

    Jacob Collier is one of the few people I’ve encountered who can actually use these anomalies in his compositions.
    Check out his song My Hideaway (youtube). He starts in one intonation and adjusts upward at the chorus based on the major third discrepancy.
    In some of his discussions he sings a major third with the keyboard and then plays the third on the keyboard to show the difference.
    He also sings microtonal intervals which to me challenges equal temperament even further.

    • Thanks, Keith. I’ve heard Jacob has a lot to say about music theory – I look forward to checking it out since he’s a deep musician!

  6. Equal-Temperament changed everything. It used to be (before we adopted it completely) that when you modulated, the new key sounded slightly out of tune, so you actually HAD to go back to the old key (and also only ending on a triad sounded right.) Now we can modulate to where ever we want and there is no need to ever go back. Also, we can play something other than a triad and it can function as the “tonic” chord or ending chord, etc. Actually in Jazz, “common-practice” tonality, i.e. V-I (if used at all), is only referential at best. You may be surprised that even Beethoven was not writing for equal-temperament, so the way we hear his pieces now are not how he did (and no, Bach was not equal-temperament either, that was “well-temperament” something different.) Actually they knew about Equal-Temperament in the Renaissance, but never used it, because everyone thought it sounded “bland” and ruined the subtleties.

    • Great points you make, Michael. Especially the way non-equal temperament systems give an elastic pull toward a piece’s tonal center that is absent in jazz and the rest of today’s music. Though I don’t agree that common practice tonality is not a major ingredient in jazz.

      Yes, I think (hope) that most serious musicians are aware that much of the great classical must was written before equal temperament. Just because I coldly state that almost all of the music society listens to is played in 12TET, it doesn’t mean that I don’t have a great affection for the other temperaments. The purpose of this piece was really just to marvel at 2^19 ≈ 3^12 and its importance in music.

  7. Brian Rosen says:

    To be fair… all of WESTERN music depends on this coincidence. There are plenty of music systems that think of intervals differently.

    • I agree completely, Brian. At first I had “western music” but I was dismayed to learn that some people understood that to mean country/western! So I settled on “virtually all of the music we listen to”.

Leave a Reply