Build with this node

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

Ask Studio

@maruaudio/dsp/modulation/auto-panner moves one mono sample across a stereo pair with a sine LFO. One f32 phase accumulator drives both channel gains, which are @maru/mixing-levels' equal-power pair, so an auto-panner position and a static @maru/stereo-pan position mean the same gains:

position = 0.5 + 0.5 × depth × sin(2π·phase)
outLeft = fround(x × cos(position·π/2))
outRight = fround(x × sin(position·π/2))

The sine is inline rather than @maru/modulation-lfo, so the bytes match the kernel node this DSP node was moved from.

Parameters

SetterRange the setter enforcesDefault
setAutoPannerRate0.01 to 20 Hz1 Hz
setAutoPannerDepth0 to 11

Lifecycle

initAutoPannerNode → setters → autoPannerNodeTick(state, x), reading outLeft and outRight → resetAutoPannerNode, which zeroes the phase and outputs and keeps rate and depth. autoPannerNodePosition reads the current position without advancing, and advanceAutoPannerNode advances the phase once; stereo consumers such as @maru/modulation-stereo-auto-panner use the pair in that order. Ticks allocate nothing and do no I/O.

When to use it

Moving a mono source from side to side in time, on keys, guitar or a synth line. For a stereo source, use @maru/modulation-stereo-auto-panner, which keeps the stereo image at centre.

Limits

  • Mono in, stereo out, one sample per tick.
  • At depth 0 the output is the centred equal-power pair, not the input.
  • The phase is f32 and wraps by subtracting exactly 1.
  • Rate and depth changes apply at once and do not restart the phase.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Rate ratefloatsetAutoPannerRate
Depth depthfloatsetAutoPannerDepth

Dependencies

Dependents

Used by