28#ifndef SAF_FILTERS_H_INCLUDED
29#define SAF_FILTERS_H_INCLUDED
188 float_complex* filters_in,
190 float_complex* filters_out);
void faf_IIRFilterbank_destroy(void **hFaF)
Destroys an instance of the Favrot & Faller filterbank.
WINDOWING_FUNCTION_TYPES
Windowing function types.
BUTTER_FILTER_TYPES
Butterworth Infinite Impulse Response (IIR) filter design options.
FIR_FILTER_TYPES
Finite Impulse Response (FIR) filter design options.
BIQUAD_FILTER_TYPES
Bi-quadratic (second-order) IIR filter design options.
void FIRFilterbank(int order, float *fc, int nCutoffFreqs, float sampleRate, WINDOWING_FUNCTION_TYPES windowType, int scalingFLAG, float *filterbank)
Computes a bank of FIR filter coefficients required to divide a signal into frequency bands.
void faf_IIRFilterbank_create(void **phFaF, int order, float *fc, int nCutoffFreqs, float sampleRate, int maxNumSamples)
Computes a bank of IIR filter coefficients required to divide a signal into frequency bands,...
void applyIIR(float *in_signal, int nSamples, int nCoeffs, float *b, float *a, float *wz, float *out_signal)
Applies an IIR filter to a time-domain signal (using the direct form II difference equation)
void getWindowingFunction(WINDOWING_FUNCTION_TYPES type, int winlength, float *win)
Computes the weights of a specific windowing function.
void flattenMinphase(float *x, int len)
Equalises input sequence by its minimum phase form, in order to bring its magnitude response to unity...
void evalIIRTransferFunctionf(float *b, float *a, int nCoeffs, float *freqs, int nFreqs, float fs, int mag2dB, float *magnitude, float *phase_rad)
Computes magnitude and phase response of an IIR filter from its coefficients (floats) at user-specifi...
float convertQ2BW(float Q)
Converts filter Q-factor to octave band-width.
void applyBiQuadFilter(float b[3], float a[3], float w_z_12[2], float *signal, int nSamples)
Applies biQuad filter to an input signal using the direct form II difference equation: https://en....
void biQuadCoeffs(BIQUAD_FILTER_TYPES filterType, float fc, float fs, float Q, float gain_dB, float b[3], float a[3])
Calculates 2nd order IIR filter coefficients [1].
void FIRCoeffs(FIR_FILTER_TYPES filterType, int order, float cutoff1, float cutoff2, float sampleRate, WINDOWING_FUNCTION_TYPES windowType, int scalingFLAG, float *filter)
Computes FIR filter coefficients by windowing.
void butterCoeffs(BUTTER_FILTER_TYPES filterType, int order, float cutoff1, float cutoff2, float sampleRate, double *b_coeffs, double *a_coeffs)
Computes Butterworth IIR filter coefficients [1].
void evalBiQuadTransferFunction(float b[3], float a[3], float *freqs, int nFreqs, float fs, int mag2dB, float *magnitude, float *phase_rad)
Evaluates the 2nd order IIR transfer function at one or more frequencies, returning its magnitude and...
void faf_IIRFilterbank_flushBuffers(void *hFaF)
Zeros the delay lines used during faf_IIRFilterbank_apply()
float convertBW2Q(float BW)
Converts filter octave band-width to Q-factor.
void evalIIRTransferFunction(double *b, double *a, int nCoeffs, float *freqs, int nFreqs, float fs, int mag2dB, float *magnitude, float *phase_rad)
Computes magnitude and phase response of an IIR filter from its coefficients at user-specified freque...
void interpolateFiltersH(int inFFTsize, int outFFTsize, int nFilters, float_complex *filters_in, float_complex *filters_out)
Interpolate filters (w.r.t.
void getOctaveBandCutoffFreqs(float *centreFreqs, int nCentreFreqs, float *cutoffFreqs)
Converts octave band CENTRE frequencies into CUTOFF frequencies.
void faf_IIRFilterbank_apply(void *hFaF, float *inSig, float **outBands, int nSamples)
Applies the Favrot & Faller filterbank.
@ WINDOWING_FUNCTION_RECTANGULAR
Rectangular.
@ WINDOWING_FUNCTION_BLACKMAN_NUTTALL
Blackman-Nuttall.
@ WINDOWING_FUNCTION_BLACKMAN
Blackman.
@ WINDOWING_FUNCTION_BARTLETT
Bartlett.
@ WINDOWING_FUNCTION_HANN
Hann.
@ WINDOWING_FUNCTION_HAMMING
Hamming.
@ WINDOWING_FUNCTION_NUTTALL
Nuttall.
@ WINDOWING_FUNCTION_BLACKMAN_HARRIS
Blackman-Harris.
@ BUTTER_FILTER_BSF
band-stop filter
@ BUTTER_FILTER_LPF
low-pass filter
@ BUTTER_FILTER_HPF
high-pass filter
@ BUTTER_FILTER_BPF
band-pass filter
@ FIR_FILTER_BSF
band-stop filter
@ FIR_FILTER_LPF
low-pass filter
@ FIR_FILTER_HPF
high-pass filter
@ FIR_FILTER_BPF
band-pass filter
@ BIQUAD_FILTER_LPF
low-pass filter (DAFx-Zolzer)
@ BIQUAD_FILTER_LOW_SHELF_EQCB
low-shelving filter (EQ-cookbook)
@ BIQUAD_FILTER_PEAK
peaking filter (DAFx-Zolzer)
@ BIQUAD_FILTER_HPF_EQCB
high-pass filter (EQ-cookbook)
@ BIQUAD_FILTER_PEAK_EQCB
peaking filter (EQ-cookbook)
@ BIQUAD_FILTER_LOW_SHELF
low-shelving filter (DAFx-Zolzer)
@ BIQUAD_FILTER_LPF_EQCB
low-pass filter (EQ-cookbook)
@ BIQUAD_FILTER_HI_SHELF_EQCB
high-shelving filter (EQ-cookbook)
@ BIQUAD_FILTER_HI_SHELF
high-shelving filter (DAFx-Zolzer)
@ BIQUAD_FILTER_HPF
high-pass filter (DAFx-Zolzer)
Main header for the utilities module (SAF_UTILITIES_MODULE)