files/en-us/web/api/convolvernode/index.md
{{APIRef("Web Audio API")}}
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 Convolution article on Wikipedia.
{{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>1</code>, <code>2</code>, or <code>4</code></td> </tr> <tr> <th scope="row">Channel interpretation</th> <td><code>"speakers"</code></td> </tr> </tbody> </table>ConvolverNode object instance.Inherits properties from its parent, {{domxref("AudioNode")}}.
ConvolverNode to create the reverb effect.buffer attribute is set, or not.No specific method; inherits methods from its parent, {{domxref("AudioNode")}}.
The following example shows basic usage of an AudioContext to create a convolver node. You will need to find an impulse response to complete the example below. See our HolySpaceCow example for a complete, applied example.
let audioCtx = new window.AudioContext();
async function createReverb() {
let convolver = audioCtx.createConvolver();
// load impulse response from file
let response = await fetch("path/to/impulse-response.wav");
let arraybuffer = await response.arrayBuffer();
convolver.buffer = await audioCtx.decodeAudioData(arraybuffer);
return convolver;
}
// …
let reverb = await createReverb();
// someOtherAudioNode -> reverb -> destination
someOtherAudioNode.connect(reverb);
reverb.connect(audioCtx.destination);
{{Specifications}}
{{Compat}}