Expand description
Channel projection and windowed-sinc FIR decimation for select/1
(docs/roadmap.md, step 6).
§Decimation filter specification
For an integer decimation factor D >= 2, the outlet applies a symmetric
Type I linear-phase Hamming-windowed sinc low-pass FIR filter to each
selected numeric channel before keeping one sample every D input samples:
- Tap count:
N = (4 * D + 1).min(257)(always odd, centerM = (N - 1) / 2). - Normalized cutoff frequency:
fc = 0.45 / D(cycles per input sample). - Unnormalized impulse response for
k = 0..N:h_raw[M] = 2 * fch_raw[k] = sin(2 * pi * fc * (k - M)) / (pi * (k - M))fork != M
- Hamming window:
w[k] = 0.54 - 0.46 * cos(2 * pi * k / (N - 1)). - Normalized taps:
h[k] = (h_raw[k] * w[k]) / sum_j(h_raw[j] * w[j]).
The DC gain is exactly 1.0. Each decimated output sample carries the
timestamp of the center tap (t_last - M / nominal_srate), removing the
constant group delay of the linear-phase filter.
Structs§
- Stream
Selector - Per-consumer channel selector and streaming FIR decimator.
Functions§
- fir_
taps - Compute the normalized Hamming-windowed sinc low-pass FIR taps for
integer decimation factor
decimate. - project_
packed - Project one
PackedSampleto the ordered channel indices inchannels, keeping the exact bits of every selected channel across all seven formats.