beat lab / sampler
SYNTHESIS DRUM MACHINE

Hit the
grid.

Sixteen pads. Every sound synthesized in real time — oscillators, noise, filters, envelopes. No samples loaded. No network requests. Pure Web Audio API.

Velocity-sensitive. Touch pressure maps to loudness. On mouse, tap lower on the pad for harder hits, higher for softer. The physics of how you strike shapes the sound.

Kick is a sine with pitch envelope. Snare is noise through a bandpass over a triangle body. Hats are highpass noise at different decays. Cymbal is six detuned square oscillators. Every sound is transparent — you hear the synthesis, not a recording.

SYNTHESIS
KICK

Sine oscillator. Frequency sweeps from 150 Hz down to 35 Hz in 120ms. The pitch envelope is what makes a kick a kick — that downward sweep compresses air the same way a drum head does. Velocity scales the starting pitch.

SNARE

Two layers. A triangle oscillator swooping 200 to 100 Hz gives the body — the thump of stick on head. Bandpass-filtered noise at 5 kHz gives the crack — the snare wires rattling. Velocity scales both independently.

HATS

White noise through a highpass filter at 8 kHz. The only difference between closed and open is decay time — 60ms versus 280ms. That's what a pedal does. It damps the cymbal. Shorter noise = tighter hat.

CYMBAL

Six square oscillators at inharmonic frequencies (587, 845, 1197, 1542, 1831, 2107 Hz) through a 4 kHz highpass. The inharmonicity creates the metallic shimmer — no integer ratios between partials. Same principle as real bronze vibration modes.