A kick drum is twelve numbers
Beep Boop's drums are not recordings. There is no file of a kick anywhere in the app. Each of its 64 drum sounds is a short row of numbers, and the engine makes the sound from them, fresh, every time a step plays.
Two ways to build a kit
A drum machine gets its sounds in one of two ways. It can play back recordings, called samples. Or it can make each sound from simple parts when it is needed, which is synthesis. Roland's TR-808 made its sounds this way in 1980, with circuits. Beep Boop does it with arithmetic.
Synthesis has two uses here. A sound that is numbers can be changed while it plays: the TONE and DECAY knobs move those numbers. And the numbers are small. The whole kit of 64 sounds is under 4,000 bytes. One second of recorded sound at the phone's rate is about fifty times that.
The parts of a drum
Every drum on the panel is built from the same two parts.
- A tone: a sine wave whose pitch starts high and falls. This is the body of a kick or a tom.
- Noise through a filter: hiss, with part of it kept. This is the snap of a snare, the whole of a hat and the hands of a clap.
Each part fades at its own speed. A drum is a mix of the two, and the kind of drum is decided by the mix. A kick is nearly all tone. A hat is all noise.
The twelve numbers
This is the first kick, called ROUND, as it is written in the kit.
| Number | ROUND | What it does |
|---|---|---|
| Tone | 49 Hz | Where the pitch settles. |
| Pitch drop | 210 Hz | How far above that it starts: 259 Hz. |
| Pitch decay | 0.022 s | How fast the pitch falls. |
| Tone decay | 0.38 s | How fast the tone fades. |
| Tone level | 1.00 | How much tone is in the mix. |
| Noise level | 0.50 | How much noise. |
| Noise decay | 0.007 s | How fast the noise fades: here, a click. |
| Filter | 1,800 Hz | Where the filter sits. |
| Resonance | 0.7 | How sharply the filter rings. |
| Kind | Band | Which part of the noise is kept: low, band or high. |
| Bursts | 0 | Extra bursts of noise, 10 ms apart. A clap has three. |
| Level | 0.95 | The loudness of the whole sound. |
Fig. 1 draws the first four over time. The pitch falls from 259 Hz to near 49 in a few hundredths of a second, and that fall is what the ear hears as the thump. The tone then rings on for a third of a second. The click of noise at the front lasts 7 milliseconds and gives the beater its edge.
Three more numbers follow the twelve, and most sounds leave them at zero. They tear a sound apart, sweep its pitch, or restart it many times a second, and they make the stranger sounds on the dial: GLITCH, TAPE STOP, RISER, STUTTER.
The same parts, other drums
- The snare CLASSIC is a tone at 180 Hz and noise in nearly equal parts, the noise kept high and fading over 0.15 seconds.
- The hat CLOSED has no tone at all: noise above 7,000 Hz that fades in 0.035 seconds.
- The open hat is the same noise at 6,500 Hz with a fade of 0.3 seconds. The length is the only real difference between them.
- The clap ROOM is noise around 1,200 Hz struck four times, 10 milliseconds apart, then left to fade. Several hands never land together, and the bursts are those hands.
Where punch comes from
It is tempting to make a drum hit harder by turning it up. That does not work. Every voice ends in a soft limiter with a ceiling just under full scale, so a louder level only pushes the sound into the limiter and comes out as distortion.
Punch is shape. It comes from how far the pitch drops and how fast, from the length of the tone against the length of the noise, and from where the filter sits. To make a kick hit harder, start its pitch higher and let it fall faster.
Limits, and one mistake
Numbers can be wrong in ways a recording cannot, so every number has a range and a test holds the kit inside it. The tests also make every one of the 64 sounds on a Mac and fail on a sound that is silent, one that passes full scale, or one that never ends.
One range was learned the hard way. The noise filter is stable only while its frequency and its resonance stay in a certain relation. A bright filter with little resonance crossed that line, and the arithmetic ran away to values that are not numbers at all, in a few milliseconds. The first hats did this with TONE turned most of the way up. A reviewer found it, and the engine now holds the filter inside the safe bound whatever the knobs ask.
On Beep Boop
Each of the eight voices, KICK, SNARE, CLAP, HAT, OPEN, TOM, RIM and PERC, has eight sounds, and the window names the one chosen. TONE and DECAY reshape it as it plays.
Sources
- The twelve numbers of ROUND, and those of CLASSIC, CLOSED, OPEN and ROOM: Beep Boop's factory kit, a table of 64 rows in C, read from the build of 10 October 2026.
- How a tone and filtered noise are made and mixed, sample by sample: the engine's drum voice, in C.
- Where punch comes from, the ranges, and the filter that overflowed: the factory kit's limits, written on 6 October 2026 and corrected on 7 October.
- The TR-808 and its year: Roland TR-808, Wikipedia.
More sheets
- The audio thread never waitsNo allocation, no lock, one queue.
- An instrument in SwiftUIOne accent, five layers, nothing unneeded.
- Sample-accurate timing on an iPhoneSteps counted in samples, and how that was measured.
- A beat in 40 bytesTempo, swing, eight voices and a check byte.
- PatternsDrum patterns drawn on sixteen steps.
- Tempo by genreBPM for twelve genres, on one scale.