Why does Western music divide the octave into 12 notes? Why do some chords shimmer while others waver? An interactive exploration of tuning systems — where number theory meets the physics of sound.
Pluck a string. The sound you hear is not a single frequency but a tower of harmonics — the fundamental, then twice the frequency, three times, four times, and on upward. When two notes sound good together, it's because their harmonics align. When they don't, you hear beating: a wavering interference pattern that signals mathematical discord.
For over two millennia, musicians and mathematicians have struggled with a fundamental problem: you cannot build a perfectly tuned scale. The numbers simply don't work out. Every tuning system is a compromise, and the compromises tell us something deep about the relationship between mathematics and perception.
When you play a note at frequency f, you also hear 2f, 3f, 4f, and so on — each progressively quieter. These overtones define the character of every acoustic instrument. The remarkable thing is that the first several harmonics map naturally onto the notes of a major chord:
The harmonic series from C4. Red markers show deviation from equal temperament.
Notice harmonics 4, 5, and 6: they form a major triad (C-E-G) with frequency ratios 4:5:6. This is why major chords sound consonant — they are literally embedded in the physics of vibrating strings. But look at the deviation column: the 5th harmonic (E) is 13.7 cents flat compared to the E on a modern piano. The 7th harmonic (Bb) is a startling 31.2 cents flat — practically a different note.
This is the seed of the tuning problem. Nature gives us ratios like 3/2 and 5/4. Our keyboards give us 27/12 and 24/12. Close, but not the same.
Click any interval below to hear it played in all four tuning systems. Listen for the beating — the wavering quality that signals impure intervals.
Click an interval to hear it in the selected tuning system. Use the buttons to switch tunings.
Pythagoras built his scale from a single ratio: the perfect fifth, 3/2. Start on C, go up a fifth to G, up again to D, and so on. After 12 fifths you should arrive back at C — but you don't. Twelve perfect fifths overshoot seven octaves by about 23.5 cents, a discrepancy called the Pythagorean comma.
The result: Pythagorean tuning has exquisitely pure fifths but harsh major thirds (81/64 instead of the natural 5/4). Medieval music, which was built on open fifths, sounded glorious in this tuning. But as composers began using thirds in the Renaissance, something had to change.
What if we tune intervals to their simplest possible ratios? A fifth is exactly 3/2, a major third exactly 5/4, a minor third 6/5. In just intonation, the major triad 4:5:6 is mathematically perfect — zero beating, pure consonance.
The catch? You can't modulate. A scale tuned justly in C major sounds wrong in D major because the intervals between notes are uneven. The whole tone from C to D (9/8) is different from D to E (10/9). Just intonation is beautiful but trapped in one key.
A clever compromise: flatten each fifth by a quarter of the syntonic comma (the gap between a Pythagorean and just major third). Now major thirds are pure (5/4), and you can play in several keys. But venture too far around the circle of fifths and you hit the wolf fifth — an interval so dissonant it howls.
In meantone, 11 fifths are slightly narrow (696.6c). The 12th must absorb the accumulated error: 737.6 cents, nearly 38 cents sharp of pure. Click to hear it.
The radical solution: divide the octave into 12 exactly equal steps, each a ratio of 21/12 ≈ 1.05946. No interval except the octave is pure. Every key sounds the same. Every interval is slightly wrong — but equally wrong everywhere.
This is what modern pianos, guitars, and electronic instruments use. It's a mathematical compromise that enables Bach's Well-Tempered Clavier, jazz chord substitutions, and Coltrane's sheets of sound. The cost is a persistent, low-level beating in every chord — so ubiquitous that we've stopped hearing it.
The most revealing comparison: play a C major triad (C-E-G) in each tuning and listen to the beating. In just intonation, the chord is perfectly still. In equal temperament, it wavers.
The numbers tell the story: Pythagorean tuning has the worst triads (40.9 Hz total beating), optimized for fifths at the expense of thirds. Just intonation is perfect — zero beating — but only in this one key. Meantone splits the difference, sacrificing a little fifth purity for perfect thirds. And equal temperament sits in the middle, everything slightly off, nothing terribly wrong.
How far does each tuning deviate from equal temperament? The chart below shows the answer in cents (hundredths of a semitone). Most trained musicians can detect differences above about 5 cents.
Several patterns emerge. Just intonation and Pythagorean agree on the fifth (+2c) and fourth (-2c) — both use the pure 3/2 ratio. But they diverge sharply on the major third: JI pulls it 14 cents flat (toward the pure 5/4), while Pythagorean pushes it 8 cents sharp (from stacked fifths). Meantone follows JI on the thirds but has its own peculiarities elsewhere, especially the grotesquely flat tritone (-21c).
Play the keyboard below to hear individual notes in your chosen tuning. Try playing scales and listen for how the step sizes feel different — wider in some places, narrower in others.
Of all possible divisions of the octave, why did we land on 12? Because 27/12 ≈ 1.4983 is remarkably close to 3/2 = 1.5 — the perfect fifth. The error is only 2 cents. No smaller number of equal divisions does as well. (19, 31, and 53 equal divisions also approximate pure intervals well, and have been explored by adventurous composers.)
Mathematically, this is a consequence of the continued fraction expansion of log2(3/2) ≈ 0.58496. The convergents of this fraction are 1/2, 3/5, 7/12, 24/41, 31/53... Each denominator gives a good equal division of the octave. 12 is the first one that's both accurate and practical.
"The tempered scale is a compromise between mathematical perfection and practical necessity. In a way, it's the most human of all tuning systems — not because it's perfect, but because it acknowledges that perfection is impossible and finds a way to work anyway."
Equal temperament gave us modulation — the ability to move freely between keys, the harmonic language of classical music, jazz, and pop. Bach's Well-Tempered Clavier was a celebration of this freedom. Romantic composers used it to build vast harmonic architectures spanning multiple key centers. Jazz musicians use it to substitute distant chords.
What we lost is subtler: the glowing purity of a just major third, the bright clarity of a Pythagorean fifth, the character that different keys had in historical temperaments (where each key had a unique pattern of pure and impure intervals). In Baroque music, the choice of key was partly an aesthetic one — D major felt different from Bb major, not just higher or lower.
Today, interest in historical tuning is reviving. Early music ensembles perform in meantone or Vallotti temperament. Barbershop quartets instinctively adjust to just intonation. Electronic musicians explore microtonal scales with 19, 31, or 53 divisions. And every time a string quartet plays a pure major third, bending ever so slightly from what the score says, they're reaching back through centuries to the mathematics that started it all.