Biquad filter and design functions¶
biquad
function¶
template <typename T, typename E1>
KFR_BIQUAD_DEPRECATED expression_iir<1, T, E1>
biquad(const biquad_section<T> &bq, E1 &&e1)
Returns template expressions that applies biquad filter to the input.
Param bq
Biquad coefficients
Param e1
Input expression
template <size_t filters, typename T, typename E1>
KFR_BIQUAD_DEPRECATED expression_iir<filters, T, E1>
biquad(const biquad_section<T> (&bq)[filters], E1 &&e1)
Returns template expressions that applies cascade of biquad filters to the input.
Param bq
Array of biquad coefficients
Param e1
Input expression
Note This implementation has zero latency
template <size_t maxfiltercount = 4, typename T,
typename E1>
KFR_BIQUAD_DEPRECATED expression_handle<T, 1>
biquad(const biquad_section<T> *bq, size_t count, E1 &&e1)
Returns template expressions that applies cascade of biquad filters to the input.
Param bq
Array of biquad coefficients
Param e1
Input expression
Note This implementation has zero latency
biquad_allpass
function¶
template <typename T = fbase>
biquad_section<T> biquad_allpass(identity<T> frequency,
identity<T> Q)
Calculates coefficients for the all-pass biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param Q
Q factor
Returns Biquad filter coefficients
biquad_bandpass
function¶
template <typename T = fbase>
biquad_section<T> biquad_bandpass(identity<T> frequency,
identity<T> Q)
Calculates coefficients for the band-pass biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param Q
Q factor
Returns Biquad filter coefficients
biquad_highpass
function¶
template <typename T = fbase>
biquad_section<T> biquad_highpass(identity<T> frequency,
identity<T> Q)
Calculates coefficients for the high-pass biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param Q
Q factor
Returns Biquad filter coefficients
biquad_highshelf
function¶
template <typename T = fbase>
biquad_section<T> biquad_highshelf(identity<T> frequency,
identity<T> gain)
Calculates coefficients for the high-shelf biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param gain
Gain in dB
Returns Biquad filter coefficients
biquad_l
function¶
template <size_t filters, typename T, typename E1>
KFR_BIQUAD_DEPRECATED expression_iir_l<filters, T, E1>
biquad_l(const biquad_section<T> (&bq)[filters], E1 &&e1)
Returns template expressions that applies cascade of biquad filters to the input.
Param bq
Array of biquad coefficients
Param e1
Input expression
Note This implementation introduces delay of N - 1 samples, where N is the filter count.
biquad_lowpass
function¶
template <typename T = fbase>
biquad_section<T> biquad_lowpass(identity<T> frequency,
identity<T> Q)
Calculates coefficients for the low-pass biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param Q
Q factor
Returns Biquad filter coefficients
biquad_lowshelf
function¶
template <typename T = fbase>
biquad_section<T> biquad_lowshelf(identity<T> frequency,
identity<T> gain)
Calculates coefficients for the low-shelf biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param gain
Gain in dB
Returns Biquad filter coefficients
biquad_notch
function¶
template <typename T = fbase>
biquad_section<T> biquad_notch(identity<T> frequency,
identity<T> Q)
Calculates coefficients for the notch biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param Q
Q factor
Returns Biquad filter coefficients
biquad_peak
function¶
template <typename T = fbase>
biquad_section<T> biquad_peak(identity<T> frequency,
identity<T> Q,
identity<T> gain)
Calculates coefficients for the peak biquad filter
Param frequency
Normalized frequency (frequency_Hz / samplerate_Hz)
Param Q
Q factor
Param gain
Gain in dB
Returns Biquad filter coefficients
biquad_section
class¶
template <typename T> biquad_section
Structure for holding biquad filter coefficients.
iir
function¶
template <size_t filters, typename T, typename E1>
expression_iir<filters, T, E1>
iir(E1 &&e1, iir_params<T, filters> params)
Returns template expressions that applies biquad filter to the input.
Param e1
Input expression
Param params
Biquad coefficients
template <typename T, typename E1>
expression_handle<T, 1>
iir(E1 &&e1,
const iir_params<T, tag_dynamic_vector> ¶ms)
Returns template expressions that applies biquad filter to the input.
Param e1
Input expression
Param params
Biquad coefficients
template <size_t filters, typename T, typename E1>
expression_iir<filters, T, E1, true>
iir(E1 &&e1,
std::reference_wrapper<iir_state<T, filters>> state)
Returns template expressions that applies biquad filter to the input.
Param bq
Biquad coefficients
Param e1
Input expression
Auto-generated from sources, Revision 6aea976a464de59d522d0c629e64bf0c044e6777, https://github.com/kfrlib/kfr/blob/6aea976a464de59d522d0c629e64bf0c044e6777/include/kfr/