SAF
|
A collection of IIR/FIR filter and filterbank designs. More...
#include "saf_utilities.h"
Go to the source code of this file.
Functions | |
void | getWindowingFunction (WINDOWING_FUNCTION_TYPES type, int winlength, float *win) |
Computes the weights of a specific windowing function. | |
void | getOctaveBandCutoffFreqs (float *centreFreqs, int nCentreFreqs, float *cutoffFreqs) |
Converts octave band CENTRE frequencies into CUTOFF frequencies. | |
void | flattenMinphase (float *x, int len) |
Equalises input sequence by its minimum phase form, in order to bring its magnitude response to unity, as described in [1]. | |
void | interpolateFiltersH (int inFFTsize, int outFFTsize, int nFilters, float_complex *filters_in, float_complex *filters_out) |
Interpolate filters (w.r.t. | |
float | convertBW2Q (float BW) |
Converts filter octave band-width to Q-factor. | |
float | convertQ2BW (float Q) |
Converts filter Q-factor to octave band-width. | |
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 | 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.wikipedia.org/wiki/Digital_biquad_filter. | |
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/or phase response. | |
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 frequencies (Hz). | |
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-specified frequencies (Hz). | |
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 | 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 | 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, based on the design by Favrot & Faller [1]. | |
void | faf_IIRFilterbank_apply (void *hFaF, float *inSig, float **outBands, int nSamples) |
Applies the Favrot & Faller filterbank. | |
void | faf_IIRFilterbank_flushBuffers (void *hFaF) |
Zeros the delay lines used during faf_IIRFilterbank_apply() | |
void | faf_IIRFilterbank_destroy (void **hFaF) |
Destroys an instance of the Favrot & Faller filterbank. | |
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 | 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. | |
A collection of IIR/FIR filter and filterbank designs.
Definition in file saf_utility_filters.h.