31 double gains[NUM_GAIN_FILTERS];
32 Biquad **filters =
nullptr;
49 EQ(
int sr,
double g[],
int lenG);
60 void applyEQ(vector<vector<double>> &samples);
63 void setHighPass(
double cutoffFreq,
double q = 0.707) { this->filters[0]->
setCoefficients(cutoffFreq, q); }
64 void setLowShelf(
double gain,
double slope = 1.0) { this->filters[1]->
setCoefficients(gain, slope); }
65 void setBell1(
double gain,
double bw = 0.6) { this->filters[2]->setCoefficients(gain, bw); }
66 void setBell2(
double gain,
double bw = 0.3) {this->filters[3]->setCoefficients(gain, bw);}
67 void setBell3(
double gain,
double bw = 0.4) {this->filters[4]->setCoefficients(gain, bw);}
68 void setBell4(
double gain,
double bw = 0.2) {this->filters[5]->setCoefficients(gain, bw);}
69 void setHighShelf(
double gain,
double slope = 1.0) { this->filters[6]->setCoefficients(gain, slope); }
70 void setLowPass(
double cutoffFreq,
double q = 0.707){this->filters[7]->setCoefficients(cutoffFreq, q);}
EQ(int sr, double g[], int lenG)
Initialize filters for EQ giving then the corresponding gains in g.