Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. ConvolverNode

ConvolverNode

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

TheConvolverNode interface is anAudioNode that performs a Linear Convolution on a givenAudioBuffer, often used to achieve a reverb effect. AConvolverNode always has exactly one input and one output.

Note:For more information on the theory behind Linear Convolution, see theConvolution article on Wikipedia.

EventTarget AudioNode ConvolverNode
Number of inputs1
Number of outputs1
Channel count mode"clamped-max"
Channel count1,2, or4
Channel interpretation"speakers"

Constructor

ConvolverNode()

Creates a newConvolverNode object instance.

Instance properties

Inherits properties from its parent,AudioNode.

ConvolverNode.buffer

A mono, stereo, or 4-channelAudioBuffer containing the (possibly multichannel) impulse response used by theConvolverNode to create the reverb effect.

ConvolverNode.normalize

A boolean that controls whether the impulse response from the buffer will be scaled by an equal-power normalization when thebuffer attribute is set, or not.

Instance methods

No specific method; inherits methods from its parent,AudioNode.

Examples

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 ourHolySpaceCow example for a complete, applied example.

js
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 -> destinationsomeOtherAudioNode.connect(reverb);reverb.connect(audioCtx.destination);

Specifications

Specification
Web Audio API
# ConvolverNode

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp