You can pass your own coefficients to filter_fir constructor or use another method to calculate coefficients for the filter.
Use apply function to apply the filter to audio.
All the internal state (delay line etc) is preserved between calls to apply. Use reset to reset filter internal state.
Note that for high pass FIR filter the number of taps must be odd.
FIR filters with even number of taps (Type II filters) always have a zero at z=−1 (Nyquist frequency) and can't be used as high pass filters which require 1 at the Nyquist frequency.
How to apply a FIR filter to a plain array (inplace)¶
float*data;filter.apply(data);// apply inplace, size is determined automatically