Pitch and tuning

Twelve fifths and seven octaves, which are not the same thing

Stack twelve perfect fifths and the note that arrives should be the one seven octaves up. It is sharp by about a quarter of a semitone, and the whole history of tuning is a set of decisions about what to do with that.

Two facts, each unremarkable on its own.

A note an octave above another has exactly twice its frequency. A note a perfect fifth above another has exactly one and a half times its frequency. Both intervals were understood as ratios by the sixth century BC, both are audible to anyone, and both are as simple as arithmetic gets.

Put them together and something breaks.

Twelve fifths do not make seven octavesPitch drawn as a spiral: one turn is one octave, so a note's angle is its pitch class and its radius is how high it has climbed. Twelve pure fifths wind round just over seven times and finish 23.46 cents past seven octaves — the Pythagorean comma, and the reason no keyboard can be tuned in pure fifths.CC♯DE♭EFF♯GA♭AB♭Bstartseven octavestwelve fifthsthey miss by 23.46 centsone turn is one octave · angle is pitch class · radius is how far it has climbed
Fig. 1 Pitch drawn as a spiral: one full turn is one octave, so a note’s angle round the picture is its pitch class and its distance from the centre is how far it has climbed. Twelve pure fifths wind round seven times and land not quite where seven octaves land. The two dots at the top are the whole problem.

Twelve fifths, stacked, multiply the frequency by (3/2)12(3/2)^{12}. Seven octaves multiply it by 272^7. If the two arrived at the same place, those numbers would be equal.

(32)12=5314414096129.746,27=128.\left(\tfrac{3}{2}\right)^{12} = \frac{531441}{4096} \approx 129.746, \qquad 2^7 = 128.

They are not equal, and nothing can make them equal, because a power of three is never a power of two. The ratio between them is 531441/5242881.013643531441/524288 \approx 1.013643, and it is called the Pythagorean comma.

How big is it, really

Ratios are awkward to compare, so pitch is measured logarithmically in cents: 1200 to the octave, 100 to an equal-tempered semitone.

cents=1200log2r.\text{cents} = 1200 \log_2 r.

The comma is 23.46 cents. That is a little under a quarter of the gap between two adjacent piano keys — small enough that a listener will not name it as a wrong note, and far too large to ignore. Two notes 23 cents apart played together beat against each other audibly and unpleasantly, at a rate that depends on how high they are.

The simple ratios, and the twelve equal stepsOne octave laid out in cents. Above the line, the frequency ratios of small whole numbers, where they actually fall; below it, the twelve equal steps. The two sets almost never coincide.6/5minor third5/4major third4/3fourth3/2fifth8/5minor sixth5/3major sixthCC♯DE♭EFF♯GA♭AB♭BC+16-14-2+2+14-16the ratios of small whole numberstwelve equal steps of exactly 100 cents1200 cents to the octave
Fig. 2 One octave as a ruler in cents, with the ratios of small whole numbers marked where they actually fall and the twelve equal steps below. The discrepancies run from two cents to sixteen. None of them is large; all of them are audible when two notes sound together.

The cent is the unit this subject is conducted in, and it exists because the ear responds to ratios rather than differences. The interval from 100 to 200 hertz and the interval from 1000 to 2000 hertz are both an octave, and they sound like the same distance, though one spans 100 hertz and the other 1000. Any linear measure of pitch would make music’s most basic relationship look like two unrelated things.

Alexander Ellis introduced the cent in 1885, in an appendix to his translation of Helmholtz. It is the single most useful notational invention in the subject, and it arrived astonishingly late — two and a half millennia after the problem it measures.

It is not a measurement problem

The most common first reaction is that the gap is a matter of precision — that a sufficiently careful tuner, or a sufficiently well made instrument, would close it. It would not, and the reason is worth being explicit about.

The comma is not an experimental result. It is a statement about the integers 2 and 3, of exactly the same kind as the statement that 2\sqrt{2} is irrational, and it was proved rather than measured. Powers of three are odd; powers of two are even; they never coincide. No amount of care in stringing, fretting, boring or voicing changes that.

What it means in practice is that the problem cannot be solved, only placed. Three things are wanted — twelve notes to the octave, pure fifths, and closure at the octave — and any two of them can be had together.

The four classical answers

Every tuning system in history is a decision about which of the three to give up, and about where the wreckage goes.

How far each system sits from equal temperamentDeviation from equal temperament, in cents, for each degree of the chromatic scale. Zero is equal temperament by definition; the just major third is about fourteen cents flat of it and the Pythagorean major third about eight cents sharp.024681012-20-1001020semitones above the tonicCC♯DE♭EFF♯GA♭AB♭BCjust intonationPythagoreanquarter-comma meantonesharp of equalflat of equal
Fig. 3 How far each system’s notes sit from equal temperament, in cents. Zero is equal temperament by definition. Everything above the line is sharp of it and everything below is flat, and no two systems agree anywhere except at the tonic and the octave.

Keep the fifths pure and abandon closure. Pythagorean tuning stacks pure fifths and simply stops. Eleven of its fifths are perfect and the twelfth — where the chain is forced to bite its own tail — absorbs the entire comma and comes out 23 cents narrow. It is unusable, and it is called the wolf.

Keep the thirds pure and spread the damage. Quarter-comma meantone narrows every fifth by a quarter of a different comma, so that four of them stack into an exactly pure major third. It gives eight or nine gorgeous keys and one catastrophic fifth, and it was the European standard for two hundred years because most music stayed in the good keys.

Keep the ratios pure locally and abandon transposition. Just intonation tunes every note to a simple ratio against the tonic. Every interval that matters is perfect, and the key cannot be changed, because the same twelve pitches serve a different set of ratios in a different key.

Give up purity everywhere and keep everything else. Equal temperament makes all twelve fifths equally and slightly narrow — two cents flat, which almost nobody detects — and closes the circle exactly. Its major thirds are 14 cents sharp, which is a great deal, and that is the price of playing in every key on one instrument. Where each system puts the error is the whole of the comparison.

The chain of fifths in quarter-comma meantoneThe fifths laid end to end as the chain they are. The bar under each shows how far that fifth departs from a pure three-to-two, and the last one — where the chain is forced to close — is the wolf.E♭B♭FCGDAEBF♯C♯G♯D♯-5.4-5.4-5.4-5.4-5.4-5.4-5.4-5.4-5.4-5.4-5.4+35.7each fifth's departure from a pure 3:2, in centsone fifth carries the whole error
Fig. 4 The chain of fifths in quarter-comma meantone, with each fifth’s departure from a pure three-to-two drawn beneath it. Eleven fifths are about five cents narrow, which is unobjectionable, and the last is thirty-six cents wide, which is not. That last bar is where the accumulated error has been sent.

Why the fifth, and not something else

There is a prior question hiding under all of this. Why is the fifth involved at all? Why should a chain built from a ratio nobody legislated turn out to be the backbone of every tuning system anyone has built?

The first eight partials of a stringA string vibrating in one, two, three and more equal parts, with the frequency ratio and the nearest named note beside each. The seventh partial is a third of a semitone flat of anything on a keyboard, which is a fact about strings rather than about tuning.1130.8 HzC2261.6 HzC3392.4 HzG4523.3 HzC5654.1 HzE -14¢6784.9 HzG7915.7 HzB♭ -31¢81046.5 HzCpartialthe dots are the nodes — the places that do not move
Fig. 5 A string vibrating in one, two, three and more equal parts at the same time, with the frequency of each partial and the nearest named note beside it. The second partial is an octave above the fundamental and the third is an octave and a fifth. The two intervals that fail to reconcile are the first two things a vibrating string produces.

Because they are not chosen. Anything that resonates at a fundamental — a string, a column of air, a struck bar — produces partials at whole-number multiples of it, and the first two intervals in that series are the octave and the fifth. They are the most consonant intervals available because their partials coincide most, and they are what a tuning system gets built from because the ear was tuned to them long before anybody had a theory about it.

The comma is therefore not the consequence of a bad choice made early. It is a consequence of the two intervals that physics hands over first being incommensurable with each other.

Two tones in the ratio 3 to 2Two sine tones whose frequencies are in the ratio 3 to 2, and their sum. The combined pattern repeats every time both waves return to the start together, which for a simple ratio is soon.one frame = one repeat of the combined wavelower — 2 per frameupper — 3 per frametheir sumthe pattern repeats after 2 cycles of the lower tone
Fig. 6 Two tones whose frequencies are in the ratio three to two, and their sum. The combined pattern repeats every time both waves return to their starting phase together, which for a simple ratio is soon — and the sooner it repeats, the more settled the pair sounds.

The comma turns up in ordinary music

It is tempting to file all of this under historical curiosity: a puzzle for tuners, invisible to everyone else. It is neither, and the demonstration takes four chords.

Where a progression in pure ratios ends upA short chord sequence taken in exact whole-number ratios, with the running difference from equal temperament measured in cents. The sequence returns to its starting chord and the pitch does not, which is the comma arriving in ordinary music.+0.0¢I-2.0¢IV-17.6¢ii-19.6¢V-21.5¢I-2020cents from equal temperamentequal temperament sits on the line
Fig. 7 A short chord sequence taken in exact whole-number ratios, with the running difference from equal temperament measured in cents at each step. The progression returns to the chord it started on. The pitch does not.

Take a I–IV–ii–V–I and tune every step to the simplest available ratio. Each individual move is beautiful, and the tonic at the end sits 21.5 cents below the tonic at the beginning — a different comma, the syntonic one, which arrives through thirds rather than through fifths.

This is the comma pump. It means that a choir singing in perfect just intonation, in a piece with an entirely unremarkable chord progression, sinks in pitch. Choirs do sink, measurably, and the effect has been documented repeatedly since the 1930s. What they do about it is what a keyboard does: they compromise continuously, and the compromise is a temperament they never chose and cannot describe. The same adjustment happens inside every chord change an ensemble makes.

The same effect is why an unaccompanied string quartet and a piano cannot both be right, and why the quartet adjusts when the piano enters rather than the other way round.

What a tuner actually does

None of the above is how a piano gets tuned, and the gap between the theory and the practice is worth closing.

A tuner does not measure frequencies. A tuner counts beats — the slow swelling that two nearly-coincident partials produce — and tunes by making that swelling happen at a prescribed rate.

220 Hz against 223 HzTwo tones 3 hertz apart, added. The rapid oscillation is their average; the slow swelling is their difference, heard as 3 beats a second and used by every tuner who has ever worked by ear.00.511.52seconds3 beats per second — the difference, exactlythe carrier is drawn slower than it sounds, or it would be a solid band
Fig. 8 Two tones a few hertz apart, and their sum. The rapid oscillation is their average and the slow swelling is their difference, heard as a pulsing at exactly the number of beats per second that separates them.

To set an equal-tempered fifth, a tuner tunes it pure — beatless — and then narrows it until it beats at a particular rate, which for a fifth in the middle of the piano is about seven-tenths of a beat a second. That rate is not chosen by ear; it is calculated from the two cents of narrowing the temperament demands and from the absolute frequency involved, and every tuner works from a table of them.

The consequence is that the comma is heard as a rhythm. A tuner setting a temperament is listening to a set of prescribed beat rates that get faster as the sequence climbs, and an error in the arithmetic shows up as a beat rate that does not match the one the table demands. It is one of the very few places in music where a theoretical quantity is directly, quantitatively audible.

The interval that has no comma

There is one interval that escapes all of this, and its exceptionalism is the most interesting thing about it.

The octave closes. Two octaves are exactly four times the frequency; ten octaves are exactly 2102^{10}; there is no accumulating error, ever, because the octave’s ratio is the base of the system. Every other pure interval, stacked repeatedly, eventually misses.

That is why octave equivalence is so nearly universal across musical cultures while everything above it varies enormously. It is not a shared aesthetic. It is the one relationship that is arithmetically stable, and any tradition that builds on repeated intervals will find it and stay there.

Notes on the keyboardA piano keyboard with the notes under discussion marked. The keyboard is used throughout this site because it shows distance rather than name, and distance is what the theory is about.CEG3 notes sounding
Fig. 9 The keyboard, where the twelve-note decision is physically embodied. Twelve to the octave is a fact about hands and about a chain that nearly closes after twelve steps — not a fact about music, and not a fact anybody derived before the instruments existed.

Everything else on a keyboard is a compromise. The octave is the only interval on it that is exactly right, and it is exactly right in every temperament ever devised, which is why nobody thinks about it.

Whose music, and when

The arithmetic is universal. The response to it is not, and the differences are more informative than the similarity.

Chinese theorists derived the same twelve-note chain of fifths — the — and hit the same wall; the Huainanzi has it by the second century BC. In the sixteenth century Zhu Zaiyu published a correct calculation of equal temperament using the twelfth root of two, some decades before Simon Stevin worked out the equivalent in Europe.

Indian classical music divides the octave into twenty-two śruti and treats the resulting fine distinctions as expressive material rather than as error to be minimised. In that framing the comma is not a problem to be hidden; it is a resource.

Arabic and Turkish theory built systems on quarter-tones and on commas used deliberately as interval sizes, producing scales that a twelve-note keyboard cannot approximate at all — not approximately, but in principle.

Equal temperament won in Europe not because it sounds best. Nobody claimed it did; the eighteenth-century arguments for it are entirely practical. It won because it made fixed-pitch instruments fully transposable, and by 1800 that mattered more than pure thirds did.

The circle of fifthsThe twelve pitch classes arranged so that each is a fifth above the last. Keys next to each other differ by one sharp or flat, which is why the notes of a key form a contiguous arc rather than a scattering.CaGeDbAf♯Ec♯Ba♭F♯e♭C♯b♭A♭fE♭cB♭gFdone step= one fifth= one sharpouter ring: major keys · inner ring: their relative minors
Fig. 10 The chain of fifths bent until it closes, which is the arrangement most musicians meet first. It is worth noticing that this diagram is only true in equal temperament: in every other system the two ends fail to meet, and the circle is a spiral drawn as though it were not.

That last point deserves saying plainly, because the circle of fifths is usually taught as a fact about music rather than as a fact about one temperament. Keys are neighbours on that diagram because equal temperament made them neighbours. In meantone, the far side of the circle is not a distant key; it is a different and worse-sounding set of intervals, and composers avoided it for that reason rather than for an expressive one.

Where the model stops

Pure ratios assume harmonic partials. The argument that 3:2 is consonant because its partials align requires partials at exact whole-number multiples of the fundamental. Real strings are stiff and their upper partials run progressively sharp; bells and drums are not harmonic at all. For those, the question of correct tuning has a different answer, and the gamelan tunings — — built around instruments with inharmonic spectra — are the standing demonstration that the answer really does change.

Octave equivalence is an assumption. Treating notes an octave apart as versions of the same note is very nearly universal, and not quite. Every figure here takes it for granted.

The spiral exaggerates nothing, which is its own limitation. Drawn at true angular scale, the comma is a gap of seven degrees at the outer edge — visible, but only just, and a reader could be forgiven for thinking it negligible. Every figure on this page that shows the comma clearly does so by plotting deviation on an axis of its own, which is honest about size and silent about how the deviation accumulated. Neither view is complete.

Twelve is an assumption too. The whole framing above asks where to hide the comma given twelve notes to the octave. Divide the octave into nineteen, thirty-one or fifty-three and different commas vanish; fifty-three closes the chain of fifths to within a fifth of a cent, which is inaudible. The reason twelve survived is not that it is best but that it is small, and that it puts seven notes of a scale within one hand’s reach.

The ladder from here

Later rungs: the syntonic comma, and why it is a genuinely different gap arriving by a different route. Where each system hides the error, compared on one axis. The wolf, and what living with it was actually like. Meantone’s bargain. Well temperament, and keys that had characters worth naming. Equal temperament as a decision rather than a discovery. The comma pump in real repertoire. Singers, who have continuous pitch and therefore a different problem. Nineteen, thirty-one and fifty-three. Stretched octaves and the Railsback curve. And the same arithmetic outside Europe, where it produced other answers that are not approximations of this one.

The number 531441 is 3123^{12}, and it appears on cuneiform tablets. The gap has been known for as long as anyone has been stacking fifths, which is a good deal longer than there has been notation to write them down in.