{{WebAudioRef}}
{{SeeCompatTable}}
The Convolver
Node
interface is an {{domxref("AudioNode")}} that performs a Linear Convolution on a given AudioBuffer. This is 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