BiquadFilterNode Class

A second-order filter (https://webaudio.github.io/web-audio-api/#BiquadFilterNode): lowpass, highpass, bandpass, shelves, peaking, notch or allpass, with the coefficients of the Audio EQ Cookbook.

public sealed class BiquadFilterNode : AudioNode
Inheritance
AudioNode BiquadFilterNode

Constructors

NameDescription
BiquadFilterNode(BaseAudioContext, BiquadFilterOptions?)Creates a biquad filter.

BiquadFilterNode(BaseAudioContext, BiquadFilterOptions?)

BiquadFilterNode.cs

Creates a biquad filter.

public BiquadFilterNode(BaseAudioContext context, BiquadFilterOptions? options = null)

Properties

NameDescription
DetuneGets the detune of the frequency in cents.
FrequencyGets the frequency in Hz.
GainGets the gain in dB (shelves and peaking).
QGets the quality factor.
TypeGets or sets the type of the filter.

Gets the detune of the frequency in cents.

public AudioParam Detune { get; }

Gets the frequency in Hz.

public AudioParam Frequency { get; }

Gets the gain in dB (shelves and peaking).

public AudioParam Gain { get; }

Gets the quality factor.

public AudioParam Q { get; }

Gets or sets the type of the filter.

public BiquadFilterType Type { get; set; }

Methods

NameDescription
GetFrequencyResponse(ReadOnlySpan<byte>, Span<byte>, Span<byte>)Computes the frequency response of the filter for the current values of its parameters.

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

BiquadFilterNode.cs

Computes the frequency response of the filter for the current values of its parameters.

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