files/en-us/web/api/pannernode/index.md
{{ APIRef("Web Audio API") }}
The PannerNode interface defines an audio-processing object that represents the location, direction, and behavior of an audio source signal in a simulated physical space. This {{domxref("AudioNode")}} uses right-hand Cartesian coordinates to describe the source's position as a vector and its orientation as a 3D directional cone.
A PannerNode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels!
{{InheritanceDiagram}}
<table class="properties"> <tbody> <tr> <th scope="row">Number of inputs</th> <td><code>1</code></td> </tr> <tr> <th scope="row">Number of outputs</th> <td><code>1</code></td> </tr> <tr> <th scope="row">Channel count mode</th> <td><code>"clamped-max"</code></td> </tr> <tr> <th scope="row">Channel count</th> <td><code>2</code></td> </tr> <tr> <th scope="row">Channel interpretation</th> <td><code>"speakers"</code></td> </tr> </tbody> </table>PannerNode object instance.Inherits properties from its parent, {{domxref("AudioNode")}}.
[!NOTE] The orientation and position value are set and retrieved using different syntaxes, since they're stored as {{domxref("AudioParam")}} values. Retrieval is done by accessing, for example,
PannerNode.positionX. While setting the same property is done withPannerNode.positionX.value. This is why these values are not marked read only, which is how they appear in the WebIDL.
coneOuterGain property.coneOuterAngle attribute. Its default value is 0, meaning that no sound can be heard."linear", "inverse" and "exponential". The default value is "inverse".rolloffFactor and distanceModel.Inherits methods from its parent, {{domxref("AudioNode")}}.
See BaseAudioContext.createPanner() for example code.
{{Specifications}}
{{Compat}}