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 octaves. Pitch 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 7 times and a little further, finishing 23.46 cents past seven octaves — the Pythagorean comma. Nothing in the chain closes that gap; it is what a tuning has to absorb, hide or spread.
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.

Laid out on a ruler of cents, the small whole-number ratios sit near the twelve equal steps and never on them. A pure fifth is two cents sharp of the equal-tempered one and a pure fourth two cents flat; a pure major third is fourteen cents flat of it and a pure minor third sixteen cents sharp. The discrepancies run from two cents to sixteen, none of them is large, and every one of them is audible the moment two notes sound together — which is the only circumstance in which any of it has ever mattered.

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.

Five fifths do not make three octaves. Pitch 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. Five pure fifths wind round almost 3 times, finishing 90.22 cents short of three octaves — a diatonic semitone. Nothing in the chain closes that gap; it is what a tuning has to absorb, hide or spread.
Fig. 2 The same drawing, with the chain stopped after five fifths — the chain a pentatonic set is built from. It falls a diatonic semitone short of three octaves. Stopping early does not close anything; it changes the size of what is left over, and ninety cents is nearly four times the gap that twelve fifths leave. The leftover is not an error accumulating with length. It is where the chain happens to be standing when you stop it.

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 temperament. Deviation 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.
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.

Meantone’s chain shows what “spread the damage” means in practice, which is that it is not spread. Eleven of its twelve fifths are narrowed by about five cents each, an amount nobody objects to, and the twelfth comes out some thirty-six cents wider than pure, which nobody can use. The accumulated error is not distributed round the chain; it is carried quietly by eleven links and then dumped on the one where the chain is forced to bite its own tail.

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 string. A 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.
Fig. 4 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.

Seven fifths do not make four octaves. Pitch 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. Seven pure fifths wind round 4 times and a little further, finishing 113.69 cents past four octaves — the apotome. Nothing in the chain closes that gap; it is what a tuning has to absorb, hide or spread.
Fig. 5 Seven fifths, which is the chain the seven diatonic notes come from: F–C–G–D–A–E–B, and stop. They overshoot four octaves by 113.69 cents, an apotome — which is the difference between a diatonic semitone and a chromatic one, and the reason a chain of pure fifths never lets F♯ and G♭ be the same note. Seven’s leftover is larger than twelve’s, not smaller, which is the first hint that the chain lands well at particular lengths rather than steadily better ones.

The reason a simple ratio sounds settled is visible in the waveform of the pair. Two tones at three to two produce a combined shape that repeats as soon as both have returned to phase together — after two cycles of the upper note and three of the lower — and the ear reads that short repeat as one sound rather than two. Complicate the ratio and the repeat gets longer: at 45:32 the pattern takes forty-five cycles to come back round, and nothing about it sounds like a single object.

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.

Tuned that way, every move is exact and the total is not. The IV is a pure fourth above the tonic; the D of the ii chord is a pure minor third below that F; the G is a pure fourth above the D; the return to C is a pure fifth below the G. Four exact moves, and their product is 80/8180/81 rather than 11.

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.

Two tones a few hertz apart sum to a rapid oscillation at their average, swelling in and out at exactly their difference: 220 hertz against 223 pulses three times a second, and it is those three the tuner counts. Nothing about the technique requires knowing either frequency.

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 table is not a convenience, and the reason it has to exist is the whole relationship between the two halves of this essay. A cent is a ratio and a beat is a difference. Narrowing every fifth by the same 1.955 cents is a constant in the logarithmic measure and a quantity proportional to frequency in the linear one, so the beat rate of an equal-tempered fifth doubles with every octave:

the fifth on its beat rate
C3 0.44 /s
G3 0.66
C4 0.89
G4 1.33
C5 1.77

Seven-tenths of a beat is the fifth on G3, near the bottom of the octave a tuner lays the temperament in, and the same interval an octave up beats twice as fast for the identical amount of mistuning. A tuner cannot carry one number because the quantity being tuned is not the quantity being heard, and the conversion between them is a multiplication by the frequency.

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 they get faster for two reasons at once, because the notes rise and because a rising sequence of fifths also alternates between wider and narrower spacings. 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.

It is worth being exact about what “escapes” means, because the octave is not privileged by the arithmetic so much as by the definition. Any interval stacked repeatedly returns to its starting pitch class only if its ratio is a power of two, and the only such ratio anyone would call an interval is the octave itself. So the octave does not close better than the fifth; it closes because closure is measured against it. A tradition that took the twelfth as its equave would find the twelfth stable and the octave drifting, and the two commas would swap names — which is not a hypothetical, since a scale built on a 3:1 exists and has exactly that property.

The keyboard is where the twelve-note decision is physically embodied — twelve keys to the octave, seven of them under the hand at once. That is a fact about hands and about a chain that nearly closes after twelve steps, not a fact about music, and nobody derived it 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 fifths is that same chain bent round until its two ends touch. Nothing in the arithmetic touches them. It is a spiral drawn as though it were not, and the twelve steps around it are equal only because equal temperament made them equal.

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.

Why twelve, and not some other number

Twelve is not the only chain length that nearly closes, and it is not the best one. It is the smallest good one, and the difference between those two statements is the whole reason the keyboard looks as it does.

Walk the chain out and record how far each length lands from a whole number of octaves. Five fifths miss by 90 cents, seven by 114, twelve by 23.5. Then it gets worse before it gets better: seventeen fifths miss by 67 cents, twenty-four by 47, twenty-nine by 43. Not until forty-one does anything beat twelve, and it beats it barely.

Forty-one fifths do not make twenty-four octaves. Pitch 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. Forty-one pure fifths wind round almost 24 times, finishing 19.84 cents short of twenty-four octaves. Nothing in the chain closes that gap; it is what a tuning has to absorb, hide or spread.
Fig. 6 Forty-one fifths, drawn at the same scale as the twelve above. They fall 19.85 cents short of twenty-four octaves — better than twelve’s 23.46, after twenty-nine more fifths of climbing, and by four cents. Every length between the two is worse than both. The chain does not converge steadily on closure; it passes near an octave at particular lengths and wanders in between, which is why the good numbers are 5, 12, 41 and 53 rather than every number above some threshold.

The good lengths are the denominators of the successive best rational approximations to log2(3/2)=0.5849625\log_2(3/2) = 0.5849625: one octave to two fifths, three octaves to five fifths, seven to twelve, twenty-four to forty-one, thirty-one to fifty-three. Each is the best approximation available until the next one arrives, which is exactly the property that makes it a good chain length — a chain of nn fifths closes well precisely when n×0.5849625n \times 0.5849625 is nearly a whole number.

Fifty-three fifths do not make thirty-one octaves. Pitch 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. Fifty-three pure fifths wind round 31 times and a little further, finishing 3.62 cents past thirty-one octaves — Mercator's comma. Nothing in the chain closes that gap; it is what a tuning has to absorb, hide or spread.
Fig. 7 Fifty-three fifths, at the same scale again. The coil is dense because it climbs thirty-one octaves, and the gap at the top has effectively closed: the two dots are within four cents of each other, a sixth of the Pythagorean comma and small enough to draw as one dot. Nothing about the fifth has changed between this picture and the first one. The chain simply passes closer to an octave here than at any length below it.

So the answer to “why twelve” is that twelve is where the arithmetic first becomes usable and the hand can still reach. Forty-one and fifty-three are better approximations of pure fifths and worse instruments, and every attempt to build one — Bosanquet’s fifty-three-tone harmonium of 1876 among them — has been a demonstration rather than a repertoire.

Where the model stops

Pure ratios assume harmonic partials, and so does everything about beating above. A beat between a fifth’s two notes is a beat between the lower note’s third partial and the upper note’s second, so it exists only if both notes have those partials at whole-number multiples. On a stiff piano string they are not quite there, which is why a real tuner’s beat rates depart from the calculated table toward the ends of the keyboard and why the departure is a property of the instrument rather than of the temperament. 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 7.04 degrees at the outer edge — the comma over 1200 cents, times 360 — which is 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.

The seven degrees is worth holding beside the beat rates above, because the two are the same quantity in the two measures this essay keeps moving between. Seven degrees of a turn is a fixed fraction of an octave and looks the same wherever it is drawn; the beating it produces is a number of hertz and quadruples across the compass of a piano. A picture in cents cannot show that and a table of beat rates cannot show the closure, which is why the subject needs both and why a tuner and a theorist describing the same interval sound as though they are describing different things.

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, and the quantity that makes fifty-three remarkable is the per-fifth one rather than the total: 3.6 cents spread over fifty-three fifths is 0.068 cents each, a fifteenth of a cent, which is well under anything a listener or a tuner can act on. 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.

Part 1 of 12

One essay in the series on the comma. The essays either side of this one:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 51.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third way in, after the field and the series: the things themselves, and every essay that touches each one.

CentsFrequency ratioOctave equivalencePythagorean commaTemperament