builtins

Filters

Filters shape the frequency content of signals by attenuating or boosting certain frequencies.

Filters shape the frequency content of signals by attenuating or boosting certain frequencies.

lp

Lowpass Filter - Passes frequencies below the cutoff, attenuates above.

ParamTypeDefaultDescription
insignal-Input signal
cutsignal-Cutoff frequency in Hz
qnumber0.707Resonance (0.5-20)

Aliases: lowpass, svflp

A state-variable lowpass filter. Higher Q values add resonance at the cutoff frequency.

// Basic lowpass at 800 Hz
osc("saw", 220) |> lp(%, 800) |> out(%, %)
// Envelope-controlled filter sweep
osc("saw", 110) |> lp(%, 200 + ar(trigger(4)) * 2000) |> out(%, %)
// Resonant filter
osc("saw", 110) |> lp(%, 500, 8) |> out(%, %)

Related: hp, bp, moog


hp

Highpass Filter - Passes frequencies above the cutoff, attenuates below.

ParamTypeDefaultDescription
insignal-Input signal
cutsignal-Cutoff frequency in Hz
qnumber0.707Resonance (0.5-20)

Aliases: highpass, svfhp

Removes low frequencies. Useful for thinning out sounds or creating transitions.

// Remove sub frequencies
osc("saw", 110) |> hp(%, 200) |> out(%, %)
// Hi-hat from noise
osc("noise") |> hp(%, 8000) * ar(trigger(8), 0.001, 0.05) |> out(%, %)

Related: lp, bp


bp

Bandpass Filter - Passes frequencies around the cutoff, attenuates others.

ParamTypeDefaultDescription
insignal-Input signal
cutsignal-Center frequency in Hz
qnumber0.707Bandwidth (higher = narrower)

Aliases: bandpass, svfbp

Isolates a band of frequencies. Higher Q values create a narrower, more resonant band.

// Telephone effect
osc("saw", 220) |> bp(%, 1000, 4) |> out(%, %)
// Vocal formant
osc("saw", 110) |> bp(%, 500, 10) |> out(%, %)

Related: lp, hp


moog

Moog Ladder Filter - Classic 4-pole resonant lowpass filter.

ParamTypeDefaultDescription
insignal-Input signal
cutsignal-Cutoff frequency in Hz
resnumber1.0Resonance (0-4, self-oscillates near 4)
max_resnumber4.0Maximum resonance / self-oscillation threshold
input_scalenumber0.5Input preamp drive (higher = more saturation)

Aliases: moogladder

The legendary Moog ladder filter with its characteristic warm, creamy sound. At high resonance values, it can self-oscillate.

// Classic Moog bass
osc("saw", 55) |> moog(%, 400, 2) |> out(%, %)
// Filter sweep with high resonance
osc("saw", 110) |> moog(%, 100 + osc("sin", 0.5) * 1000, 3.5) |> out(%, %)
// Self-oscillating filter (use as oscillator)
osc("noise") * 0.01 |> moog(%, 440, 3.9) |> out(%, %)
// Hot input with more saturation
osc("saw", 110) |> moog(%, 800, 2, 4.0, 0.8) |> out(%, %)

Related: lp


sallenkey

Sallen-Key Filter - MS-20 style filter with aggressive resonance.

ParamTypeDefaultDescription
insignal-Input signal
cutsignal-Cutoff frequency in Hz
resnumber1.0Resonance (0-4, very aggressive)
modenumber0.0Filter mode (0.0 = lowpass, 1.0 = highpass)
clip_threshnumber0.7Feedback clipping threshold

Aliases: sk, ms20

Based on the Korg MS-20 filter topology with diode clipping in the feedback path. Creates the characteristic aggressive, screaming resonance.

// Classic MS-20 bass
osc("saw", 55) |> sallenkey(%, 600, 3) |> out(%, %)
// Screaming resonance
osc("saw", 110) |> sallenkey(%, 400 + osc("sin", 0.2) * 800, 3.8) |> out(%, %)
// Highpass mode
osc("saw", 110) |> sallenkey(%, 500, 2, 1.0) |> out(%, %)

Related: moog, diode