const FFT_BAND_GAIN: f32 = 50.0;Expand description
Maps the FFT-band averages to roughly the [0, 2-ish] range MD2 presets
expect (bass > 1.5 is the conventional “loud kick” threshold for
BeatDetectionMode::HardCut1). A unit-amplitude sine in the bass range
produces an averaged magnitude of ~0.5 / num_bass_bins (the FFT spreads
one bin’s peak across the averaging window); with the default 1024-point
FFT @ 44.1 kHz that’s ~0.08, so gain 12.5 maps a pure bass sine to ~1.0.
Real-world music with a bass kick lands in the ~0.5-2.0 range with 50.0,
which lines up reasonably with MD2’s expected dynamics. Tunable per-user
later via the GUI if needed.