Drum Machine
Program a beat on a 16-step grid with kick, snare, clap, hi-hats, toms and percussion. Pick a synthesized kit, set the tempo and swing, start from a preset groove and export your loop as a WAV file.
How to use the Drum Machine
- Press Play to hear the current pattern, or choose a groove from the Pattern list first.
- Click the squares to switch steps on and off. Each row is an instrument and each column is a sixteenth note.
- Set the tempo and swing, or tap the tempo with the Tap button.
- Pick a kit to change the sound and use M to mute an instrument.
- Choose the loop length and press Export WAV to download your beat.
Tempo, steps and loop length
In 4/4 time a bar has four beats, and a 16-step sequencer splits each beat into four sixteenth notes. The timing follows directly from the tempo:
- One beat = 60 ÷ BPM seconds
- One step = 60 ÷ BPM ÷ 4 seconds
- One bar = 16 steps = 240 ÷ BPM seconds
| Style | Typical BPM | Step length | 1 bar | 4 bars |
|---|---|---|---|---|
| Boom bap hip-hop | 85–95 | 167 ms at 90 | 2.67 s | 10.67 s |
| Reggaeton | 90–100 | 158 ms at 95 | 2.53 s | 10.11 s |
| Rock / pop | 100–130 | 136 ms at 110 | 2.18 s | 8.73 s |
| House / disco | 118–128 | 121 ms at 124 | 1.94 s | 7.74 s |
| Trap | 130–150 (half-time feel) | 107 ms at 140 | 1.71 s | 6.86 s |
| Drum & bass | 170–175 | 87 ms at 172 | 1.40 s | 5.58 s |
Classic patterns to start from
- Four on the floor: kick on every beat (steps 1, 5, 9, 13), clap or snare on 5 and 13, open hi-hat on the off-beats (3, 7, 11, 15). The foundation of house, techno and disco.
- Backbeat: kick on 1 and 9, snare on 5 and 13, eighth-note hi-hats. The basis of most rock and pop.
- Boom bap: a lazy kick on 1, 7 and 11, a hard snare on 5 and 13 and a bit of swing.
- Dembow: kick on every beat with the snare on steps 4, 7, 12 and 15, the signature reggaeton rhythm.
How the sounds are made
The kick is a sine wave whose pitch drops quickly (for example from 120 Hz to 42 Hz in 90 ms on the 808 kit), giving the thump and the boom. The snare mixes a short pitched tone with high-passed noise for the rattle of the wires. Hi-hats use six detuned square waves (808) or filtered noise, and the closed hat cuts off a ringing open hat, just like the choke group on hardware. The clap is three quick noise bursts followed by a short tail. The Lo-fi kit adds tape-style saturation and a low-pass filter for a warm, dusty sound.
Frequently asked questions
How do I make a beat with the drum machine?
Start with the kick on steps 1 and 9, the snare on steps 5 and 13 and the closed hi-hat on every odd step. Press Play, then add or remove hits while it loops. Changes are heard on the next pass of the playhead.
What does each column mean?
The 16 columns are sixteenth notes of one 4/4 bar. Steps 1, 5, 9 and 13 are the four beats (shaded groups help you see them). At 120 BPM one step lasts 60 ÷ 120 ÷ 4 = 0.125 seconds, so the whole bar lasts 2 seconds.
What does swing do?
Swing delays every second sixteenth note slightly, which turns a stiff, straight rhythm into a shuffle or groove. Around 15 to 25% gives a subtle hip-hop or house feel; 50% and more sounds like a strong triplet shuffle.
Are these real drum samples?
No. Every sound is synthesized live with the Web Audio API from oscillators, noise and filters, in the same way classic analog drum machines worked. That's why the page loads instantly and the sounds can be tuned per kit.
Can I use the exported loops in my music?
Yes. You create the pattern and the sounds are generated by your browser, so the WAV files are yours to use in songs, videos or a DAW. The export is a 44.1 kHz, 16-bit stereo WAV that loops seamlessly at the chosen tempo.
Why can't I hear anything?
Browsers only allow sound after you click something on the page, so press Play or a row name first. Also check that your device isn't muted and that the Volume slider isn't at zero.