P4: CRITICAL fix — level = am/res (not am*res); fc-resonance shape now correct

res=|2B/A| is minimal at band centre (not maximal). Model uses xv=log10(A_k/res_k)
=> level = am / res. Old am*res inverted the fc-response (cut more off-center).
Fixed; fc-scan (tone1kq, band fc 800..1200 via t1kq_only1_<fc>) now tracks the
reference: scale=42 mean|err| 2.46 dB, intact shape (deepest at fc==tone). Was
flat+inverted before. Remaining under-cut off-center -> FFT-conv smoothing/gaps.
This commit is contained in:
2026-08-20 16:25:00 +03:00
parent ddf2ac2050
commit 8f64539328
2 changed files with 22 additions and 2 deletions
+18
View File
@@ -905,3 +905,21 @@ Verified constants at raw=RVA: 0x24c3c58=0.001, 0x24c3e28=0.8, 0x24c4674=-0.7,
### framed_model.cpp: scale coeff now computed via prng_fvar30() (prng_state_=112),
not a hardcoded constant. t1kq still -0.43 dB at level_scale=600 (unchanged).
## ============ UPDATE 2026-08-20o: CRITICAL — level = am / res (not am * res) ============
Found + fixed a sign/direction bug in framed_model.cpp level computation.
res = |2B/A| (twin) is MINIMAL at band centre (0.117), NOT maximal. The model uses
xv = log10(A_k / res_k), i.e. LEVEL = am / res. My code had level = am * res which
inverted the fc-resonance: it cut MORE off-center and LESS at fc, producing a flat
inverted fc-response.
Fix: level = am_ / res_[b][k] (with 1e-12 floor). Now the fc-scan (tone1kq, band fc
swept 800..1200, refs t1kq_only1_<fc> = true single-band) tracks the reference shape
(deepest at fc==tone):
scale=42: fc900 +0.3, fc950 +1.3, fc1000 +0.9, fc1100 +0.2; mean|err| 2.46 dB,
max 5.3 dB (worst at edges fc800 +3.9, fc1200 +5.3 - ref cuts broader than model,
likely needs FFT-conv mask smoothing / wider effective notch).
Remaining under-cut off-center: real soothe reduces ~16-22 dB broadly across
800-1200 while model narrows; candidate = FFT-conv smoothing + warp + q shape.
DEFAULT level_scale for am/res path ~= 35-45 (was 600 for the wrong am*res path).