Class: Biquad

Biquad

Biquad filter (Direct form I). If input is of type vector the filter is applied on each dimension i parallel.

Based on the "Cookbook formulae for audio EQ biquad filter coefficients" by Robert Bristow-Johnson.

Constructor

new Biquad(options)

Parameters:
Name Type Description
options Object

Override default values.

Properties
Name Type Attributes Default Description
type String <optional>
'lowpass'

Type of the filter. Available filters: 'lowpass', 'highpass', 'bandpass_constant_skirt', 'bandpass_constant_peak' (alias 'bandpass'), 'notch', 'allpass', 'peaking', 'lowshelf', 'highshelf'.

f0 Number <optional>
1

Cutoff or center frequency of the filter according to its type.

gain Number <optional>
1

Gain of the filter (in dB).

q Number <optional>
1

Quality factor of the filter.

Source:
Example
import * as lfo from 'waves-lfo/client';

const audioInBuffer = new lfo.source.AudioInBuffer({
  audioBuffer: buffer,
});

const biquad = new lfo.operator.Biquad({
  type: 'lowpass',
  f0: 2000,
  gain: 3,
  q: 12,
});

const spectrumDisplay = new lfo.sink.SpectrumDisplay({
  canvas: '#spectrum',
});

audioInBuffer.connect(biquad);
biquad.connect(spectrumDisplay);

audioInBuffer.start();