Lab

The octave and the fifth do not fit

Two notes sound consonant when their frequencies form a simple ratio. Double it and you get an octave โ€” so nearly the same note that we give it the same letter. Multiply by three and halve it and you get a fifth, the next most agreeable interval there is. Every tuning system in history has tried to build a scale out of those two moves. It cannot be done. No number of fifths ever lands exactly on a number of octaves, the gap is small enough to be maddening rather than obvious, and the whole of Western tuning is the argument about where to hide it.

This lab makes sound. Nothing will play until you press a button. Turn your volume down a little first โ€” these are pure tones and they carry.

1Stacking fifths, and never getting home

Start anywhere and go up a fifth โ€” multiply by 3/2. Do it again, and again, halving whenever you climb past an octave so everything stays in one register. After twelve fifths you have passed through all twelve notes and arrived back at something that looks like the note you started on. It is not. It is 1.013643 times its frequency. The dial below shows every step landing on the outer ring; watch the twelfth one overshoot the mark.

where each fifth lands the twelfth fifth, overshooting equal temperament, for comparison

2The size of the problem

A cent is a hundredth of an equal-tempered semitone, and it exists precisely so that gaps like this one can be discussed. The Pythagorean comma is 23.46 cents โ€” about a quarter of a semitone, roughly the smallest pitch difference a trained ear reliably notices on sustained tones, and far too big to leave sitting in one place. Press the button above to hear the two notes together: they beat, and the beating is the comma made audible.

3Equal temperament, and what it costs

Equal temperament takes the comma, divides it by twelve, and steals that much from every fifth. Each semitone becomes exactly the twelfth root of two, 1.059463, and the circle closes by construction. The fifth loses 1.955 cents, which almost nobody can hear. The major third gains 13.69 cents, which almost everybody can โ€” it is the worst interval on any piano you have ever heard, and you have stopped noticing only because you have never heard the alternative. Play them side by side.

intervaljust ratio equal temperamenterror, centshear it

4Beats: how a tuner actually hears this

Two tones close in pitch do not sound like two tones. They sound like one tone wobbling, and the wobble happens exactly |fโ‚ โˆ’ fโ‚‚| times a second. Nobody tunes an instrument by judging pitch; they tune by counting that wobble and slowing it to a stop. Drag the detuning below and watch the envelope โ€” at zero cents the wave is steady, and at ten cents it pulses about twice a second. That is why the comma is not an abstraction: it is a sound you can count.

5So why exactly twelve?

Nothing forces twelve. Slice the octave into any number of equal steps and ask how close the best available step gets to a real fifth and a real third. Most numbers are hopeless. Twelve is the first that gets the fifth almost perfect โ€” under two cents โ€” and it is small enough to play with ten fingers, which is not a musical argument but is certainly a decisive one. The price is that third. If you were willing to build an instrument with 53 keys to the octave you could have a fifth wrong by 0.07 cents and a third wrong by 1.4, and some people have.

error in the best fifth error in the best major third

What the arithmetic settles, and what it cannot

The numbers are exact and independent of taste. Twelve fifths come to (3/2)ยนยฒ = 129.746338, seven octaves come to 2โท = 128, and the ratio between them is 1.013643, or 23.4600 cents โ€” that is the Pythagorean comma and it is why no amount of care closes the circle. Equal temperament sets the semitone to 2^(1/12) = 1.059463 and, as a direct consequence, narrows every fifth by exactly one twelfth of the comma: 1.955 cents. Everything on this page is computed from those definitions at page load, and the tones you hear are generated from the same numbers, not from samples. The beat rates in the last two sections are the literal frequency differences.

What the arithmetic cannot settle is whether any of it sounds good. Consonance is not only ratio simplicity โ€” it depends on the timbre of the instrument, because two notes clash when their upper partials fall close enough to beat, and an instrument whose partials are not exact multiples of its fundamental (a bell, a marimba, a stiff piano string) has a different set of consonant intervals entirely. Real pianos are not tuned to equal temperament either: their strings are stiff enough that overtones run sharp, so tuners stretch the octaves, and a concert instrument may be twenty or thirty cents wider at the extremes than these formulas say. The tones here are a plain harmonic series with six partials and no attack, decay or vibrato, which makes the intervals easy to compare and nothing like a real instrument. And twelve notes is a Western answer; a great deal of the world divides the octave differently and always has.