Skip to content

Function ::kfr_fir_design_f64

function kfr_fir_design_f64(KFR_FIR_RESPONSE, KFR_WINDOW_TYPE, kfr_f64, kfr_f64, kfr_f64, kfr_f64, kfr_bool, kfr_f64 *, size_t) capi

kfr_bool kfr_fir_design_f64(KFR_FIR_RESPONSE response, KFR_WINDOW_TYPE type, kfr_f64 param,
                            kfr_f64 frequency, kfr_f64 high_frequency, kfr_f64 fs,
                            kfr_bool normalize, kfr_f64* taps, size_t size)

Designs a linear-phase FIR filter by the window method (double precision).

Parameters
response Filter response type (see KFR_FIR_RESPONSE ).
type Window function applied to the impulse response (see KFR_WINDOW_TYPE ).
param Window-specific parameter (alpha, beta or epsilon, see KFR_WINDOW_TYPE ).
frequency Cutoff frequency in Hz, or lower edge for band-pass and band-stop.
high_frequency Upper edge in Hz for band-pass and band-stop. Ignored otherwise.
fs Sample rate in Hz. Must be greater than zero.
normalize Non-zero to normalize the taps the same way as the C++ kfr::fir_*() family does. Low-pass and band-stop then have unit DC gain. High-pass and band-pass use the C++ scaling.
taps Output buffer receiving size taps. Must hold at least size elements.
size Number of taps. Must be greater than zero. The filter order is size - 1 .
Returns
Non-zero on success, or 0 on error (see kfr_last_error() ).

Fully qualified name: kfr_fir_design_f64(KFR_FIR_RESPONSE, KFR_WINDOW_TYPE, kfr_f64, kfr_f64, kfr_f64, kfr_f64, kfr_bool, kfr_f64 *, size_t)

Declared at capi.h:1255