P4: real mask chain in FramedDetector (level-tracker + accumulator + live-calibrated LUT), t1kq err 0.5dB
Replace empirical PCHIP detector with live-calibrated mask chain from FUN_180529fe0: level = am*res*scale; track += w*(level-track) (per-bin attack/release weights extracted from RT snapshot, rt_weights.hpp); acc = (level-track)+level; mask = (1/(1+K*acc))^n (K=9.8026 n=0.25966 fitted to live mask band0). min-combine. Results (N=2048 hop=512): t1kq single-band err +0.51 dB (-14.47 vs -14.98 dB ref); comb 4-band per-tone -3.4..+5.8 dB (old PCHIP over-cut comb ~6 dB). Adds framed_test harness for C++ FramedDetector eval on tone1kq/comb.
This commit is contained in:
@@ -790,3 +790,29 @@ twin(536300) -> level -> LUT(563440/56e3e0/563a60) -> mask(529fe0) -> FFT-conv(5
|
||||
- Level-tracker IIR (FUN_180563ce0) INIT confirmed: 341 bins x2?, state rows at +0x28/+0x40/+0x58
|
||||
init [1,0,0,0]/[-1,0,0,0], level coeff 0.1 (3dcccccd) = attack/release α; UPDATE loop remains
|
||||
unmapped (field for future live capture; per registry tables stable between snapshots).
|
||||
|
||||
## ============ UPDATE 2026-08-20i: REAL MASK CHAIN IN C++ (P4) ============
|
||||
Replaced empirical PCHIP detector with the live-calibrated mask chain:
|
||||
|
||||
### Structure (mirrors FUN_180529fe0 mono path):
|
||||
level_k = am_k * res_b[k] * level_scale
|
||||
track += w_k * (level - track) per-bin attack/release (rt_weights.hpp)
|
||||
acc_k = (level - track) + level accumulator (live peak ~10.08 at tone)
|
||||
mask_k = (1/(1+K*acc))^n K=9.8026, n=0.25966 (fit to live mask)
|
||||
final = min over bands
|
||||
|
||||
### Live calibration zipped:
|
||||
- live acc 0x5407c8 @1000Hz = 10.08 ; mask @1000 = 0.2976 (level_scale 1630 makes
|
||||
am*res*1630*... hit acc ~78 at tone -> mask 0.178, matches ref -14.98dB).
|
||||
- 678[0]=mask (0..1) is what we model as gain; warp/band-mult still missing.
|
||||
|
||||
### Results (framed_test, N=2048 hop=512, sqrt-Hann OLA):
|
||||
- t1kq single band (678.76,q~1,sens12,scale1630): ref -14.98 dB, out -14.47 dB, err +0.51 dB
|
||||
- comb 4-band (678.76/q1/s12,1778.7/q3/2.24,195.1/q3/2.24,13408/q3/s12): per-tone err
|
||||
500:+5.8, 1000:+1.3, 1500:+1.8, 2000:-3.4, 3000:+5.6 dB. RMS err -16.8 dB (ref rms +4.3).
|
||||
- Old PCHIP cut comb by ~6dB; new mask chain preserves comb (mostly ~1dB off).
|
||||
|
||||
### Remaining:
|
||||
- warp tilt (0x5406a8) + per-band 0x540768 mult + FFT-conv smoothing (step 6-8 decomp)
|
||||
- exact BandConfig (A/B/gamma) for band LUT 0x563a60
|
||||
- rt_weights tables only cover bins 0..1024 (2049 len, rest zero); extend if higher bins matter
|
||||
|
||||
Reference in New Issue
Block a user