Table of Contents

Class BiquadFilterNode

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The BiquadFilterNode interface represents a simple low-order filter, and is created using the BaseAudioContextcreateBiquadFilter method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. A BiquadFilterNode always has exactly one input and one output.

[Value("BiquadFilterNode")]
public class BiquadFilterNode : AudioNode
Inheritance
BiquadFilterNode
Inherited Members

Remarks

Constructors

BiquadFilterNode()

public BiquadFilterNode()

BiquadFilterNode(BaseAudioContext, BiquadFilterOptions)

The BiquadFilterNode()
constructor of the Web Audio API
creates a new BiquadFilterNode object, which represents a simple
low-order filter.

public BiquadFilterNode(BaseAudioContext context, BiquadFilterOptions options = null)

Parameters

context BaseAudioContext
options BiquadFilterOptions

Remarks

Properties

Detune

The detune property of the BiquadFilterNode interface is an a-rate AudioParam representing detuning of the frequency in cents.

[Value("detune")]
public AudioParam Detune { get; }

Property Value

AudioParam

An a-rate AudioParam.

NOTE
Though the AudioParam returned is read-only, the value it represents is not.

Remarks

Frequency

The frequency property of the BiquadFilterNode interface is an a-rate AudioParam — a double representing a frequency in the current filtering algorithm measured in hertz (Hz).

[Value("frequency")]
public AudioParam Frequency { get; }

Property Value

AudioParam

An AudioParam.

NOTE
Though the AudioParam returned is read-only, the value it represents is not.

Remarks

Its default value is 350, with a nominal range of 10 to the Nyquist frequency — that is, half of the sample rate.

-Using the Web Audio API

See also on MDN

Gain

The gain property of the BiquadFilterNode interface is an a-rate AudioParam — a double representing the gain used in the current filtering algorithm.

[Value("gain")]
public AudioParam Gain { get; }

Property Value

AudioParam

An AudioParam.

NOTE
Though the AudioParam returned is read-only, the value it represents is not.

Remarks

When its value is positive, it represents a real gain; when negative, it represents an attenuation.

It is expressed in dB, has a default value of 0, and can take a value in a nominal range of -40 to 40.

-Using the Web Audio API

See also on MDN

Q

The Q property of the BiquadFilterNode interface is an a-rate AudioParam, a double representing a Q factor, or quality factor.

[Value("Q")]
public AudioParam Q { get; }

Property Value

AudioParam

An AudioParam. Its AudioParamdefaultValue is 1, and its AudioParamminValue and AudioParammaxValue are ±(2<sup>128</sup> - 2<sup>104</sup>), or approximately ±3.403e38. This is the range of single-precision floating-point numbers.Its actual value range depends on the filter's BiquadFilterNodetype:

NOTE
Though the AudioParam returned is read-only, the value it represents is not.

Remarks

Type

The type property of the BiquadFilterNode interface is a string (enum) value defining the kind of filtering algorithm the node is implementing.

[Value("type")]
public BiquadFilterType Type { get; set; }

Property Value

BiquadFilterType

A string (enum) representing a BiquadFilterType.type

Remarks

Methods

GetFrequencyResponse(Float32Array, Float32Array, Float32Array)

The getFrequencyResponse() method of the BiquadFilterNode 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

frequencyHz Float32Array
magResponse Float32Array
phaseResponse Float32Array

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

The two output arrays, magResponseOutput and
phaseResponseOutput, must be created before calling this method; they
must be the same size as the array of input frequency values
(frequencyArray).

-Using the Web Audio API

See also on MDN