Skip to main content

Module fft

Module fft 

Source
Expand description

Windowed FFT producing linear magnitudes plus a log-frequency band spectrum for scenes.

Two windows, one axis (ADR-0049). A single 2048 window cannot carry a 64-band log axis: its bins are 23.4 Hz apart at 48 kHz, while the lowest log bands are 3.6 Hz wide, so the bottom 20 bands were narrower than one bin and the old collapse fix-up spread them across single linear bins instead. The kick-and-sub region — the most-bound part of the axis — was its worst resolved.

So the short WINDOW_SIZE window keeps feeding every band it can actually resolve, and a longer LOW_WINDOW_SIZE window feeds the bands below the crossover. The crossover is derived, not chosen: it is the first band whose width reaches one short-window bin (band 20, ~246 Hz at 48 kHz — which lands within 2 % of the independently-chosen BASS_HI_HZ). Above it nothing about the layout changed; below it the axis is genuinely logarithmic for the first time.

The low bands inherit the long window’s slower time response — 85 ms of Hann group delay at 8192 — and that is physics, stated rather than compensated away (ADR-0049). It does not move NFR section 3’s beat-to-reaction budget: onset, beat and tempo all still read the short window’s magnitudes, untouched.

Structs§

BandLayout
The 64-band log axis resolved against both analysis windows.
SpectrumAnalyzer
Windowed FFT plus a fixed log-frequency band mapping, reused every hop.

Enums§

BandSource
Which analysis window a band’s magnitudes come from.