MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ biquad_peaking()

MAYAFLUX_API void MayaFlux::Kinesis::Discrete::biquad_peaking ( double  frequency,
double  q,
double  gain_db,
double  sample_rate,
std::vector< double > &  a,
std::vector< double > &  b 
)

Second-order peaking coefficients.

Parameters
frequencyCentre frequency in Hz
qBandwidth control; higher is narrower
gain_dbBoost (positive) or cut (negative) at centre, in dB
sample_rateSampling rate in Hz
aDenominator output, resized to 3, a[0] == 1.0
bNumerator output, resized to 3

Definition at line 128 of file Coefficients.cpp.

130{
131 const auto t = terms(frequency, q, sample_rate);
132 const double amp = db_to_amplitude_sqrt(gain_db);
133 emit(a, b,
134 1.0 + t.alpha / amp, -2.0 * t.cosw0, 1.0 - t.alpha / amp,
135 1.0 + t.alpha * amp, -2.0 * t.cosw0, 1.0 - t.alpha * amp);
136}
size_t a
size_t b
double frequency
double q

References a, b, frequency, and q.