Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@maruaudio/dsp/distortion/bitcrusher reduces sample rate and bit depth with Soundcraft's LoFi hold and quantizer law. A one-pole low-pass (@maru/filters-one-pole) filters the input; a phase accumulator advancing by crushRate / rate re-samples it; each new sample is boosted, quantized to a signed step of 2^(1 − bits) with half steps rounded away from zero, clamped to ±1 and held. The output is (x × (1 − mix) + held × mix) × 10^(−boostDb/40).

Parameters

SetterRange (clampFiniteWithFallback)FallbackDefault
setBitcrusherSampleRate20 Hz to rate/2; also sets the filter to 0.45 × thatrate/2rate/2, filter open
setBitcrusherTone20 Hz to 0.45 × rate, independent filter cutoff20 Hz
setBitcrusherBitDepth1 to 16, floored88
setBitcrusherBoost−12 to +24 dB00 dB
setBitcrusherMix0 to 111

Lifecycle

initBitcrusherNode(rate) (rate 8 to 192 kHz, fallback 48 kHz) → prepareBitcrusherNodeSampleRate → setters → bitcrusherNodeTick → resetBitcrusherNode (phase, hold and filter memory). Prepare re-clamps the crush rate and restores the crush-rate filter law, so call setBitcrusherTone again after it. Ticks allocate nothing and do no I/O.

When to use it

Lo-fi reduction on drums, keys or a full mix: fewer bits for coarser steps, a lower crush rate for longer holds.

Limits

  • Mono sample tick; no noise is added. Input is clamped to ±10⁶ (non-finite → 0); wet output stays within ±1.
  • Output compensation is half the boost in decibels, applied to dry and wet.
  • The signed grid replaced an earlier OpenDAW-attributed quantizer and intentionally changes its output.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Bitcrusher sample rate bitcrusherSampleRatefloatsetBitcrusherSampleRate
Bitcrusher tone bitcrusherTone

Independent anti-alias one-pole cutoff; rate changes retain their legacy law until this is called.

floatsetBitcrusherTone
Bitcrusher bit depth bitcrusherBitDepthfloatsetBitcrusherBitDepth
Bitcrusher boost bitcrusherBoostfloatsetBitcrusherBoost
Bitcrusher mix bitcrusherMixfloatsetBitcrusherMix

Ports

  • In ininput · audio · mono
  • Out outoutput · audio · mono

One sample per bitcrusherNodeTick call.

Dependencies

Dependents

Used by