audioJS

@audio/spatial-autopan

Status calibrated

npm1.1.3licenseMIT

Auto-panner — LFO-driven stereo panning. Constant-power cos/sin law

Overview

Install
Updated
Family
spatial, 12 packages under it
Tags
shape
import autoPanner from '@audio/spatial-autopan'

Collapses the input to mono (mid) each sample, then sweeps it between speakers with a sine LFO through the same constant-power cos/sin law as spatial-panner. Modifies left/right in place; sweep phase is carried on params._phase across calls.

autoPanner(left, right, { rate: 0.5, depth: 1 })   // both modified in place
Param Default
rate 0.5 Sweep speed, Hz (0.01–20)
depth 1 Sweep excursion, 0 (center) – 1 (full L/R)
fs 44100 Sample rate

Use when: tremolo-style auto-pan; the sweep is continuous across blocks — reuse the same params object per instance.


Part of @audio/spatial — the spatial family umbrella.

MIT © audiojs