Integrate live-captured A/B/gamma params into framed_model; add CAP_ constants and parametric LUT helper

This commit is contained in:
2026-08-20 22:59:21 +03:00
parent 2d69b85aa3
commit 16853d7e0b
3 changed files with 87 additions and 1 deletions
+18
View File
@@ -12,6 +12,24 @@ namespace {
// sens XML -> internal sens_stored = sens * 2.054 (NOTES_TWIN:74: XML 12 -> 24.65 dB).
constexpr float SENS_SCALE = 2.054f;
// Live-captured BandConfig parameters from DSP snapshot (2026-08-20).
// +0x180 (level LUT curve, FUN_180563a60): A = -24.0, B = +28.0, gamma = 1.0, flag = 0.
// +0x188 (freq-range shaper, FUN_180563440): A = 16.0, B = 20000.0, gamma = 1.0, flag = 0.
// These values are identical for both render_long.rpp and t1kq_only1_1000 configs.
// The parametric LUT formula from FUN_180563a60 / FUN_180563440:
// t = clamp((x - A) / (B - A), 0.0, 1.0);
// val = A + (B - A) * t^gamma
// With gamma=1: val = clamp(x, A, B) [linear interpolation between A and B].
// The x input is the mask-dependent dB-scaled value (mask * 8.6859 from 0x24c43e0).
constexpr double CAP_A_LEVEL = -24.0;
constexpr double CAP_B_LEVEL = 28.0;
constexpr double CAP_GAMMA = 1.0;
constexpr double CAP_A_FREQ = 16.0;
constexpr double CAP_B_FREQ = 20000.0;
constexpr double CAP_GAMMA_FREQ = 1.0;
// ---- Empirical bridge fit (NOTES_LEVEL:147, phase-5 step 5b). ----
// C(f_k) = G·LUT(log10(am_k/res_k)) + W·warp(f_k)^A ; gain = (1C)·res^rp(Q).
// The Pchip LUT below IS the runtime BandConfig curve (FUN_180563440/563a60,