Clever Quest Lab ← Labs

Drum Machine

Tap steps to build a beat. Every drum is synthesized live in your browser.

Sound is off – press Play or tap a pad.

Pattern

Tap a step: off → on → accent (louder, marked >) → off. Tap a track name to hear that drum. M mutes, S solos.

Pads – keys 1 to 8

Preset beats

Kit

Export and share

The WAV is rendered in your browser (44.1 kHz, 16-bit, mono). The link holds the whole beat in its address.

How to use it

Press Play or the Space bar. The first press also switches the sound on. The grid has eight drum tracks and sixteen steps, and a playhead loops through them. Tap a step once to switch it on, again to make it an accent (louder, marked with >) and a third time to switch it off.

On a phone, pick a track from the eight tabs and edit its steps on the large buttons below. The dots in each tab show that track’s pattern. Your beat is saved in this browser automatically.

Controls

How it works

A step sequencer divides a bar into equal steps and stores, for each drum, which steps are on. Here one step is a sixteenth note. BPM counts quarter notes per minute, and a quarter note holds four sixteenths, so:

step duration = 60 / BPM / 4 seconds

At 120 BPM a step lasts 0.125 s and the 16-step bar lasts 2 s. JavaScript timers can run many milliseconds late, so the timer only wakes a scheduler about every 25 ms. The scheduler places every note due in the next 120 ms on the audio clock, which starts sounds with sample accuracy.

Swing delays every second sixteenth (steps 2, 4, 6 and so on) by the chosen percentage of one step. At about 33 % each pair of steps is split 2:1, the triplet shuffle of blues and jazz. 50 % gives a 3:1 split.

Each drum is built from oscillators and noise when it is triggered. In the Punchy kit:

An accent plays a step at full level. A normal step plays at 60 % of that, about 4.4 dB quieter. All tracks pass through the master volume and a limiter that keeps loud combinations from distorting.

Things to try

Frequently asked questions

Why is there no sound until I press Play?

Browsers block audio until you interact with the page. Play, a pad, a track name or the Space bar all start it.

Why do Bossa and Shuffle show such a slow tempo?

In these two presets each step is used as an eighth note, so the sixteen steps cover two bars. The tempo you feel is twice the number shown.

What is in the exported WAV file?

The current pattern, or the chain if Chain is on, at 44.1 kHz, 16-bit, mono. The file is exactly as long as the bars you chose, and sound ringing past the end is carried into the start, so it loops without a gap.

Is my beat sent anywhere?

No. Everything runs in your browser and the beat is kept in its local storage. A share link carries the beat in its own address, so whoever opens it gets a copy.

More free games and simulators