Search guides and the APICtrl K
  1. API reference
  2. DSP

fir.h

FIR filters, designed and run.

#include <sonore/fir.h>
On this page

Design notes

The biquads in dsp.h cover everything that wants to be cheap and minimum phase. An FIR is what you reach for when the requirement is LINEAR PHASE (a mastering EQ, a crossover whose bands must sum flat, a filter that must not smear transients), and the price is latency of exactly half the kernel.

Design and processing are separate on purpose: design() allocates and belongs in prepare(), process() allocates nothing and is real-time safe.

Types 2

How sharp a Kaiser window is. Only meaningful with FirWindow::Kaiser; the fixed windows ignore it.

8.6 is roughly -90 dB, which is where a float kernel stops being the limit and the format is.

A linear-phase FIR filter.

Kernels are designed by the windowed-sinc method, which is the one that gives a predictable, symmetric kernel, and symmetry is exactly what makes the phase linear. An ODD tap count is forced for highpass and bandstop designs because an even-length kernel has a null at Nyquist, which silently turns a highpass into something that is not one.

Enums 1

  • enumenum class FirWindow
    Window shapes for kernel design. The trade is always the same: a narrower transition band costs worse stopband rejection, and vice versa.
    fir.h:28
↑↓ to move↵ to openEvery public name in the headers, and every guide