64 void setType(Type type) {
68 void setQ(sample_t Q) {
72 void setFc(sample_t Fc) {
73 this->Fc = Fc/this->Fs;
76 void setPeakGain(sample_t peakGainDB) {
77 this->peakGain = peakGainDB;
81 Type getType() {
return type; }
82 sample_t getQ() {
return Q; }
83 sample_t getFc() {
return Fc; }
84 sample_t getPeakGain() {
return peakGain; }
86 sample_t a0, a1, a2, b1, b2;
88 sample_t Fc, Q, peakGain;
110 sample_t out = in * a0 + z1;
111 z1 = in * a1 + z2 - b1 * out;
112 z2 = in * a2 - b2 * out;
Type type
Filter type.
Definition: Biquad.h:36
double q
Quality factor.
Definition: Biquad.h:38
void clean()
Definition: Biquad.h:119
double cutoff
Cutoff in Hz.
Definition: Biquad.h:37
double peakGainDb
Maximum filter gain.
Definition: Biquad.h:39
sample_t process(sample_t in)
Definition: Biquad.h:108
double fs
Sample rate in Hz.
Definition: Biquad.h:35