Linear-phase FIR filter kernel with overlap-add FFT convolution back-end. More...
#include "dsp_global.h"#include <Eigen/Core>#include <QString>#include <QMetaType>#include <QVector>#include <QDebug>

Go to the source code of this file.
Classes | |
| class | UTILSLIB::FilterParameter |
| Named filter-design parameter descriptor holding a human-readable name and description (e.g. design method or filter type). More... | |
| class | UTILSLIB::FilterKernel |
| The FilterKernel class provides methods to create/design a FIR filter kernel. More... | |
Namespaces | |
| namespace | UTILSLIB |
| Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms). | |
Macros | |
| #define | metatype_filterkernel |
| #define | metatype_filterkernel |
Linear-phase FIR filter kernel with overlap-add FFT convolution back-end.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
FilterKernel is the core FIR engine of the DSP library: it owns the impulse response coefficients of a low-pass, high-pass, band-pass or notch filter together with their zero-padded FFT and applies them to incoming data via overlap-add convolution. Two design back-ends are supported — the cosine-tapered raised-cosine design (CosineFilter, fast, smooth roll-off) and the Parks–McClellan equiripple design (ParksMcClellan, optimal minimax behaviour). Both produce Type-I linear-phase responses, so the kernel can be applied either as a single forward pass with a fixed group delay of (NumTaps-1)/2 samples or in zero-phase forward / time-reverse mode.
Frequency-domain convolution is realised by zero-padding the impulse response to the next power of two, transforming once at design time and caching the result. Each input block of length FFTLength − NumTaps is then transformed, multiplied with the cached spectrum and inverse- transformed; consecutive blocks are stitched by adding the NumTaps − 1 tail of the preceding block to the head of the next, which suppresses circular-convolution artefacts. Typical example: with FFTLength = 4096 and NumTaps = 80 the useful per-block input length is 4016 samples.
References: [1] https://en.wikipedia.org/wiki/Parks%E2%80%93McClellan_filter_design_algorithm [2] https://en.wikipedia.org/wiki/Overlap%E2%80%93add_method
Definition in file filterkernel.h.
| #define metatype_filterkernel |
Definition at line 269 of file filterkernel.h.
| #define metatype_filterkernel |
Definition at line 269 of file filterkernel.h.