Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Drum synthesis (external bundle)

Source of truth: the doc comments on each module struct in the external patches-drums crate (in the patches-bundles repo) define the canonical port names, parameter ranges, and behaviour. This page is kept in sync with those comments.

The 808-style electronic drum synthesisers documented on this page are not in the in-tree patches-modules crate. They ship as the patches-drums bundle from the external patches-bundles repository and are loaded at runtime by the host’s plugin scanner. See Implementing a native plugin for how host-loaded bundles work and the host’s stdlib search path (patches_ffi::scanner::stdlib_scanner) for where bundles are discovered.

Each module has a single trigger input (rising edge) and a mono out. They are designed to be driven by the tracker sequencer (see Tracker sequencer) but work with any trigger source.

All drum modules use zero-allocation DSP kernels from patches-dsp and are safe for real-time use.


Kick — 808-style kick drum

A sine oscillator with a fast pitch sweep from a configurable start frequency down to a settable base pitch, shaped by an exponential amplitude decay envelope, with optional tanh saturation for grit and a transient click layer.

Inputs

PortKindDescription
triggermonoRising edge triggers
voctmonoV/oct pitch CV; overrides sweep start frequency if connected

Outputs

PortKindDescription
outmonoKick signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat20–200 Hz55Base pitch of the kick
sweepfloat0–5000 Hz2500Starting frequency of pitch sweep
sweep_timefloat0.001–0.5 s0.04Duration of pitch sweep
decayfloat0.01–2.0 s0.5Amplitude decay time
drivefloat0.0–1.00.0Saturation amount
clickfloat0.0–1.00.3Transient click intensity

Snare — 808-style snare drum

Combines a tuned body oscillator (sine with short pitch sweep) with a bandpass-filtered noise burst. Each path has its own decay envelope; the tone parameter crossfades between them.

Inputs

PortKindDescription
triggermonoRising edge triggers

Outputs

PortKindDescription
outmonoSnare signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat80–400 Hz180Body oscillator base pitch
tonefloat0.0–1.00.5Body vs noise mix (0 = all body)
body_decayfloat0.01–1.0 s0.15Body amplitude decay time
noise_decayfloat0.01–1.0 s0.2Noise amplitude decay time
noise_freqfloat500–10000 Hz3000Noise bandpass centre frequency
noise_qfloat0.0–1.00.3Noise bandpass resonance
snapfloat0.0–1.00.5Transient snap intensity

ClosedHiHat — Closed hi-hat

Metallic tone from six inharmonic square oscillators mixed with highpass-filtered white noise, shaped by a short decay envelope.

Inputs

PortKindDescription
triggermonoRising edge triggers

Outputs

PortKindDescription
outmonoClosed hat signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat100–8000 Hz400Base frequency of metallic tone
decayfloat0.005–0.2 s0.04Amplitude decay time
tonefloat0.0–1.00.5Metallic vs noise mix
filterfloat2000–16000 Hz8000Noise highpass cutoff

OpenHiHat — Open hi-hat

Same metallic tone engine as closed hi-hat but with a longer decay range. Includes a choke input so a closed hi-hat trigger can cut it short.

Inputs

PortKindDescription
triggermonoRising edge triggers
chokemonoRising edge chokes (cuts) the sound

Outputs

PortKindDescription
outmonoOpen hat signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat100–8000 Hz400Base frequency of metallic tone
decayfloat0.05–4.0 s0.5Amplitude decay time
tonefloat0.0–1.00.5Metallic vs noise mix
filterfloat2000–16000 Hz8000Noise highpass cutoff

Tom — 808-style tom

Shares the kick’s basic architecture (sine oscillator + pitch sweep + amplitude decay) but with a higher pitch range, shorter sweep, and a subtle noise layer for attack texture.

Inputs

PortKindDescription
triggermonoRising edge triggers

Outputs

PortKindDescription
outmonoTom signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat40–500 Hz120Base pitch
sweepfloat0–2000 Hz400Pitch sweep start offset
sweep_timefloat0.001–0.3 s0.03Pitch sweep duration
decayfloat0.05–2.0 s0.3Amplitude decay time
noisefloat0.0–1.00.15Noise layer amount

Cymbal — Crash/ride cymbal

Uses the same metallic tone engine as hi-hats but with a higher frequency range, longer decay, and a “shimmer” parameter that adds slow LFO modulation to the partial frequencies.

Inputs

PortKindDescription
triggermonoRising edge triggers

Outputs

PortKindDescription
outmonoCymbal signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat200–10000 Hz600Base frequency of metallic tone
decayfloat0.2–8.0 s2.0Amplitude decay time
tonefloat0.0–1.00.5Metallic vs noise mix
filterfloat2000–16000 Hz6000Noise highpass cutoff
shimmerfloat0.0–1.00.2Partial frequency modulation depth

Clap — 808-style handclap

White noise passed through a bandpass filter, gated by a burst generator to produce the initial “clappy” retriggered transient, then shaped by a longer decay envelope for the tail.

Inputs

PortKindDescription
triggermonoRising edge triggers

Outputs

PortKindDescription
outmonoClap signal

Parameters

NameTypeRangeDefaultDescription
decayfloat0.05–2.0 s0.3Tail decay time
filterfloat500–8000 Hz1200Bandpass centre frequency
qfloat0.0–1.00.4Bandpass resonance
spreadfloat0.0–1.00.5Spacing between bursts
burstsint1–84Number of noise bursts

Claves — Claves

A short, bright, resonant click produced by exciting a high-Q bandpass SVF with a single-sample impulse and shaping with a fast decay envelope.

Inputs

PortKindDescription
triggermonoRising edge triggers

Outputs

PortKindDescription
outmonoClaves signal

Parameters

NameTypeRangeDefaultDescription
pitchfloat200–5000 Hz2500Resonant frequency
decayfloat0.01–0.5 s0.06Amplitude decay time
resonfloat0.3–1.00.85Bandpass resonance / ring