Why every pop is a note: the pentatonic idea behind Carillon
In Carillon a dot's colour is its note and its size is the octave, on a pentatonic scale, so any chain sounds like music. How the notes are chosen and made.

On this page
A carillon is a set of tuned bells, usually hung in a tower and played from a keyboard. The game is named after it because every dot you pop rings a note, and a whole chain plays a little tune. This post is about how that works, and why it never sounds wrong, whatever order the dots pop in.
Colour is the note, size is the octave
Every dot’s note is fixed by what it looks like, so you can learn to hear a field before you tap it.
- Colour picks one of five notes: coral is C, amber is D, mint is E, sky is G and lavender is A.
- Size picks the octave: big dots are low, normal dots sit around middle C, and small dots are high.
Five colours times three sizes makes fifteen notes in all, from a low C at about 131 Hz up to a high A around 880 Hz.

Why do big dots sound low? A big dot’s ring is the long, far-reaching one, and a low note is what a large bar or a large bell plays. The small dots, with their short reach, get the bright high notes.
Why these five notes
C, D, E, G and A are the C major pentatonic scale. It is the scale you play using only the black keys of a piano, moved to white keys, and it turns up in folk music all over the world.
What makes it right for Carillon is what it leaves out. A pentatonic scale has no semitones (two notes a half step apart) and no tritone (the tense interval between, say, F and B). Those are the two intervals that clash. Without them, any set of these notes sounds consonant together.
That matters because you do not choose the order of a chain. A big dot can pop six neighbours at almost the same moment, and two separate rings can meet in the middle of the field. With a pentatonic scale, all of that still sounds like music, never like a mistake.
Chains that climb
Consonant is not the same as melodic, so the level generator helps a little. As it grows a field outward from each chain’s starting dot, it tends to give each new ring of dots the next colour up the scale. Now and then, about a quarter of the time, it skips a step or repeats one, so the lines do not all sound like the same exercise.
Because a ring front travels outward at one steady speed, dots further from the start pop later. Put those two facts together, and a chain tends to play a rising line, spreading out in time and pitch at once.

A single chain usually lasts about a second, sometimes a little over two. Short enough to hear as one phrase, long enough to follow.
How a note is made
None of the sounds are recordings. Every note is synthesised in code as a marimba tone, built from a few simple parts:
- the fundamental, the note itself;
- a twin of it tuned very slightly sharp, which makes a slow, gentle beat;
- a woody partial at nearly four times the frequency, which fades fast, like the knock of a wooden bar;
- a faint glassy partial much higher up;
- a soft thump, like a felt mallet.
High notes cut through more than low ones, so the small dots are mixed quieter to sound even. A short reverb is baked into each note file rather than added live, so the game sounds the same in a web browser as it does on a phone. Every note was checked by frequency analysis to land within 1.5 Hz of its target pitch.
Small touches in play
In the game, each note is detuned at random by a tiny amount, up to about 7 cents. When two dots of the same colour pop together, they shimmer instead of doubling into one flat tone.
Each pop also plays where the dot is. Notes are spread over two dozen voices placed at their dots on screen, so a pop on the left leans gently to the left.
When you clear a field, the win sound runs up the scale and lands on the home note, C. However a level went, it always resolves.

Why there is no music switch
Most games have separate sound and music settings. Carillon has Sound and Vibration only, because the notes are the music. Switching sound off makes the game silent; the rings still spread and the chain still reads the same.
The title screen plays a small version of the idea: a field that reads its first dot, taps it and sings across, then grows back and does it again, a little quieter than play.
If you want the game at its best, play a few levels with sound on, and listen to a clear. How to play covers the rules, and calm by design is about the rest of the game’s feel.



Comments
Sign in with GitHub to leave a comment or a question.