The Mathematics of Imperfection
Why your piano is tuned to please your ears, not the laws of physics.
If you've ever wondered why pianos have 12 keys per octave instead of 10 or 16, or why your piano tuner seems to spend an eternity making tiny adjustments that you can barely hear, you're about to discover one of music's most elegant compromises. The modern piano is a magnificent fraud—an instrument that's mathematically wrong in precisely the right ways.
Why 12 and Not 16? The Mathematical Sweet Spot
At first glance, 16 seems like the obvious choice. We count in base 10, compute in binary, and love powers of 2. Musical frequencies double with each octave—220 Hz, 440 Hz, 880 Hz—so why not divide that doubling into 16 equal parts? It would align with how we think about halves and quarters: 16 notes, with 8 as the half-octave, 4 as the quarter. Clean. Logical. Binary-friendly.
Historically, some theorists did propose 16-division systems. In the Renaissance, when music theorists were obsessed with mathematical purity, 16 seemed to offer more notes to approximate pure intervals. More divisions should mean better approximations, right? Even today, computer musicians sometimes experiment with 16-tone equal division (16-EDO in modern parlance) because it's computationally convenient.
But here's where physics refuses to cooperate with our decimal-loving, binary-computing brains. The most consonant interval after the octave is the perfect fifth—when a string vibrates at 3/2 the frequency of another string, they sound gloriously harmonious together. This 3:2 ratio is foundational to music across cultures. In our 12-note system, we reach a near-perfect fifth by going up 7 semitones, landing just 0.1% away from that magical 3:2 ratio.
Try this with 16 divisions and everything falls apart. You'd have to choose between 9 steps or 10 steps up from your starting note. Nine steps gets you a frequency ratio of about 1.476—noticeably flat of the 1.5 you need. Ten steps? That's roughly 1.542, uncomfortably sharp. Either way, your "fifth" sounds wrong, and the perfect fifth is so fundamental that if it's off, everything built on it crumbles.
The major third tells a similar story. This sweet interval has a frequency ratio of 5:4 (or 1.25). In 12-tone equal temperament, four semitones up gives us something very close—about 1.260, just slightly sharp but perfectly acceptable to our ears. With 16 divisions, you're stuck choosing between five steps (too flat) or six steps (way too sharp). The approximations just don't land where our ears expect them.
But there's another beautiful accident that makes 12 special: it's remarkably divisible. You can split 12 by 2, 3, 4, or 6, giving you symmetrical patterns for scales and chords. Want to play major chords? They're all built the same way—4 semitones, then 3 more. Minor chords? Just reverse it—3 semitones, then 4. This pattern works in every key, a mathematical democracy that 16 can't match.
The number 12 also gives us the pentatonic scale (5 notes), the whole-tone scale (6 notes), and our familiar major and minor scales (7 notes), all with elegant mathematical relationships. It's as if 12 was waiting to be discovered, a number that accidentally encodes the harmonic preferences of human hearing.
The Great Tuning Wars: A Historical Battle for Harmony
Before equal temperament conquered the keyboard world, Europe was embroiled in what we might call the "tuning wars"—a centuries-long struggle to make keyboards sound good in more than a handful of keys.
In the Renaissance and early Baroque periods, meantone temperament ruled. This system prioritized pure major thirds in the most common keys (C, G, D, F, B♭) by slightly flattening the fifths. The result? Gorgeous harmonies in those keys, but venture into F# major and you'd encounter the dreaded "wolf fifth"—an interval so dissonant it seemed to howl. Composers simply avoided these "bad" keys, and keyboards sometimes included split black keys to provide different pitches for D# and E♭.
The 17th century saw Andreas Werckmeister developing his "well temperaments"—clever mathematical compromises that made all keys playable, though each retained a distinct character. Some keys sounded sweet and pure, others dark and tense. This wasn't a bug; it was a feature. Composers exploited these characteristics, choosing keys for their emotional color as much as their pitch.
Enter Johann Sebastian Bach, the great evangelist of well temperament. His "Well-Tempered Clavier" (note: not "Equal-Tempered") was a musical manifesto, demonstrating that beautiful music could be written in all 24 major and minor keys. Each prelude and fugue explored the unique character of its key in whatever temperament Bach preferred—a topic of heated debate among scholars even today.
The French held out longest against equal temperament, preferring their temperament ordinaire well into the 19th century. They valued the expressive differences between keys, arguing that equal temperament was like painting everything gray. But as music became more chromatic and pianos replaced harpsichords, equal temperament's ability to modulate freely between any keys proved irresistible.
The Railsback Curve: Why Pianos Are Deliberately Out of Tune
Here's where physics crashes the party. In 1940, O.L. Railsback made a startling discovery: professional piano tuners weren't actually tuning pianos to equal temperament. When he measured the frequencies of notes on expertly tuned pianos, he found systematic deviations—the highest notes were sharp, the lowest notes were flat, and the curve of these deviations was remarkably consistent across different pianos and tuners.
This "Railsback curve" wasn't a mistake—it was an unconscious correction for a fundamental problem with piano strings. Unlike the idealized strings in physics textbooks, real piano strings have thickness and stiffness. This causes their overtones to be slightly sharp relative to the harmonic series. The second partial (overtone) of a bass string might be 2.01 times the fundamental frequency instead of exactly 2.0.
When a tuner listens to two notes an octave apart, they're actually matching the fundamental of the higher note to the second partial of the lower note. If that partial is sharp due to string stiffness, the higher note needs to be tuned sharp to match it. This effect compounds across the piano's seven-octave range, resulting in the highest treble notes being about 35 cents sharp (35/100ths of a semitone) and the lowest bass notes being about 35 cents flat.
The term "cents" might sound oddly pedestrian for such precise work, but it's the standard unit piano tuners use to measure these tiny pitch adjustments. Named from the Latin "centum," there are exactly 100 cents in each semitone—making 1,200 cents in an octave. It's a logarithmic scale that matches how we perceive pitch: 10 cents sharp sounds like the same amount "off" whether you're in the bass or treble. Most trained ears can detect differences of about 5-10 cents, so a 35-cent deviation is quite dramatic—roughly a third of a semitone.
The effect is most pronounced in smaller pianos. A concert grand's long bass strings exhibit less inharmonicity than an upright piano's shorter ones, which is why grands generally sound "cleaner" in the bass register. The wound bass strings, wrapped in copper wire to add mass without length, introduce their own complex inharmonic patterns that skilled tuners must navigate by ear.
The Art of Stretched Octaves
This "stretching" of octaves isn't uniform across the piano. In the middle registers, where strings are at their optimal length-to-thickness ratio, the stretch is minimal. But as you move toward the extremes, the compensation increases dramatically.
Piano tuners don't calculate these adjustments—they listen. The human ear, remarkably, expects these stretched intervals. A piano tuned to mathematically perfect equal temperament would sound wrong to us, particularly in the bass, where the notes would seem to get progressively flatter as you descend. Our auditory system has evolved to track the overtones of complex sounds, and when those overtones don't align with our expectations, the fundamental pitch itself seems wrong.
This is why electronic pianos often sound artificial despite perfect mathematical tuning—many early models didn't account for this psychoacoustic expectation. Modern digital pianos now incorporate modeled string inharmonicity and stretched tuning to sound more authentic.
The Beautiful Compromise
The modern piano, with its 12-note octaves and deliberately imperfect tuning, represents centuries of negotiation between mathematical ideals and physical reality. It's an instrument built on compromises—equal temperament sacrifices pure intervals for universal playability, while stretched tuning sacrifices mathematical perfection for perceptual consonance.
Yet from these compromises emerges something beautiful: an instrument capable of playing Bach's crystalline counterpoint, Chopin's chromatic wanderings, and Debussy's whole-tone dreams with equal conviction. The piano's tuning is "wrong" in all the right ways, a testament to the fact that in music, as in life, perfection isn't always perfect—sometimes it's the flaws that make things beautiful.
The next time you sit at a piano, remember that every note you play is a small miracle of compromise, a frequency carefully chosen not because it's mathematically pure, but because centuries of experimentation have proven it's what our ears want to hear. In the end, the piano's tuning system is a profound reminder that human perception, not mathematical abstraction, is the final arbiter of musical beauty.
I'm learning so much from your articles and realizing just how complex music and instruments truly are.
I do wonder, though, how electronic pianos compare to acoustic ones when it comes to the tone and pitch.