No file sits behind any of this music. Each note is decided a moment before you hear it, by a few simple rules going round.
Twenty dots, each going round a little slower than the one outside it. They set off in a line, and because their speeds differ they soon look scattered. Keep watching and they form spirals, then pairs, then a line again.
Almost everything here works this way. Simple things that repeat at slightly different lengths, drifting out of step and back in. Most of the beauty is in how they line up, and this page draws how that happens. Turn on Sound in the corner and each drawing will play.
A word is enough
A piece starts with a word: usually its name. The word is turned into a number, and that number starts a long stream of further numbers. They look random, but they aren't. The same word always gives the same stream.
Type any word. Type it again later and you get the same choices. These five are only a sample of the thousands a piece makes.
Every choice comes from this stream, from which chord follows which to how hard a finger lands. That's why a piece can have a link: the link doesn't hold any sound, only the word and whatever you changed. Whoever opens it gets the same choices and hears the same piece played again, from nothing.
Each part draws from a stream of its own, forked from the first. So when you change the strings, the piano keeps every choice it was going to make.
Not everything is left to chance. Some pieces are written by hand, with their instruments, key and room chosen, and only the details drawn. Others come from a recipe: a range of tempos, a handful of rooms, a list of instruments that sit well together.
A circle of sixteen seconds
Touch the drawing of a piece and a note sounds. Then it comes back. Time here is a circle, sixteen seconds round unless a piece says otherwise, and your note stays at the moment you played it. Each time round it comes back a little softer: three quarters as loud as the last, near enough. Below about a fourteenth of full strength it's gone.
Touch the circle to plant a note: further out is higher. The hand decides when, as it does in the piece. Left alone, the circle plants a few of its own.
A note played fairly hard survives six to eight rounds, around two minutes. That's the memory of the piece. It never holds more than the last couple of minutes of what happened, which is why it never turns into a wall of sound, and why it never stands still. When nobody touches it, it plays itself, in one of about two hundred ways a pair of hands can go: a lonely note left to ring, small figures going round, rolled chords, a note added each time.
Twelve notes, seven rungs
Double how fast a string shakes and you hear the same note, higher. That's an octave. Our ears divide each doubling into twelve equal steps, which makes pitch a spiral: every time round it doubles, and each step multiplies by the same number, the twelfth root of two.
frequency = 440 × 2(n − 69) / 12
The piece doesn't use all twelve. It climbs a ladder of seven, and the gaps between the rungs give each ladder its mood. Here is the odd part: all five ladders are one shape, turned to start somewhere else.
Ionian sounds settled, Lydian lifted, Mixolydian easy, Dorian thoughtful, Aeolian sad. The bar underneath is the same seven gaps of two and one, starting from a different place.
Why two notes agree
When two notes sound together, your ear hears their waves go past each other. If they fit a simple ratio, the two keep coming back to the same place together, and you hear calm. A fifth is three shakes against two: every third shake of one lands with every second of the other.
The lines mark where both waves begin together. See how far apart they get at a half step, and how busy its sum is.
This is why there is one rule about clashes, and it's short. A note may not sit a half step above a note of the chord, or just under a held-back fourth. Everything else is allowed.
The twelve equal steps are a compromise, by the way. Seven of them multiply to 1.498, not 1.5, so a piano's fifths never quite line up. They drift very slowly, a slight shimmer inside the sound, and no piano is without it.
A note is a height
Here's the idea the whole engine leans on. When you touch a piece, it doesn't remember the note you played. It remembers how high you touched. Each time round, that height is turned back into a note on whatever chord is playing now: the rung at that height, or the nearest one that doesn't clash.
Move or tap to change the height. Filled dots are the notes of the chord, hairlines are the other notes that sit well, and open rings are the clashes. Watch the thread step around them.
So you can't play a wrong note. Better, the same few touches keep changing meaning. The note that was the sad centre of one chord turns into the bright top of the next, and you never touched it twice. Most of what sounds like composing in these pieces is this: a small memory, heard in a new light each time.
The smallest move
The chords themselves come in short phrases that work: in a minor mode the first chord, then the sixth, the third, the seventh, say. Each is coloured with an added note, a ninth or a seventh or a sixth, because that's what makes it sound like someone's thinking rather than following a chart.
What matters most is how a hand gets from one to the next. Try every way of holding the new chord, count how far the fingers would travel, and take the shortest. Any note the two chords share just stays held.
The same chords, held two ways. Thick stretches are notes that stay down. Close is the function the engine really uses.
Nobody writes a tune here, but one appears. When each finger moves as little as it can, the top finger traces a line of its own, and you hear it as a melody.
Seven against eight
There is a second way of playing, the one called Take: a pianist going straight through, for as long as you listen. Its hands go round a small figure, each finger in turn. And some of those figures are deliberately the wrong length.
Play a figure of seven notes in a bar of eight, and the two only start together once every fifty-six steps. Nothing has changed, and yet each note keeps landing somewhere new in the bar, so the accent wanders. It's the dots at the top of this page, in miniature.
The outer ring is the bar and the inner ring the figure. They flash when they start together. On the strip, ticks are bars and dots are figures, and the shared length is the two lengths' lowest common multiple.
You can choose how a piece is played. Loop is the circle, with your notes and its gestures coming back. Take is the pianist going through. Both puts the circle's notes under the pianist's fingers: one person, one clock.
A shape over time
Above all of this sits a slow curve, how full the piece is at each moment. The piece begins quietly, finds its theme, builds, lifts near the top about two thirds of the way along, and comes home. Each player watches the curve and decides for itself. At about a quarter full, the strings or whatever else holds the chords come in. Higher up there are more notes, and the hands open out wider.
The real curves. Each dot under the line is a note, and there are more where the piece is fuller. Then it ends and the next journey begins, often in a key next door.
Why a machine sounds like a machine
Add a little randomness to a computer's timing and it doesn't sound human, it sounds drunk. Measure real pianists and you find something else. Their timing and weight wander on every scale at once: a little from note to note, more from phrase to phrase, and slowly across minutes. The mistakes are related to one another.
So the engine adds up five slow walks, each with its own memory: two seconds, six, eighteen, fifty-four, a hundred and sixty-two. Each is three times the last. Together they make one wander with about as much happening at every length of time.
Five walks add up to the thick one. Below, the even row is a machine and the dots above it are the same notes after the wander. They speed up and hang back together, in phrases.
Then the physical facts. A piano key doesn't sound when you press it: it throws a hammer, and a hammer thrown softly takes longer to arrive.
All five keys go down at once, shown very slowed down. Harder blows reach the string first. A pianist aims ahead of this without thinking, but never completely.
There's more, all of it measured rather than decorated. The left hand comes a hundredth of a second or two before the right, and a leap takes a moment longer than a step. The thumb is heavy and the fourth finger weak. Each finger has its own way of landing in its place in a figure, which it keeps, so you hear it again each time round. Each key is a few hundredths of a semitone out of tune. A pedal goes down just after the new chord, and the softest touch of all sometimes misses the string, leaving only the key.
One pair of hands
Layers usually give themselves away, because no person could play them. So everything a pianist plays here has to pass the same test: a key struck only once, no more than five notes in the hand, all within an octave, none a half step from its neighbour.
What's due arrives on the top row. The bracket is what one hand can reach. A note that doesn't fit moves an octave if that helps, and otherwise waits for next time round.
One recording, stretched
The sound itself is real. The piano has twenty-two recorded keys, not eighty-eight. For any other key, the nearest recording is played slightly faster or slower. Every note uses the same sum as the spiral: up one step is 1.059 times as fast, and also that much shorter.
The tall marks are recorded keys. The wave is the real recording. Move across the keys to see it squeezed or stretched.
There's only one recording per key, so a soft note can't simply be a quieter copy. A harder blow makes felt give up more of its edge, most of all at the very start, so the engine shapes that too: louder and brighter for a moment, closing over as it rings. A softer note is rounder, warmer and a little late.
The piano's own noises are recordings too. The dampers landing, the pedal going down, a key hitting the bottom of its travel, and now and then a sharper knock of the mechanism.
A room made of noise
A room is what happens to a sound on its way to you. It bounces off each wall, and every bounce acts as if a copy of the sound came from a mirror-image room next door, and that room's neighbour, on and on. After a few bounces there are too many echoes to tell apart, and they've turned into something like noise.
So that's how a room is made here: noise that dies away, getting darker as it goes, because air takes the high end first. Then each note is blended with that fade, a sum called convolution, and it sounds like it was played there.
The rings are the real geometry of reflections, each from a mirrored source. Below them is the noise that stands in for it, dying away by a thousandth in the time it says.
The piano goes mostly into the close room and the strings further off. The bells and their shimmer go far away. Distance is mainly a matter of how much of each sound gets into which room.
All of it, at once
So this is the line from a word to your ears. Nothing here is stored and nothing is repeated exactly. Each part only knows its own small rule and what the part above told it.
The picture is part of the same line. Each piece's drawing is made from the same word, in hairlines, and every note that sounds drops into it as a ripple. So you can watch what you hear, and touch it to play along.
Slate Roof is a good place to begin. Touch it anywhere.