# Online 808 drum machine

Program a beat on a 16-step grid, tune the 808 kick to your song, add swing, and take it with you as a WAV loop or a MIDI file. Every sound is synthesized live in your browser.

## In short

Each of the 16 steps is a sixteenth note, so a step lasts 15,000 ÷ BPM milliseconds — 125 ms at 120 BPM — and a one-bar pattern lasts 2 seconds. *Export WAV* saves four bars as a 44.1 kHz stereo loop, and *Export MIDI* writes the same bars on channel 10 with the kick on note 36, the snare on 38 and the closed hi-hat on 42, the General MIDI drum numbers ([GM percussion map](https://en.wikipedia.org/wiki/General_MIDI)), so any GM drum kit plays them back correctly.

## How the timing and tuning work

A step is a sixteenth note, so it lasts `60,000 ÷ BPM ÷ 4` milliseconds. Swing works on pairs of steps: the first step of each pair takes the swing percentage of the pair’s length and the second gets the rest, which pushes every off-beat sixteenth `step × (2 × swing − 1)` later than straight time. The kick’s resting pitch is G1, 440 × 2^(−38/12) = 49.0 Hz ([note frequency table](https://newt.phys.unsw.edu.au/jw/notes.html)), and each step of *Kick tuning* multiplies it by 2^(1/12). In the MIDI export each hit sits at its swung time in ticks (480 per quarter note), on channel 10 with General MIDI note numbers ([GM percussion map](https://en.wikipedia.org/wiki/General_MIDI)).

## Worked example: 90 BPM, 60% swing, kick up 5 semitones

| What | Value | How it’s worked out |
| --- | --- | --- |
| One step (sixteenth) | 166.7 ms | 60,000 ÷ 90 ÷ 4 |
| A swung pair of steps | 200.0 ms + 133.3 ms | 333.3 ms split 60 : 40 |
| Off-beat sixteenth arrives | 33.3 ms late | 166.7 × (2 × 0.6 − 1) |
| …in the MIDI file | tick 144 instead of 120 | 33.3 ms is 24 ticks at 720 ticks a second |
| One bar / the WAV loop | 2.667 s / 10.67 s | 4 beats × 60 ÷ 90; four bars |
| Kick pitch | 65.4 Hz (C2) | 49.0 × 2^(5/12) |

## Limitations

This version has one bar of sixteen steps per pattern, one pattern at a time, and a fixed set of eight sounds. There is no per-step pitch or 808 glide yet, and the mixer levels are not stored in share links. Audio playback starts after your first click or tap because browsers block sound until you interact with a page. On some phones, the silent switch also mutes web audio.

## Sources

- [Wikipedia, “General MIDI” (percussion key map and channel 10)](https://en.wikipedia.org/wiki/General_MIDI) — channel 10 for percussion and the drum note numbers (kick 36, snare 38, clap 39, closed hat 42, open hat 46, low tom 45, rimshot 37, cowbell 56). Checked October 10, 2026.
- [Joe Wolfe, “Note names, MIDI numbers and frequencies”, UNSW Physics](https://newt.phys.unsw.edu.au/jw/notes.html) — note frequencies from A4 = 440 Hz, including G1 at 49.0 Hz. Checked October 10, 2026.
- [Standard MIDI-File Format Spec. 1.1, updated (midimusic.github.io)](https://midimusic.github.io/tech/midispec.html) — ticks per quarter note in the exported MIDI file. Checked October 10, 2026.

## How to make a beat

1. **Start from a preset or a blank grid.** The pattern menu has starting points for trap, boom bap, house, electro and Miami bass. *Clear* wipes the grid.
2. **Place hits.** Each row is a sound and each column is a sixteenth note — four columns make one beat, sixteen make one bar of 4/4. The colored bands mark the four beats. Click once for a normal hit, twice for an accent, three times to clear.
3. **Press play.** Use the button or the space bar. You can keep editing while it plays; changes are heard on the next pass.
4. **Set tempo and swing.** Tempo runs from 40 to 240 BPM. Swing delays every second sixteenth: 50% is dead straight, around 58% gives a loose hip-hop feel, and 66% is a full triplet shuffle.
5. **Tune the kick.** The 808 kick is really a short bass note. Use *Kick tuning* to match it to your song’s key (the label shows the note) and *Kick length* to turn it from a tight punch into a long sub-bass boom.
6. **Export or share.** *Export WAV* renders four bars to a 44.1 kHz stereo file. *Export MIDI* writes the same four bars as General MIDI drum notes. *Copy share link* puts the whole pattern in the address, so anyone who opens the link hears your beat.

## The sounds

None of the sounds are samples. Each one is built the way analog drum machines of the early 1980s built theirs — from oscillators, noise and envelopes — recreated with the Web Audio API:

- **BD (kick):** a sine wave that starts high and sweeps down to its resting pitch in a few hundredths of a second, with a long, tunable decay and a touch of saturation so it is audible on small speakers.
- **SD (snare):** two tuned tones for the drum body plus filtered noise for the wires.
- **CP (clap):** three quick bursts of band-passed noise followed by a short tail — the “several people clapping” trick.
- **CH / OH (hi-hats):** six detuned square waves pushed through high filters for a metallic tone. A closed hat cuts off a ringing open hat, as on the real thing.
- **LT (tom), RS (rimshot), CB (cowbell):** pitched sine and square tones with fast envelopes, including the famous two-tone cowbell.

## Why the 808 sound is everywhere

The drum machine that gave this site its name was introduced in 1980. Because it used analog circuits rather than recordings of real drums, it sounded nothing like an acoustic kit, and at first that counted against it. Then producers discovered that its kick could be stretched into a deep, sustained bass tone, its hand clap cut through any mix, and its cowbell was impossible to ignore. Those sounds became the foundation of electro, Miami bass, early house and techno, and — decades later — trap, where a long, tuned 808 kick often doubles as the bass line. Today “808” is shorthand for that whole family of sounds, which is what this machine recreates.

## Using the exports in your DAW

The WAV export is a four-bar loop at the current tempo, including swing, levels and kick settings. The file is cut from the middle of the beat playing on repeat, so a long 808 kick or an open hat from the end of bar 4 is already ringing into the start, exactly as it would on the next pass, and the loop repeats seamlessly instead of clicking or cutting off. Drop it on an audio track and it lines up with the bar. The MIDI export contains the same notes on channel 10 using the General MIDI drum map — kick on note 36 (shown as C1 or C2 depending on your DAW), snare 38, clap 39, closed hat 42, open hat 46, low tom 45, rimshot 37 and cowbell 56 — so any GM-compatible drum rack or sampler plays it with your own sounds. Accented steps are written at velocity 127 and normal steps at 96 (at the default level; a sound you turn down is written softer).

## Tips

- For trap hi-hats, set the tempo to 130–150 and fill the closed hat row with sixteenths, then remove a few and add accents to make the pattern breathe.
- For an 808 that works as a bass line, lengthen the kick to two seconds or more and tune it to the root note of your track. Use the [BPM & key finder](https://xx808.com/bpm-finder/) to get both from a reference song.
- Boom bap lives on swing. Try 56–60% at 88–95 BPM with the snare on beats two and four.
- Mute a sound quickly by pulling its level to zero in the mixer.

## Frequently asked questions

### Is the drum machine free?

Yes — playing, exporting WAV and MIDI, and sharing links are all free, with no account and no watermark on exports.

### Can I use beats I make here in my own music?

Yes. The sounds are generated by code running in your browser, not taken from sample libraries, and patterns you program are yours. You can release music made with the exports, commercially or not.

### Why don’t I hear anything?

Browsers only allow sound after you interact with the page, so press Play or click a step first. On iPhone, also check the ring/silent switch, which mutes web audio.

### How do I save a beat?

Use Copy share link. The full pattern — steps, tempo, swing and kick settings — is stored in the link itself, so bookmarking or sending it saves the beat. Nothing is stored on our side.

### What does the accent do?

An accented step plays louder. In the MIDI export it gets velocity 127 and a normal step 96 at the default mixer level; turning a sound down lowers both. Accents on a few hi-hats or kicks give a pattern movement without adding more notes.

### Is this a Roland TR-808?

No. It is an independent, browser-based drum machine inspired by the classic analog sounds that the TR-808 made famous. Roland and TR-808 are trademarks of Roland Corporation.

### Can I load my own samples?

Not in this version. Export MIDI and play it with your own samples in your DAW instead.

xx808 is not affiliated with Roland Corporation. Sounds are synthesized approximations, not reproductions of any product’s samples.

Last updated: October 15, 2026

Web page: https://xx808.com/drum-machine/
