Build with this node

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

Ask Studio

@maruaudio/dsp/spectral/vocoder is a clean-room channel vocoder. A logarithmic bank of 8, 12 or 16 second-order band-pass filters analyses the modulator; each band's rectified output drives a one-pole envelope (attack or release chosen per sample), which scales the matching band of the carrier. Band centres are spaced geometrically from the minimum to the maximum frequency and Q is interpolated from start to end across the bank. The wet sum is scaled by dbToGain(gainDb) × 2 / bands and mixed with the carrier through the shared equal-power pair. Filter state and coefficients are f32.

Parameters

PathSetterRange as codedDefaultUnit
bandssetVocoderNodeBandCountRounded, then 8 (≤ 8), 12 (≤ 12) or 1612bands
carrier rangesetVocoderNodeCarrierRangemin 20 to 0.45 × rate; max from min to 0.45 × rate120 to 12000Hz
modulator rangesetVocoderNodeModulatorRangeSame120 to 12000Hz
QsetVocoderNodeQ(start, end)Each 0.25 to 404 to 8Q
envelopesetVocoderNodeEnvelope(attackMs, releaseMs)Attack 0.1 to 2000, release 0.1 to 50008, 80ms
outputsetVocoderNodeOutput(gainDb, mix)Gain −48 to +24 dB; mix 0 to 10 dB, 1dB, fraction
sourceModesetVocoderNodeSourceRounded, 0..4: external, self, white, pink, brown0index

Lifecycle

initVocoderNode(sampleRate) preallocates sixteen-band state and cooks the default bank → setters → updateVocoderNodeCoefficients after any band, range, Q or envelope change → vocoderNodeTick(state, carrier, modulator) per sample, or processVocoderBlock over a block → resetVocoderNode, which clears the recurrences, envelopes and noise state and keeps the cooked bank. An optional VocoderVoicingState (initVocoderVoicing, vocoderNodeTickVoiced, updateVocoderNodeSynthesisQ) adds per-band weights, an envelope freeze, a fourth-order cascade and an even-minus-odd side output.

When to use it

Imposing the spectral envelope of a voice or drum part on a synth carrier. Self mode analyses the carrier itself; the noise modes analyse internal white, pink or brown noise. The Vocoder module uses it.

Limits

  • Mono sample tick with two inputs. Coefficients change only when updated, with no smoothing.
  • In the noise modes the noise replaces the modulator (analysis) input; the carrier stays the external carrier.
  • At unit settings the voiced tick is bit-identical to the plain tick.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Bands bandsfloatsetVocoderNodeBandCount
Source mode sourceModefloatsetVocoderNodeSource

Dependencies

Dependents

No other node imports this one.

Used by