Skip to content

StereoPannerNode

Hans Lindetorp edited this page Feb 24, 2021 · 1 revision

The StereoPannerNode interface of the Web Audio API represents a simple stereo panner node that can be used to pan an audio stream left or right. It is an AudioNode audio-processing module that positions an incoming audio stream in a stereo image using a low-cost equal-power panning algorithm.

The pan property takes a unitless value between -1 (full left pan) and 1 (full right pan).

Attributes:

  • pan

Example

<?xml version="1.0" encoding="UTF-8"?>
<Audio version="1.0" timeUnit="ms" interactionArea="#touchArea" gain="-10dB">
  <Chain>
    <AudioBufferSourceNode loop="true" src="loop.mp3" trig="pointer"></AudioBufferSourceNode>
    <StereoPannerNode pan="-1"></StereoPannerNode>
  </Chain>
</Audio>

Read more: https://developer.mozilla.org/en-US/docs/Web/API/StereoPannerNode

Clone this wiki locally