Class ConvolverNode
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The ConvolverNode interface is an AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output.
[Value("ConvolverNode")]
public class ConvolverNode : AudioNode
- Inheritance
-
ConvolverNode
- Inherited Members
Remarks
NOTE
For more information on the theory behind Linear Convolution, see the Convolution article on Wikipedia.
Constructors
ConvolverNode()
public ConvolverNode()
ConvolverNode(BaseAudioContext, ConvolverOptions)
The ConvolverNode() constructor of the Web Audio API creates a new
ConvolverNode object instance.
public ConvolverNode(BaseAudioContext context, ConvolverOptions options = null)
Parameters
contextBaseAudioContextoptionsConvolverOptions
Remarks
Properties
Buffer
The buffer property of the ConvolverNode interface represents a mono, stereo, or 4-channel AudioBuffer containing the (possibly multichannel) impulse response used by the ConvolverNode to create the reverb effect.
[Value("buffer")]
public AudioBuffer? Buffer { get; set; }
Property Value
Remarks
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 be used as the buffer.
This audio buffer must have 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.
Normalize
The normalize property of the ConvolverNode interface
is a boolean that controls whether the impulse response from the buffer will be
scaled by an equal-power normalization when the buffer attribute is set,
or not.
[Value("normalize")]
public bool Normalize { get; set; }
Property Value
- bool
A boolean.
Remarks
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.