{"inline_daily":{"drum-machine":{"start":"Play","stop":"Stop","presets_label":"Starter patterns","preset":{"rock":"Rock","house":"House","hiphop":"Hip-hop","reggaeton":"Reggaeton"},"clear":"Clear all","grid_hint":"16 steps = one 4/4 bar of sixteenth notes. Tap a cell to add or remove a hit, and a track name to hear it.","track":{"kick":"Kick","snare":"Snare","clap":"Clap","hat_closed":"Closed hi-hat","hat_open":"Open hi-hat","tom_low":"Low tom","tom_high":"High tom","rim":"Rimshot"},"cell":"{{track}}, step {{step}}","preview":"Listen: {{track}}","tempo_label":"Tempo","tempo_range":"Tempo limited to {{min}}–{{max}} BPM: using {{value}} BPM.","swing_label":"Swing","swing_hint":"50% = straight, 66.7% = triplet shuffle. Swing lengthens the 1st sixteenth of each pair and shortens the 2nd.","master_label":"Master volume","mixer_label":"Volume per track","share_label":"Pattern link","share_copy":"Copy link","share_hint":"Pattern, tempo and swing live in the part after #: nothing is stored on a server.","sound_note":"Sounds are computed live, with no samples. Hits are scheduled on the audio clock 100 ms ahead. On iPhone, turn silent mode off if you hear nothing."}},"docs_daily":{"tools":{"drum-machine":{"content":{"title":"16-step drum machine: tempo, swing and synthesized sounds","intro":"The 16 steps cover one 4/4 bar split into sixteenth notes: each step lasts 60 ÷ BPM ÷ 4 seconds, so 0.125 s at 120 BPM. Swing lengthens the first step of each pair and shortens the second without changing the tempo.","details":"
A pair of steps equals one eighth note, 2 × 60 ÷ BPM ÷ 4 seconds. With swing s, the odd step (1, 3, 5…) lasts s × pair and the even step (2, 4, 6…) lasts (1 − s) × pair. At 50% the rhythm is straight; at 66.7% it becomes a triplet shuffle. Hits are scheduled on the browser's audio clock 100 ms ahead by a 25 ms timer, the method described by Chris Wilson.
At 120 BPM a sixteenth lasts 0.125 s and a pair 0.25 s. With 66.7% swing the steps last 0.167 s then 0.083 s, a 2-to-1 ratio. The hip-hop pattern, at 90 BPM and 58%, gives 0.193 s then 0.140 s for a 0.333 s pair.
No samples are loaded; every hit is computed. The kick is a sine wave gliding from 150 to 45 Hz; the snare mixes a 190 Hz tone with noise filtered above 1,200 Hz; the hi-hats are noise filtered above 7,000 Hz, 0.05 s closed and 0.35 s open; the clap chains three bursts 12 ms apart.
The link encodes the 8 tracks of 16 steps as 128 bits, 32 hexadecimal characters, followed by tempo and swing, in the fragment after #. Only the browser reads that fragment; it is not sent with the request to the server.
Sources and dates: Chris Wilson, A tale of two clocks, web.dev; RFC 3986, section 3.5 (fragment) (checked 29/10/2026)
"},"faqs":[{"question":"How do I make a drum beat on 16 steps?","answer":"The 16 steps form one 4/4 bar of sixteenth notes: steps 1, 5, 9 and 13 fall on the beats. The tool's rock pattern puts the kick on 1, 9 and 11, the snare on 5 and 13, and the hi-hat on every other step; edit it cell by cell."},{"question":"What is swing on a drum machine?","answer":"Swing lengthens the first sixteenth of each pair and shortens the second. At 50% the rhythm is straight; at 66.7% it is a triplet shuffle: at 120 BPM the steps then last 0.167 s and 0.083 s instead of 0.125 s each."},{"question":"How do I share a beat I made online?","answer":"Copy the pattern link: after the # it holds the 8 tracks × 16 steps coded as 32 hexadecimal characters, then tempo and swing. Opening the link reloads exactly the same pattern, and nothing is stored on a server."},{"question":"Why is the sound delayed with Bluetooth headphones?","answer":"Hits are scheduled on the audio clock 100 ms ahead, so the tempo stays accurate. Bluetooth headphones add a constant delay between screen and ear: the current-step light seems ahead of the sound, but the rhythm does not drift."}]}}}}