Skip to main content
Version: Latest

ConvolverNode

The ConvolverNode interface represents a linear convolution effect that can be applied to a signal given an impulse response. This is the easiest way to achieve echo or reverb effects.

Press play, then click the ConvolverNode box to take the reverb away. The impulse response is generated in code: a burst of noise that fades out over the chosen duration, which the convolver smears across the dry signal.

Loading...
info

Convolver is a node with tail-time, which means that it continues to output non-silent audio with zero input for the length of the buffer.

Constructor​

constructor(context: BaseAudioContext, options?: ConvolverOptions)

ConvolverOptions​

Inherits all properties from AudioNodeOptions.

ParameterTypeDefault
buffer
Optional
AudioBufferInitial value for buffer.
disableNormalization
Optional
booleanfalseWhen true, disables equal-power normalization of the impulse response (inverse of normalize).

You can also create a ConvolverNode via the BaseAudioContext.createConvolver() factory method, which uses default values.

Properties​

Inherits all properties from AudioNode.

AudioNodeproperties
NameTypeDescription
bufferAudioBufferAssociated AudioBuffer. Setting it throws NotSupportedError unless the buffer has 1, 2 or 4 channels and the same sample rate as the context.
normalizebooleanWhether the impulse response from the buffer will be scaled by an equal-power normalization when the buffer attribute is set.
Channel constraints

The input is mixed down to mono or stereo before convolution. channelCount cannot be set above 2 and channelCountMode cannot be set to 'max'; either attempt, in the constructor options or via the setter, throws NotSupportedError.

caution

Linear convolution is a heavy computational process, so if your audio has some weird artefacts that should not be there, try to decrease the duration of impulse response buffer.

Methods​

Inherits all methods from AudioNode.

AudioNodemethods

ConvolverNode does not define any additional methods.