Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 751457 of StereoPannerNode

  • Revision slug: Web/API/StereoPannerNode
  • Revision title: StereoPannerNode
  • Revision id: 751457
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{APIRef("Web Audio API")}}

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 {{domxref("AudioNode")}} audio-processing module that positions an incoming audio stream in a stereo image using a low-cost equal-power panning algorithm.

The {{domxref("StereoPannerNode.pan", "pan")}} property takes a unitless value between -1 (full left pan) and 1 (full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full {{domxref("PannerNode")}}.

  • Number of inputs 1
  • Number of outputs 1
  • Channel count mode "clamped-max"
  • Channel count 2
  • Channel interpretation "speakers"

Properties

Inherits properties from its parent, {{domxref("AudioNode")}}.

{{domxref("StereoPannerNode.pan")}} {{readonlyinline}}
Is an {{a-rate}} {{domxref("AudioParam")}} representing the amount of panning to apply.

Methods

No specific method; inherits methods from its parent, {{domxref("AudioNode")}}.

Example

{{page("/en-US/docs/Web/API/AudioContext.createStereoPanner","Example")}}

Specifications

Specification Status Comment
{{SpecName('Web Audio API', '#the-stereopannernode-interface', 'StereoPannerNode')}} {{Spec2('Web Audio API')}} Initial definition

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatChrome(41.0)}}  {{CompatGeckoDesktop(37.0)}}  {{CompatNo}} {{CompatNo}} {{CompatNo}}
Feature Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatNo}} 37.0 2.2 {{CompatNo}} {{CompatNo}} {{CompatNo}} {{CompatVersionUnknown}}

See also

Revision Source

<p>{{APIRef("Web Audio API")}}</p>

<div>
<p>The <code>StereoPannerNode</code> interface of the <a href="/en-US/docs/Web/API/Web_Audio_API">Web Audio API</a> represents a simple stereo panner node that can be used to pan an audio stream left or right. It is an {{domxref("AudioNode")}} audio-processing module that positions an incoming audio stream in a stereo image using a low-cost equal-power <a href="https://webaudio.github.io/web-audio-api/#panning-algorithm">panning algorithm</a>.</p>
</div>

<p>The {{domxref("StereoPannerNode.pan", "pan")}} property takes a unitless value between <code>-1</code> (full left pan) and <code>1</code> (full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full {{domxref("PannerNode")}}.</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/10105/StereoPannerNode.png" style="width: 687px; height: 89px; display: block; margin: 0px auto;" /></p>

<ul class="audionodebox">
 <li><dfn>Number of inputs</dfn> <code>1</code></li>
 <li><dfn>Number of outputs</dfn> <code>1</code></li>
 <li><dfn>Channel count mode</dfn> <code>"clamped-max"</code></li>
 <li><dfn>Channel count</dfn> <code>2</code></li>
 <li><dfn>Channel interpretation</dfn> <code>"speakers"</code></li>
</ul>

<h2 id="Properties">Properties</h2>

<p><em>Inherits properties from its parent, </em><em>{{domxref("AudioNode")}}</em>.</p>

<dl>
 <dt>{{domxref("StereoPannerNode.pan")}} {{readonlyinline}}</dt>
 <dd>Is an {{a-rate}} {{domxref("AudioParam")}} representing the amount of panning to apply.</dd>
</dl>

<h2 id="Methods">Methods</h2>

<p><em>No specific method; inherits methods from its parent, </em><em>{{domxref("AudioNode")}}</em>.</p>

<h2 id="Example">Example</h2>

<p>{{page("/en-US/docs/Web/API/AudioContext.createStereoPanner","Example")}}</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Web Audio API', '#the-stereopannernode-interface', 'StereoPannerNode')}}</td>
   <td>{{Spec2('Web Audio API')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome(41.0)}}&nbsp;</td>
   <td>{{CompatGeckoDesktop(37.0)}}&nbsp;</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>37.0</td>
   <td>2.2</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="/en-US/docs/Web_Audio_API/Using_Web_Audio_API">Using the Web Audio API</a></li>
</ul>
Revert to this revision