Build with this node

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

Ask Studio

@maruaudio/dsp/modulation/stereo-auto-panner moves an existing stereo pair with one shared sine LFO. It keeps the state, rate, depth and position of @maru/modulation-auto-panner and maps the position to a bipolar pan (pan = 2 × position − 1), applied through the Web Audio StereoPannerNode stereo-input balance law of @maru/mixing-constant-power-pan. At centre the stereo image passes through, rather than each channel being panned as its own mono source.

const state = initStereoAutoPannerNode(48000)
setStereoAutoPannerRate(state, 2)
stereoAutoPannerNodeTick(state, left, right)
// state.outLeft, state.outRight

Parameters

SetterRange the setter enforcesDefault
setStereoAutoPannerRate0.01 to 20 Hz1 Hz
setStereoAutoPannerDepth0 to 11

Neither setter restarts the phase.

Lifecycle

initStereoAutoPannerNode → setters → stereoAutoPannerNodeTick, reading outLeft and outRight → resetStereoAutoPannerNode, which restarts the LFO and keeps rate and depth. The state is scalar: no audio history, tail or latency. Ticks allocate nothing and do no I/O.

When to use it

Moving a stereo bus, a stereo synth or a stereo return from side to side without collapsing it to mono first.

Limits

  • Stereo in, stereo out, one frame per tick.
  • At pan exactly 0, including depth 0, the output is the input pair unchanged, bypassing the shared law's tiny centre crossfeed.
  • Outputs are raw doubles; the downstream processor rounds to f32.
  • At a pan extreme correlated input sums into one channel, so the level there can exceed either input channel.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Rate rate

Changing rate does not restart the shared LFO phase.

floatsetStereoAutoPannerRate
Depth depth

Changing depth does not restart the shared LFO phase.

floatsetStereoAutoPannerDepth

Dependencies

Dependents

Used by