@audio/ spatial-panner
Status calibrated
npm1.1.3licenseMIT
Stereo panner — constant-power panning
import panner from '@audio/spatial-panner'
Constant-power (cos/sin law) stereo pan: collapses the input to mono, then splits it to left/right with equal-power gains so perceived loudness stays constant across the pan sweep. Modifies left/right in place.
panner(left, right, { pan: -0.5 }) // both modified in place
| Param | Default | |
|---|---|---|
pan |
0 |
-1 (full left) .. 0 (center) .. +1 (full right) |
Use when: static or automated stereo placement; the LFO-driven sweep is spatial-autopan.
Part of @audio/spatial — the spatial family umbrella.
MIT © audiojs