|
| | FirFilterT ()=default |
| void | set_coefficients (std::vector< SampleType > coeffs) |
| | Set filter coefficients. The number of taps equals coefficients.size().
|
| int | order () const |
| | Get current coefficient count (filter order + 1).
|
| const std::vector< SampleType > & | coefficients () const noexcept |
| | The taps in time order (h[0] multiplies the newest input).
|
| SampleType | process (SampleType input) |
| | Process a single sample.
|
| void | process (SampleType *data, int num_samples) |
| | Process a buffer of samples in-place.
|
| void | process (const SampleType *input, SampleType *output, int num_samples) |
| | Process a buffer into a separate output buffer without an intermediate copy.
|
| void | reset () |
| | Reset the internal delay buffer to zero.
|
template<typename SampleType = float>
class pulp::signal::FirFilterT< SampleType >
FIR filter with arbitrary coefficients.
History is kept linear (oldest to newest, contiguous) rather than in a wrapping ring, so every output is one contiguous dot product and a block of outputs is one pulp::simd::correlate() call, which the SIMD backends vectorize across outputs. Appending past the end of the history buffer moves the last taps - 1 samples back to the front, once per kBlockCapacity samples.
Numerics: taps accumulate oldest-first in the backend's order, so output matches a textbook sequential sum to rounding, not to the bit.
RT contract: set_coefficients() allocates and must run off the audio thread. process() and reset() allocate no memory after coefficients are installed.
SampleType process(SampleType input)
Process a single sample.
Definition fir_filter.hpp:69
void set_coefficients(std::vector< SampleType > coeffs)
Set filter coefficients. The number of taps equals coefficients.size().
Definition fir_filter.hpp:52
FirFilterT< float > FirFilter
Definition fir_filter.hpp:190
template<typename SampleType = float>
Process a buffer into a separate output buffer without an intermediate copy.
Both buffers must contain num_samples elements and may alias exactly; partial overlap is not supported. Each input slice is copied into the history before its outputs are written, so exact aliasing is the in-place case. With no coefficients the filter passes input through, as the per-sample overload does.