Table of Contents

Class BiquadDesign

Namespace
PluginUI.Dsp
Assembly
PluginUI.dll

Second-order filter coefficients from the RBJ "Audio EQ Cookbook" and their exact magnitude response, used to draw equalizer curves that match a biquad implementation sample for sample.

public static class BiquadDesign
Inheritance
BiquadDesign
Inherited Members

Remarks

Coefficients are normalized (a0 = 1). MagnitudeDb(in Coefficients, double, double) evaluates |H(e^jω)| of the digital filter, so the curve shows the real response near Nyquist (cramping of bells and shelves) instead of the analog prototype.

Methods

Design(EqBandType, double, double, double, double)

Designs one band.

public static BiquadDesign.Coefficients Design(EqBandType type, double frequency, double gainDb, double q, double sampleRate)

Parameters

type EqBandType

Filter shape.

frequency double

Center / corner frequency in Hz (clamped to 1 Hz … 0.499 × sample rate).

gainDb double

Gain in dB (bells and shelves only).

q double

Quality factor (bandwidth of bells, notches and band passes; resonance of cuts; slope of shelves, 0.7071 = maximally steep without overshoot).

sampleRate double

Sample rate in Hz.

Returns

BiquadDesign.Coefficients

The normalized coefficients.

Exceptions

ArgumentOutOfRangeException

sampleRate is not positive.

MagnitudeDb(in Coefficients, double, double)

Magnitude response in dB of a biquad at a frequency.

public static double MagnitudeDb(in BiquadDesign.Coefficients c, double frequency, double sampleRate)

Parameters

c BiquadDesign.Coefficients

Normalized coefficients.

frequency double

Frequency in Hz.

sampleRate double

Sample rate in Hz.

Returns

double

20·log10 |H(e^jω)|, floored at −300 dB.