Class IIRFilterNode
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The IIRFilterNode interface of the Web Audio API is a AudioNode processor which implements a general infinite impulse response (IIR) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well. It lets the parameters of the filter response be specified, so that it can be tuned as needed.
[Value("IIRFilterNode")]
public class IIRFilterNode : AudioNode
- Inheritance
-
IIRFilterNode
- Inherited Members
Remarks
Typically, it's best to use the BiquadFilterNode interface to implement higher-order filters. There are several reasons why:
However, if you need to create an odd-ordered IIR filter, you'll need to use IIRFilterNode. You may also find this interface useful if you don't need automation, or for other reasons.
NOTE
Once the node has been created, you can't change its coefficients.
IIRFilterNodes have a tail-time reference; they continue to output non-silent audio with zero input. As an IIR filter, the non-zero input continues forever, but this can be limited after some finite time in practice, when the output has approached zero closely enough. The actual time that takes depends on the filter coefficients provided.
Constructors
IIRFilterNode()
public IIRFilterNode()
IIRFilterNode(BaseAudioContext, IIRFilterOptions)
The IIRFilterNode() constructor
of the Web Audio API creates a new
IIRFilterNode object which an AudioNode processor
which implements a general infinite impulse response filter.
public IIRFilterNode(BaseAudioContext context, IIRFilterOptions options)
Parameters
contextBaseAudioContextoptionsIIRFilterOptions
Remarks
Methods
GetFrequencyResponse(Float32Array, Float32Array, Float32Array)
The getFrequencyResponse() method of the IIRFilterNode
interface takes the current filtering algorithm's settings and calculates the
frequency response for frequencies specified in a specified array of frequencies.
[Value("getFrequencyResponse")]
public GlobalObject.Undefined GetFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse)
Parameters
frequencyHzFloat32ArraymagResponseFloat32ArrayphaseResponseFloat32Array
Returns
Remarks
The two output arrays, magResponseOutput andphaseResponseOutput, must be created before calling this method; they
must be the same size as the array of input frequency values
(frequencyArray).