|
Gin
|
Single RBJ biquad, per sample. More...
#include <gin_biquad.h>
Public Member Functions | |
| void | setLowpass (double freq, double q, double sampleRate) |
| void | setHighpass (double freq, double q, double sampleRate) |
| void | setBandpass (double freq, double q, double sampleRate) |
| void | setPeak (double freq, double q, double gainDb, double sampleRate) |
| Peaking EQ. | |
| void | setBypass () |
| Passes everything through unchanged. | |
| float | process (float x) |
| void | reset () |
Public Attributes | |
| float | b0 = 1.0f |
| float | b1 = 0.0f |
| float | b2 = 0.0f |
| float | a1 = 0.0f |
| float | a2 = 0.0f |
| float | x1 = 0.0f |
| float | x2 = 0.0f |
| float | y1 = 0.0f |
| float | y2 = 0.0f |
Single RBJ biquad, per sample.
A small, self contained second order section for the places a filter is part of an algorithm rather than a thing the user configures - detector paths, side chain shaping, band limiting inside an effect. Filter is the one to reach for when a plugin exposes a filter to the user: it handles channels, slopes and modulation. This one is a struct with five coefficients and four state variables, and can sit inside a loop.
Coefficients follow Robert Bristow-Johnson's cookbook.
Usage:
Note: one instance holds the state for one channel.
Peaking EQ.
Positive gainDb boosts around freq, negative cuts.
| void Biquad::setBypass | ( | ) |
Passes everything through unchanged.
| void Biquad::reset | ( | ) |
References x1, x2, y1, and y2.
Referenced by KickSynth::reset(), and TransientShaper::reset().