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 614633 of ConvolverNode

  • Revision slug: Web/API/ConvolverNode
  • Revision title: ConvolverNode
  • Revision id: 614633
  • Created:
  • Creator: chrisdavidmills
  • Is current revision? No
  • Comment

Revision Content

{{WebAudioRef}}

The ConvolverNode interface is an {{domxref("AudioNode")}} that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output. For more information on Linear Convolution, see the W3C Editors' Draft or The Wikipedia Article.

  • 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("ConvolverNode.buffer")}}
A mono, stereo, or 4-channel {{domxref("AudioBuffer")}} containing the (possibly multi-channel) impulse response used by the ConvolverNode. This is normally a simple recording of as-close-to-an-impulse as can be found in the space you want to model. For example, if you want to model the reverb in your bathroom, you might set up a microphone near the door to record the sound of a balloon pop or synthesized impulse from the sink. That audio recording would be what you use as the buffer attribute.
This 
{{domxref("AudioBuffer")}} must be of the same sample-rate as the AudioContext or an exception will be thrown. At the time when this attribute is set, the buffer and the state of the attribute will be used to configure the ConvolverNode with this impulse response having the given normalization. The initial value of this attribute is null.
{{domxref("ConvolverNode.normalize")}}
Controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer atttribute is set. Its default value is true in order to achieve a more uniform output level from the convolver when loaded with diverse impulse responses. If normalize is set to false, then the convolution will be rendered with no pre-processing/scaling of the impulse response. Changes to this value do not take effect until the next time the buffer attribute is set.

Methods

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

Examples

 

Specifications

Specification Status Comment
{{SpecName('Web Audio API', '#ConvolverNode-section', 'ConvolverNode')}} {{Spec2('Web Audio API')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}}{{property_prefix("webkit")}} Activated on Nightly only (24) {{CompatNo}} {{CompatNo}} {{CompatUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatNo}} Activated on Nightly only {{CompatNo}} {{CompatNo}} {{CompatUnknown}}

 

See also

  • Using Web Audio

Revision Source

<p>{{WebAudioRef}}</p>
<div class="summary">
 <p><span class="seoSummary">The <code><strong>Convolver</strong></code><strong><code>Node</code></strong><strong> </strong>interface is an&nbsp;<span style="line-height: 1.5;">{{domxref("AudioNode")}} that</span><span style="line-height: 1.5;">&nbsp;performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect</span><span style="line-height: 1.5;">. A </span><code style="font-size: 14px;">ConvolverNode</code><span style="line-height: 1.5;"> always has exactly one input and one output. For more information on Linear Convolution, see the <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolution-section">W3C Editors' Draft</a>&nbsp;or<a href="https://en.wikipedia.org/wiki/Linear_convolution"> The Wikipedia Article</a>.</span></span></p>
</div>
<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>
<p>&nbsp;</p>
<h2 id="Properties">Properties</h2>
<p><em>Inherits properties from its parent, </em><em>{{domxref("AudioNode")}}</em>.</p>
<dl>
 <dt>
  {{domxref("ConvolverNode.buffer")}}</dt>
 <dd>
  <span>A mono, stereo, or 4-channel&nbsp;</span><em>{{domxref("AudioBuffer")}}</em><span>&nbsp;containing the (possibly multi-channel) impulse response used by the ConvolverNode. This is normally a simple recording of as-close-to-an-impulse as can be found in the space you want to model. For example, if you want to model the reverb in your bathroom, you might set up a microphone near the door to record the sound of a balloon pop or synthesized impulse from the sink. That audio recording would be what you use as the buffer attribute.<br />
  This&nbsp;</span><em>{{domxref("AudioBuffer")}}</em><span>&nbsp;must be of the same sample-rate as the AudioContext or an exception will be thrown. At the time when this attribute is set, the buffer and the state of the attribute will be used to configure the ConvolverNode with this impulse response having the given normalization. The initial value of this attribute is null.</span></dd>
 <dt>
  {{domxref("ConvolverNode.normalize")}}</dt>
 <dd>
  <span>Controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer atttribute is set. Its default value is true in order to achieve a more uniform output level from the convolver when loaded with diverse impulse responses. If normalize is set to false, then the convolution will be rendered with no pre-processing/scaling of the impulse response. Changes to this value do not take effect until the next time the buffer attribute is set.</span></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="Examples">Examples</h2>
<p>&nbsp;</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', '#ConvolverNode-section', 'ConvolverNode')}}</td>
   <td>{{Spec2('Web Audio API')}}</td>
   <td>&nbsp;</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>{{CompatVersionUnknown}}{{property_prefix("webkit")}}</td>
    <td>Activated on Nightly only (24)</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatUnknown}}</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>IE Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatNo}}</td>
    <td>Activated on Nightly only</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatNo}}</td>
    <td>{{CompatUnknown}}</td>
   </tr>
  </tbody>
 </table>
 <p>&nbsp;</p>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li>Using Web Audio</li>
</ul>
Revert to this revision