IIRFilterNode Class

A general infinite impulse response filter (https://webaudio.github.io/web-audio-api/#IIRFilterNode).

public sealed class IIRFilterNode : AudioNode
Inheritance
AudioNode IIRFilterNode

Constructors

NameDescription
IIRFilterNode(BaseAudioContext, IIRFilterOptions)Creates an IIR filter.

IIRFilterNode(BaseAudioContext, IIRFilterOptions)

IIRFilterNode.cs

Creates an IIR filter.

public IIRFilterNode(BaseAudioContext context, IIRFilterOptions options)

Parameters

context BaseAudioContext
options IIRFilterOptions

Exceptions

DomException
An array is empty or has more than 20 coefficients (a NotSupportedError), the feedforward coefficients are all zero or the first feedback coefficient is zero (an InvalidStateError).

See also

Methods

NameDescription
GetFrequencyResponse(ReadOnlySpan<byte>, Span<byte>, Span<byte>)Computes the frequency response of the filter.

GetFrequencyResponse(ReadOnlySpan<byte>, Span<byte>, Span<byte>)

IIRFilterNode.cs

Computes the frequency response of the filter.

public void GetFrequencyResponse(ReadOnlySpan<byte> frequencyHz, Span<byte> magResponse, Span<byte> phaseResponse)

Parameters

frequencyHz ReadOnlySpan<byte>
The frequencies in Hz (a Float32Array).
magResponse Span<byte>
Receives the linear magnitudes (a Float32Array of the same length).
phaseResponse Span<byte>
Receives the phases in radians (a Float32Array of the same length).

Exceptions

DomException
The arrays have different lengths (an InvalidAccessError).

See also