clap
clap · sourcesAnalog-modeled HANDCLAP voice — the fourth member of the drum family (KICK DRUM / SNARE DRUM / TOM DRUM), at deliberately CURATED complexity: one synthesis engine, eight voice knobs + level, spanning the classic clap circuits in one continuous space (TR-808 canonical twin-VCA burst+tail, TR-909 dense bright machine burst, Simmons-ClapTrap spread, LinnDrum-era dark room clap). DSP (own-code, packages/dsp/src/lib/clap-dsp.ts): seeded white noise → COLOR one-pole tilt (log-swept 9 kHz→700 Hz, white→dark, gain-compensated) → Chamberlin band-pass at TONE (400–3000 Hz; the 808 sits near 1 kHz, the 909 near 1.14 kHz) with WIDTH morphing ringy Q≈5.5 → broad splash (1/√q loudness-compensated) → the 808 twin-VCA topology: a BURST of PULSES (2–5) retriggered envelopes SPREAD ms apart (4–25, latched per hit; each pulse decays −60 dB in exactly the spacing — the quad-comparator sawtooth cycles — and the FINAL pulse rings 2× longer, the uninterrupted last discharge) summed with a separate smooth reverb TAIL envelope (30–800 ms, fired at the last pulse, fed one pole darker — the fake room). SNAP is the equal-power burst↔room balance (1 = bone-dry machine clap, 0 = room only); DRIVE a 2×-oversampled warm-tanh; then 20 Hz DC block, dB LEVEL, and a true-peak tanh bound (|out| < 1 always). Inputs: trigger_in (edge-trigger STRIKE — burst geometry + accent latched, noise reseeded: every hit bit-identical), accent_in (per-hit 0..1 CV latched at the strike edge: up to +80 % velocity AND +60 % room excitation — a harder clap is bigger, not just louder), tone_cv (±1.5 oct/V — ±1 V covers the whole knob range), tail_cv (2 oct of tail time per volt), spread_cv (±1.3 oct/V, latched per hit — the ClapTrap random-spread trick, deterministic). Output: ONE mono audio_out. Card: compact BURST·NOISE·ROOM/OUT fader band + a press-to-fire CLAP pad (the `strike` param, OR-ed with trigger_in in the worklet — one clap per press edge).
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
trigger_in | gate | The STRIKE: each rising edge fires one clap — the burst geometry (pulse count + spacing, including spread_cv) and the accent are latched at that instant, the noise source reseeds (every hit is bit-identical), and the pulse scheduler arms. How long the signal stays high doesn't matter; it's a trigger, not a hold. Patch a sequencer gate, drum-seq lane, or clock here. gate / trigger; trigger — fires once per rising edge |
accent_in | cv | Per-hit intensity CV (0..1), LATCHED at the strike edge only — between hits it's ignored, so an LFO here gives every hit its own velocity. An accented clap lands hotter (up to +80 % velocity ≈ +5 dB into the output bound, which compresses it musically) AND pumps the room disproportionately (up to +60 % tail excitation) — a harder clap is bigger, not just louder. control voltage (CV) |
tone_cv | cv | Band-center CV: ±1.5 octaves per volt on TONE (multiplied, clamped 200 Hz–4.2 kHz) — a full ±1 V swing covers the knob's whole 400–3000 Hz range from the 1 kHz default (the house CV full-swing rule). Sequence it to alternate dark thuds and bright snaps from the same voice. control voltage (CV) |
tail_cv | cv | Room-size CV: 2 octaves of TAIL time per volt — +1 V = ×4 tail, −1 V = ×¼ (clamped 15 ms–1.6 s), so ±1 V spans close to the knob's full 30–800 ms range. Ride it with an envelope or sequencer step to open the room up on the backbeat. control voltage (CV) |
spread_cv | cv | Burst-geometry CV: ±1.3 octaves per volt on SPREAD (clamped 2–50 ms), LATCHED per hit at the strike edge — ±1 V covers the knob's whole 4–25 ms range, so a slow LFO here makes each clap's hand-timing subtly different (the Simmons ClapTrap's 'random spread' trick, deterministic). control voltage (CV) |
outputs
| id | cable | what it does |
|---|---|---|
audio_out | audio | The mono clap voice: burst + room tail through the drive and the true-peak output bound (|out| < 1 always, so it patches hot safely). Layer it a few ms behind a snare for the classic 909 backbeat, or run SNAP low for a pure room layer under a dry snare. audio signal |
params
| id | label | range | default | curve |
|---|---|---|---|---|
pulses | Pulses | 2..5 | 3 | discrete |
spread | Spread | 4..25ms | 10 | log |
tone | Tone | 400..3000Hz | 1000 | log |
width | Width | 0..1 | 0.5 | linear |
tail | Tail | 30..800ms | 150 | log |
color | Color | 0..1 | 0.15 | linear |
snap | Snap | 0..1 | 0.5 | linear |
drive | Drive | 0..1 | 0.2 | linear |
level | Level | -24..12dB | 0 | linear |
strike | Clap | 0..1 | 0 | discrete |
controls
| control | what it does |
|---|---|
| Clap hero {n} | THE BURST + ROOM GRAPH — the picture of what this clap IS before anything strikes it. The filled spikes are the BURST train: PULSES onsets, the first at the strike and each one SPREAD ms after the last, every pulse decaying to −60 dB in exactly that spacing (the 808's comparator sawtooth) except the final one, which rings twice as long. The second, smoother curve is the ROOM — and where it starts is the whole point: it fires at the LAST onset, (PULSES − 1) × SPREAD after the strike, NOT at the strike, so at low SNAP this voice has a hard silent pre-delay that no control on the panel is named after. The two curves are scaled by √SNAP and √(1 − SNAP) — the equal-power crossfade — so the graph shows the balance you are actually hearing rather than two envelopes at full height. Everything is computed from the LIVE knob values through the worklet's own control laws (clapSpreadMs / clapPulseCount / clapTailMs), so the picture moves the instant you turn SPREAD, PULSES, TAIL or SNAP; it is not an illustration. The BURST / ROOM AT / VOICE readouts under it name what the picture shows — at the factory defaults 40 ms of burst, the room starting at 20 ms, and 170 ms of voice — and that last number is the one no knob can give you: turning SNAP to 1 removes the room entirely and the voice drops to 40 ms while the TAIL knob still reads 150 ms. The rendered length runs about 10–15 ms longer than the plotted envelope because the 20 Hz DC blocker has a tail of its own. The window button flips the plotted span for a long room that outruns the short view — a display setting, private to your screen: it is not shared with the rackspace and not saved with the patch. CV is not drawn: clap's tone/tail/spread jacks are worklet NODE INPUTS rather than AudioParam connections, so no host-side reader can see them, and every curve here is the knob position at cv = 0. |
| Color | Noise color (0–1): a log-swept low-pass on the noise source from ~white (9 kHz pole — 909 shift-register bright) down to dark 700 Hz heft (the LinnDrum-era read), gain-compensated so dark stays loud. Upstream of the band-pass, so it tilts the whole voice including the room. |
| Drive | Analog warmth (0–1): a 2×-oversampled warm tanh soft-clip on the summed voice. Low = clean; up = the crack fattens and the burst leans into the output bound instead of clipping — the 909-on-a-hot-mixer move. |
| Level | Output level in dB (−24..+12). The chain ends in a true-peak tanh bound, so a hot Level saturates musically rather than clipping the rack. |
| Pulses | How many hands land (2–5 burst onsets, latched per hit). 3 = the 808's comparator cycles, 4–5 = the 909's denser 'T-T-T' machine burst, 2 = a tight flam. The last pulse always rings 2× longer (the final discharge) and hands off to the room tail. |
| Snap | Burst ↔ room balance (0–1, equal-power): 1 = bone-dry machine-gun burst only, 0 = the room envelope only (a ghost clap / reverb layer), 0.5 = the classic 808 sum. This is the 'how close is the mic' knob. |
| Spread | Milliseconds between burst onsets (4–25, log, latched per hit). Short = one thick crack; the 808 sits at 10 ms; long reads as distinct micro-claps — the ClapTrap's spread into small-crowd 'applause' territory. Each pulse's decay time equals the spacing, so the sawtooth troughs stay deep at every setting. spread_cv adds ±1.3 oct/V. |
| Clap | The manual CLAP pad: press to fire exactly one clap (the pad's press edge is the strike — holding it does not retrigger). Handy for dialing the voice in without patching a trigger source. It is OR-ed with trigger_in, which means that while you hold it the combined trigger stays high and incoming trigger edges are masked until you let go; released, it sits at 0 and is a no-op. The pad is sampled once per audio block, so a press lands on the next block boundary rather than the exact sample (2.67 ms at 48 kHz). |
| Tail | The room's −60 dB ring time (30–800 ms, log). The 808's fake-reverb envelope sits near 100–150 ms; short = a dry stage, long = a hall bloom. Fired at the LAST burst pulse so the crack stays articulated. tail_cv doubles/halves per volt. |
| Tone | Band-pass center (400–3000 Hz, log). ~1 kHz = the 808's palm-cavity resonance; up = the 909's brighter snap; down = a soft dark pat. The room tail tracks it one pole darker. tone_cv sweeps ±1.5 oct/V. |
| Width | Filter shape (0–1): 0 = ringy tuned slap (Q≈5.5 — the narrow disco clap that almost pitches), 1 = a broad noise splash. Loudness-compensated (the band trim scales with √q, normalised at the 0.5 default), so it changes the shape of the noise, not the volume: measured RMS moves 0.85 dB across the whole travel. |
source
clap.ts on GitHub.