Drum Machine
Build drum patterns with this browser-based 16-step sequencer featuring 8 synthesized drum sounds: Kick, Snare, Hi-Hat Closed, Hi-Hat Open, Clap, Tom, Cymbal, and Rim. Click grid cells to toggle beats, adjust BPM from 60 to 200, add swing for groove, and mix individual track volumes. Includes preset patterns for Basic Rock, Hip-Hop, Bossa Nova, and Disco as starting points. All sounds are synthesized in real time using the Web Audio API — the kick uses a sine oscillator with pitch envelope, snare combines filtered noise with a body tone, and hi-hats use high-pass filtered noise bursts. No samples to load, works entirely offline.
How to Use
- 1
Toggle Beats on the Grid
Click cells in the 16-step grid to activate or deactivate hits for each drum sound — Kick, Snare, Hi-Hat Closed, Hi-Hat Open, Clap, Tom, Cymbal, and Rim. Filled cells play on that step.
- 2
Set Tempo and Play
Adjust the BPM slider between 60 and 200, then press Play to hear your pattern loop. The current step highlights as it plays so you can see exactly where you are in the sequence.
- 3
Load a Preset Pattern
Choose from built-in presets like Basic Rock, Hip-Hop, Bossa Nova, or Disco to start with a classic groove. Edit any preset by toggling cells, or clear the grid to start from scratch.
- 4
Mix Volumes and Add Swing
Use the per-row volume sliders to balance your kick, snare, and hi-hat levels. Adjust the swing control to push every other step slightly late for a more human, groovy feel.
Examples by Niche
Load the Hip-Hop preset with kick on steps 1 and 11, snare on 5 and 13, hi-hat on every other step. Set 90 BPM with 30% swing for that classic boom-bap pocket.
Start with Basic Rock at 120 BPM — kick on 1 and 9, snare on 5 and 13, hi-hat on every step. Practice guitar riffs against a steady backbeat.
Load the Bossa Nova preset to hear the classic cross-stick and bass drum pattern at 130 BPM. Study the syncopated kick placement that defines the genre.
Clear the grid and build a four-on-the-floor kick pattern (steps 1, 5, 9, 13) with open hi-hat on off-beats. Set 128 BPM for house music tempo.
Frequently Asked Questions
How are the drum sounds generated without audio samples?
All sounds use Web Audio API synthesis. The kick drum is a sine oscillator that starts at 150Hz and sweeps down to 40Hz over 100ms with a 200ms gain envelope. The snare combines band-pass filtered white noise at 1000Hz with a sine body at 200Hz. Hi-hats are high-pass filtered noise at 7kHz with short (closed) or long (open) decay times. This approach means zero loading time and works offline.
What preset drum patterns are included?
Four preset patterns are included: Basic Rock (kick on 1 and 3, snare on 2 and 4, hi-hat on every 8th note), Hip-Hop (syncopated kick pattern with open hi-hat accents), Bossa Nova (traditional Brazilian pattern with rim clicks and toms), and Disco (four-on-the-floor kick with open hi-hat on the off-beats). Each preset is a starting point you can customize.
What does the swing control do?
Swing delays every other 8th note step by a percentage of the step duration, creating a shuffled or groovy feel instead of straight mechanical timing. At 0% the timing is perfectly even, at 50% it approaches a triplet feel, and at 75% it has a heavy shuffle like classic hip-hop or jazz drum programming.
Can I save my drum patterns?
Yes — your current pattern, BPM, swing setting, and volume levels are automatically saved to your browser's localStorage and restored when you return. You can also use the clear button to start fresh with an empty grid at any time.
Related Tools
Ukulele Tuner
Free online ukulele tuner with microphone pitch detection — supports standard, Low-G, baritone, and 5 other tunings.
Guitar Tuner
Free chromatic guitar tuner using your microphone — detects pitch in real time with visual tuning meter.
Virtual Piano
Play piano in your browser using your computer keyboard — 2-3 octaves with realistic sound and sustain control.