{{ APIRef() }}
The ConvolverNode
interface is an {{domxref("AudioNode")}} that performs a Linear Convolution on a given {{domxref("AudioBuffer")}}, often used to achieve a reverb effect. A ConvolverNode
always has exactly one input and one output.
Note: For more information on the theory behind Linear Convolution, see the W3C Web Audio API spec section, Linear Effects Using Convolution, or read the The Wikipedia Linear Convolution 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 multichannel) impulse response used by the
ConvolverNode
to create the reverb effect. 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 could then used as the buffer.
This {{domxref("AudioBuffer")}} must have the same sample-rate as theAudioContext
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 theConvolverNode
with this impulse response having the given normalization. The initial value of this attribute isnull
. - {{domxref("ConvolverNode.normalize")}}
-
Controls whether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute 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 tofalse
, 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 thebuffer
attribute is set.
Methods
No specific method; inherits methods from its parent, {{domxref("AudioNode")}}.
Example
{{page("/en-US/docs/Web/API/AudioContext.createConvolver","Example")}}
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-convolvernode-interface', 'ConvolverNode')}} | {{Spec2('Web Audio API')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(10.0)}}{{property_prefix("webkit")}} | {{CompatGeckoDesktop(25.0)}} | {{CompatNo}} | 15.0{{property_prefix("webkit")}} 22 (unprefixed) |
6.0{{property_prefix("webkit")}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | 26.0 | 1.2 | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | 33.0 |