A beat in 40 bytes
Beep Boop prints a beat as a paper receipt with a code on it. Point a phone at the code and the beat opens on the keys. No server holds it and no account is asked for, because the whole beat is inside the code: 40 bytes.
What a beat is
A drum beat on Beep Boop is a short list of facts. A tempo. A swing setting. Eight voices, each with one of eight sounds chosen. And for each voice, sixteen steps that are on or off. That is all a friend's phone needs to play the same beat.
None of it is sound. The sounds are already in every copy of the app, so the code only has to name them.
The 40 bytes
Fig. 1 is the boom bap beat from its pattern page, exactly as the app writes it.
| Field | Bytes | Holds |
|---|---|---|
| Version | 1 | 1. A reader refuses a version it does not know. |
| Kind | 1 | 0 for one beat. |
| Tempo | 2 | BPM times ten, so 93 BPM is 930, written 03 A2. |
| Swing | 1 | 0 to 100. Here 48, written 30. |
| Steps | 1 | 16, written 10. |
| Voices | 1 | 8. |
| Voice list | 16 | Two a voice: the kit, then the sound chosen on that voice. |
| Step bits | 16 | Two a voice: sixteen steps, one bit each. |
| Check | 1 | A sum over the 39 bytes before it. |
Seven, sixteen, sixteen and one make 40. A beat with four voices would be 24.
One bit a step
The steps are the heart of it. A step is on or off, which is one bit. Sixteen steps are sixteen bits, which is two bytes. Step 1 is the highest bit of the first byte.
Eight voices of sixteen steps are 128 bits, and those sixteen bytes hold every hit in the bar. The rest of the code only says how fast and with which sounds.
From bytes to a code
The 40 bytes are written as 54 letters and digits that are safe in a web address, and set after the address the receipt prints. The whole link, https://beatmaker.au/b/ and the 54, is 77 characters. As a printed code it is 37 squares on a side.
Because it is an ordinary web link, the phone's own camera reads it. With Beep Boop installed, the link opens the app with the beat on the keys. Without it, the link opens a page on the web.
A code is not to be trusted
Anyone can make a code, so the reader treats one as a stranger's input. Three rules hold.
- The check byte must match. Change any one bit of the 40 bytes and the beat is refused. A test flips every bit after the version byte in turn, 312 of them, and requires a refusal each time. A changed version byte is refused by its own rule.
- Every field must be in range. A code that claims 500 BPM is refused. It is not played at 300, the top of the dial.
- Nothing is repaired. A code is whole and correct, or the window says NOT A BEAT.
What does not fit
A drum beat fits because a drum step has no other property: it has no length and, on Beep Boop, one loudness. A melody needs more, a note's row, its length and its accent, and is written in a second version of the format at two bytes a note. A whole track with many bars grows past what a small printed code can hold, and travels as a short code with the track kept on a server.
Sources
- The fields and their sizes: Beep Boop's pattern format, version 1, frozen on 3 October 2026 with its encoder and decoder.
- The sizes of 24 and 40 bytes, the refusal of every single-bit flip and of fields out of range: the format's own tests, which fail if any of them stops being true.
- The bytes in the figures: decoded from the link printed on the boom bap page's receipt.
More sheets
- Ghost notes and accents on drumsLoud and quiet strokes in one bar.
- Sample-accurate timing on an iPhoneSteps counted in samples, and how that was measured.
- What syncopation isThe weight off the beat, on sixteen steps.
- The audio thread never waitsNo allocation, no lock, one queue.
- PatternsDrum patterns drawn on sixteen steps.
- Tempo by genreBPM for twelve genres, on one scale.