Drum Machine
Tap a beat on 8 drums, press Play, swing it, save it as WAV. Free, no sign-up.
Tap a square for a hit (small block); with Accent on, a tap makes a loud hit (full block). Keys 1–8 play the pads, Space plays and stops, T taps the tempo.
Starter beats
Sounds
Shaping Kick
Song chain
Export WAV
Share
Saved on this device
Your beat (all four patterns, the chain and the sounds) is kept in this browser's local storage as you edit, so it is here next time. It never leaves this device.
How to make a beat
- Tap squares in the Kick row on steps 1, 5, 9 and 13 (the start of each beat), then press Play. Or pick a starter beat.
- Add a Snare or Clap on 5 and 13 and Closed hat on every other step. Turn on Accent and tap a hit to make it louder.
- Set the tempo by typing it or pressing Tap along with a song, and raise Swing for a shuffle.
- Shape each drum under Sounds (tune, decay, level, mute, solo), build patterns B to D and string them together in the Song chain.
- Press Export WAV to download the chain or a number of bars, or Make share link to send the beat to someone.
How the timing holds
Browser timers run late whenever the page is busy, by 4 to 50 ms, which is enough to hear. So this drum machine never times a hit with a timer. A timer only wakes a scheduler every 25 ms; the scheduler looks 0.1 s ahead and books every hit due in that window on the Web Audio clock, which counts the sound card's own samples. A kick booked for 2.000 s starts on the sample for 2.000 s, however busy the page is. The playhead is drawn from the same clock. The test for this page renders a beat offline, finds each hit in the samples, and checks it lands within 1 ms of where it should.
One step is a 16th note: 15 ÷ BPM seconds, so 125 ms at 120 BPM and a 16-step bar of 2 s. With 8 steps the pattern is half a bar; with 32 it is two bars.
Swing and accents, worked out
Swing delays every even 16th (steps 2, 4, 6 …) by swing × 1/2 × one 16th, and leaves the odd ones on the grid. At 120 BPM a 16th lasts 125 ms, so 50 % swing moves every even 16th 31.25 ms later. At 67 % the pair splits 2:1, the triplet shuffle of swung hip-hop and blues; 75 % (the top) splits it 11:5, the heaviest feel. Swing only moves hits on even steps, so a hat on every 16th feels it most and a kick on each beat not at all.
An accented hit plays at 1.6 × its normal level, about 4 dB louder. Accents on the beats and normal hits between them is what makes 16th hats sound played rather than typed.
The sounds
Every drum is synthesised in this page, in the style of the classic analogue drum machines, not sampled: the kick is a sine wave that drops from 170 to 47 Hz in 0.11 s; the snare is filtered noise over a 200 Hz tone; the clap is three quick noise bursts 11 ms apart and a tail; the hats are six detuned square waves through a 7 kHz high-pass, and a closed hat cuts off a ringing open hat as on a real kit; the toms are falling sines; the rim is a short click at 1.7 kHz. Tune moves a drum by up to 12 semitones, Decay makes it 25 % to 200 % as long, Level sets how loud it sits in the mix.
Starter beats
Four-on-the-floor (124 BPM): a kick on every beat and an open hat on every off-beat, house and disco. Backbeat (100 BPM): snare on 2 and 4, the core of rock and pop. Half-time (140 BPM): the snare only on beat 3, so it feels like 70. Shuffle (92 BPM, 67 % swing): swung 16th hats and a ghost snare. Each comes with a fill in pattern B and the chain A A A B. Loading one replaces your beat, and Undo brings yours back.
What it cannot do
- No samples of real drum machines: every sound is synthesised in the page, so it sounds like an analogue-style drum box, not a recorded kit.
- No MIDI in or out (it may come later if people use it), and no recording of your own sounds.
- WAV only, mono 16-bit. MP3 encoders carry an LGPL licence, so there is no MP3 export; most converters and DAWs take WAV.
- A phone may pause the audio when the screen locks or you switch apps, and an iPhone with the silent switch on may play nothing.
- Bluetooth headphones add 100 to 300 ms of delay that the page cannot remove, so pads feel late; the exported WAV is not affected.
- One hit per drum per step, one accent level, and a chain of up to 32 patterns; an export is at most 64 bars.
Privacy
The sounds are made in this page; no sound files are downloaded and no beat is sent anywhere. The beat is saved in this browser's local storage only, and Clear saved beat deletes it. A share link carries the beat after the #, which browsers do not send to any server. The page counts an anonymous page view and the fixed words drum-play, drum-export and drum-share-open, never a pattern, tempo or name.
Questions
Can I make a beat on my phone?
Yes. The grid, Play and the pads fit a phone screen; tap squares to place hits and press Play. Sound starts only after your first tap, because phones block audio until you touch the page. If the screen locks, the phone may pause the audio.
Can I play the drums with my computer keyboard?
Yes. Keys 1 to 8 play kick, snare, clap, closed hat, open hat, low tom, high tom and rim; Space starts and stops the beat. Switch on Record pads while the beat plays and your hits are written into the nearest step.
Does it work with MIDI?
No. It has no MIDI in or out. To use the beat in other music software, export it as a WAV: the file is exactly the chain or the number of bars you choose, so it loops cleanly in a DAW.
How do I save or export a beat without signing up?
Your beat is saved in this browser as you edit, with no account. Export WAV downloads it as a 16-bit WAV file, and Make share link gives a link that holds the whole beat inside the link itself.
What does swing do on a drum machine?
Swing delays every second 16th note so the beat lilts instead of marching. Here the delay is swing × 1/2 × one 16th: at 120 BPM a 16th lasts 125 ms, so 50 % swing moves every even 16th 31.25 ms later, and 67 % gives the 2:1 triplet shuffle.