← All animations

🎢 Tuning & Temperament

Music theory hides an awkward arithmetic problem: the simple whole-number ratios that sound pure to our ears refuse to fit together. Stack the prettiest interval β€” the perfect fifth (3:2) β€” twelve times and you almost land back where you started, but not quite. That tiny mismatch is why every piano you've ever heard is deliberately, cleverly out of tune. Scroll through to see the gap, then hear the compromise.

1. The Pythagorean comma β€” pure fifths never close the circle

A perfect fifth multiplies a frequency by exactly 3/2. An octave doubles it (2/1). Walk up twelve pure fifths and you'd hope to reach the same note as seven octaves β€” they're supposed to meet on the circle of fifths. But (3/2)12 = 129.746… while 27 = 128. The pure stack overshoots by a sliver: the Pythagorean comma, about 23.46 cents (nearly a quarter-semitone). The two spirals below start together and visibly fail to line up.

Step 0 β€” unison +23.46 cents over 7 octaves

2. Just vs equal temperament β€” hear (and see) the beating

Pick an interval. In just intonation both notes use a pure small-number ratio, so their waves lock and the sound is glassy-smooth β€” no beats. In 12-tone equal temperament every semitone is exactly 21/12, so the upper note is off the pure ratio by a few cents and the two waves drift in and out of phase: you hear a slow beating wobble. The plot is the sum of the two waves β€” watch its envelope pulse in equal temperament and stay flat in just. The trade: equal temperament is a little impure everywhere, but you can play in every key with one tuning.

Pure ratio 3:2 220.0 & 330.0 Hz Cents off pure: 0.0 Beat rate: 0.0 Hz

3. Why pianos are equal-tempered β€” the comma, cents & history

The comma. Because the pure fifth (3:2) and the octave (2:1) are built from different prime numbers, no stack of one ever exactly equals a stack of the other β€” the leftover is the Pythagorean comma (~23.46 cents). You can't tune all twelve fifths pure and all the octaves pure; something has to give.

Cents. Musicians measure these tiny errors in cents: 1200 cents to an octave, 100 to an equal-tempered semitone, so a cent = the 1200th root of 2. The formula is cents = 1200 Β· log2(ratio). The human ear notices roughly 5–10 cents, and hears two notes that are a few cents apart as beating.

The fix. Equal temperament spreads the comma evenly: it makes every semitone exactly 21/12 β‰ˆ 1.0595, so the octave stays perfectly pure but every other interval is slightly off β€” fifths are 2 cents flat, major thirds a noticeable 14 cents sharp. The reward: a piano tuned once plays in all 24 keys equally (im)passably, so you can modulate freely.

History. Before equal temperament won out (roughly the 18th–19th centuries) keyboards used unequal temperaments β€” Pythagorean, quarter-comma meantone (gorgeous pure thirds but a howling "wolf" fifth), and well-temperaments like Werckmeister β€” which made nearby keys sweet and remote keys spicy, giving each key its own character that equal temperament flattens away.