An interactive primer · sound on

How humans found music

Nobody invented music, and nobody quite discovered it either. This is the story of how a species stumbled onto the physics of vibrating things — and the very different scales the world built from the same raw material.

The monochord · drag the bridge, tap a string segment to pluck it
2 : 3 — divide a string at two-thirds and it sounds a perfect fifth
The bridge snaps to the simple divisions the Greeks treasured

↓ scroll — six chapters, all of them playable

Chapter I

Music before mathematics

Long before anyone asked why certain sounds belong together, humans were already making them belong. The oldest unambiguous musical instruments we have found are flutes carved from bird bone and mammoth ivory in the caves of southern Germany, made over 40,000 years ago — older than agriculture, older than the wheel, older than any city. Their finger holes are deliberately spaced. Someone chose those pitches.

And instruments are only the durable evidence. The voice, clapped hands and struck logs leave no trace, so music itself is almost certainly far older — plausibly as old as language, and on some accounts older. We were a singing species before we were a writing one.

c. 40,000 BCE · Germany
The Hohle Fels and Geissenklösterle flutes. Griffon-vulture bone and mammoth ivory, with carefully placed holes. (A still older Neanderthal "flute" from Divje Babe, Slovenia, remains contested.)
c. 7,000 BCE · Jiahu, China
Crane-bone flutes — some still playable — capable of something close to a six- or seven-note scale, nine millennia before staff notation.
c. 1,800 BCE · Mesopotamia
Babylonian tuning tablets. Cuneiform texts describe retuning a nine-stringed instrument through seven named heptatonic modes by adjusting strings in fourths and fifths — a working music theory a thousand years before Pythagoras was born.
c. 1,400 BCE · Ugarit, Syria
The Hurrian Hymn to Nikkal — the oldest substantially surviving piece of notated music in the world, though rival decipherments of its notation still disagree about how the tune actually went.
433 BCE · China
The bells of Marquis Yi of Zeng: sixty-five bronze bells, each cast to sound two precise pitches, with their note names inscribed on the metal. Acoustic engineering of astonishing precision.

So when we say music was "discovered" in ancient Greece, we mean something narrower and stranger: not the discovery of music, but the discovery that music is made of number.

Chapter II

Pythagoras and the arithmetic of consonance

The legend, first written down by Nicomachus of Gerasa some six centuries after the fact: Pythagoras of Samos (c. 570–495 BCE) walks past a blacksmith's shop, hears some hammer blows ringing sweetly together and others clashing, weighs the hammers, and finds the sweet pairs related by simple whole numbers.

The legend is almost certainly false — and physically wrong. A hammer's pitch doesn't scale neatly with its weight. The man himself is scarcely less legendary: Pythagoras wrote nothing, and the theory that bears his name is first found in the writings of his followers, Philolaus and Archytas, a century and more after his death — even the monochord is only attested generations later. The discovery, in other words, belongs to a school rather than a man; it was simply so good that it all got credited to the semi-legendary founder. And it is real, revolutionary, and works perfectly on a stretched string, the instrument you played at the top of this page. Halve a string and it sounds an octave higher. Stop it at two-thirds and you get a fifth. Three-quarters, a fourth. The intervals every culture's ear treats as most stable correspond to the smallest whole-number ratios:

Sit with how strange this is. Pleasure — an inner, private feeling — turned out to track ratios of small integers in the outer world: arguably the first known law tying a human sensation to mathematics. It convinced the Pythagoreans that the entire cosmos must be built on number — the "harmony of the spheres" begins here, an idea Plato would weave into the very fabric of the universe in his Timaeus. Two millennia later, that same conviction — measure, ratio, law — flows into Kepler, Galileo and modern science.

But Greece, to its credit, argued back. Aristoxenus of Tarentum, a pupil of Aristotle writing in the fourth century BCE, declared the whole numerological edifice beside the point: intervals should be judged by the trained ear, and treated as distances along a continuum rather than ratios — his semitone something you could simply halve. To the Pythagoreans this was heresy; in hindsight it is equal temperament arriving two thousand years early. The two camps — number versus ear — would quarrel for the rest of Western history, and when the lutenist Vincenzo Galilei (Galileo's father) demolished the number-mystics in the 1580s with actual experiments, he did it by deliberately reviving Aristoxenus.

Yet neither camp answered the obvious next question: why should small ratios sound sweet? The answer hides inside every single note — and it took until the seventeenth century to hear it properly.

Chapter III

The harmonic series: every note is a chord

A string can't decide how to vibrate, so it does everything at once. It swings along its whole length, and simultaneously in two halves, three thirds, four quarters — each mode adding its own pitch. A note you hear as "one sound" is really a stack of harmonics at 1×, 2×, 3×, 4×… the fundamental frequency. The recipe of strengths is what your brain reads as timbre — why a flute and a violin on the same note sound nothing alike.

The harmonic lab · fundamental 110 Hz
the composite waveform — the sum of every harmonic below
Drag the sliders to mix harmonics and watch the waveform change shape. Tap a mode button to see how the string itself vibrates for that harmonic — in 1, 2, 3… segments at once. "Play up the series" climbs the harmonics as real pitches: it is exactly the set of notes a valveless bugle can play.

Now Pythagoras's mystery dissolves. Play two notes whose frequencies sit in a ratio of 3 : 2 and their harmonic stacks interlock — every third harmonic of one lands exactly on every second harmonic of the other. Small-ratio intervals sound consonant because the notes already contain each other. The octave, fifth, fourth and major third aren't a cultural whim; they're sitting inside every periodic sound, between harmonics 1–2, 2–3, 3–4 and 4–5. Harmonics 4, 5 and 6 even spell out the major chord. Nature ships every note with a chord built in.

It took Marin Mersenne and, decisively, Joseph Sauveur around 1701 to isolate and name these sons harmoniques — and Fourier, a century later, to prove the deeper theorem: any periodic vibration whatsoever is a sum of such pure tones. Music led physics there first.

Chapter IV

Building scales — and the crack in the cosmos

If the fifth is nature's favourite interval after the octave, the obvious way to generate a scale is to stack fifths: from C, up to G, then D, A, E… folding each new note back into a single octave. Stack four and you have the pentatonic scale found from China to Scotland. Stack six and you have a seven-note diatonic scale. Stack twelve, and — gloriously — you land almost exactly back where you started.

Almost.

The spiral of fifths · stack them and listen
twelve fifths should equal seven octaves. Should.
Twelve perfect 3:2 fifths overshoot seven perfect 2:1 octaves: (3/2)¹² ≈ 129.75, but 2⁷ = 128. The spiral never closes. The gap — about 23.5 cents, an eighth of a tone — is the Pythagorean comma.

This is a genuine mathematical impossibility, not a failure of craft: no power of 3/2 can ever equal a power of 2. Every tuning system in history is a different strategy for hiding that comma. Pythagorean tuning keeps the fifths pure and lets the thirds turn harsh. Just intonation tunes the thirds to a sweet 5 : 4 instead — a tuning canonised in antiquity by Didymus and Ptolemy, not invented by the Renaissance — but then the error merely moves, surfacing as unusable "wolf" intervals the moment you change key. (The leftover gap is still called the comma of Didymus.) Renaissance meantone shaved every fifth slightly to buy beautiful thirds in some keys at the cost of others. The comma is conserved, like a lump under the carpet: you can move it, never remove it.

Chapter V

Equal temperament: the great compromise

The modern Western solution is brutal and elegant: smear the comma evenly across all twelve fifths. Make every semitone identical — a frequency ratio of ¹²√2 — and every key becomes equally usable because every key is equally, slightly, out of tune. The first person to compute this precisely was not European: the Ming-dynasty prince Zhu Zaiyu published exact figures in 1584, with the Flemish engineer Simon Stevin arriving at the same idea independently at around the same time (his manuscript is undated). Keyboards took centuries more to follow.

To talk about these tiny differences, musicians use cents: 100 cents per equal semitone, 1,200 per octave. An equal-tempered fifth is 700 cents against nature's 702 — imperceptible. But the equal-tempered major third is 400 cents against the pure 5:4 third's 386 — and fourteen cents is very audible, as a restless shimmer called beating: interfering harmonics drifting in and out of phase.

Beating · detune two tones and hear the interference
The canvas shows one second of the combined sound: the slow swell and fade is the beat. At 0 cents the tones fuse into stillness. The two third buttons play A + C♯ tuned pure (5:4 — calm) and equal-tempered (listen for the faster shimmer in the upper harmonics). Every piano you have ever heard carries that shimmer; Western ears have simply agreed to stop noticing.

Equal temperament is not "correct" tuning. It is a trade: perfect freedom of modulation, purchased by making every interval except the octave slightly false. Most of the world looked at the same impossible arithmetic and made different trades.

Chapter VI

Other answers: tuning as culture

It's tempting to treat non-Western systems as variations on the piano. The truth is closer to the reverse: the piano is one recent, regional answer to a universal problem. Instruments, aesthetics and ideas about what music is for all push tuning in different directions.

Java & Bali — gamelan

Gamelan bronze bars and gongs are not strings: their overtones are inharmonic, falling at irrational multiples of the fundamental. With no neat harmonic stack to lock into, pure 3:2 fifths lose their privilege — so Javanese sléndro spaces five notes roughly evenly across the octave, while pélog chooses seven pointedly unequal steps. No two villages' gamelan are tuned identically, and paired instruments are deliberately tuned a few hertz apart so the whole ensemble shimmers — a beating effect called ombak, "waves". The very phenomenon Western tuners spent centuries eliminating is here the prized sound itself.

Gamelan · tap the bars

The Arab world — maqām

Arabic, Turkish and Persian music kept what equal temperament threw away: the notes between the piano keys. Theorists describe an octave of twenty-four quarter-tones, from which each maqām — a melodic mode with its own character and rules of motion — selects its pitches. The signature of maqām Rāst is its third degree, Sīkāh, hovering near 350 cents: neither major nor minor but serenely in between, a colour Western notation literally cannot spell.

Maqām Rāst · play the scale, find the neutral third
Degrees carry their own names rather than letter names. Sīkāh, the half-flat third, sits between the piano's E and E♭. In living practice it floats: a Cairo Rāst and an Istanbul Rāst place it differently. The 24-tone grid is the map, not the territory.

India — śruti and the drone

Indian classical music made the opposite bet to the piano. Because a rāga performance never modulates — everything unfolds over an unwavering tonic drone — there is no comma to hide, and intervals can stay pure. Theory speaks of twenty-two śruti, microtonal shades from which each rāga draws its precise intonation. Against a drone, the difference between a just third and a tempered one stops being academic: one locks in and glows, the other grinds.

The drone · pure intervals against Sa
Start the drone, then play the svaras. Each is tuned as a small whole-number ratio over Sa — listen for how they lock into the drone rather than float above it.

China — the twelve lǜ

Chinese theorists derived twelve pitches (shí-èr-lǜ) by the "third-removing, third-adding" method — alternately shortening and lengthening pipes by a third, which is exactly stacking fifths and fourths. They hit the same spiral, met the same comma, and millennia later Zhu Zaiyu resolved it with the same twelfth root of two the West would adopt — while everyday practice stayed happily pentatonic: gōng, shāng, jué, zhǐ, yǔ.

Different instruments, different gods, different ideas of what music is for — yet bone flutes, bronze bells and Babylonian lyres keep rediscovering octaves, fifths and fifth-generated scales, then diverging on everything the comma leaves unresolved. The harmonic series proposes; culture disposes.

Coda

One keyboard, many worlds

Everything above, in a single instrument. Choose a tuning, play, and watch the coloured strip on each key: it shows how far that note drifts from the piano's equal temperament — brass sharp, verdigris flat.

The tuning explorer

So: how did music come to be? A vibrating world supplied the harmonic series — the same physics in every bone flute, bronze bar and larynx. Human ears, tuned by evolution to voices, found the interlocking ratios sweet. And human cultures, each negotiating with the comma in its own way, built from those raw materials systems as different as a Bach fugue, a gamelan's golden shimmer and a rāga at dawn. Music was never invented and never simply discovered. It is a negotiation between physics and us — still open, still being renegotiated every time someone tunes an instrument.