Commit Graph
109 Commits
Author SHA1 Message Date
Matiq 7a108c529a docs: NOTES_LEVEL update — LUT level-domain discovery, sweep tooling hazard 2026-08-21 12:36:35 +03:00
Matiq e990c21e94 fix: framed_test parse every comma band (was first-arg only); comb tests were single-band 2026-08-21 00:52:44 +03:00
Matiq b333f6828f docs: NOTES — verified comb params (neg sens, multi-mode); comb needs combine/acc, not params 2026-08-21 00:42:32 +03:00
Matiq 8e4e40b25a docs: NOTES — Pchip LUT fix + comb diagnosis (level-dependent, not multiband) 2026-08-21 00:34:18 +03:00
Matiq 16853d7e0b Integrate live-captured A/B/gamma params into framed_model; add CAP_ constants and parametric LUT helper 2026-08-20 22:59:21 +03:00
Matiq 2d69b85aa3 P5: NOTES — F5c DSP-FFT 0x140a70 status (P3 confirmed unwired; all check targets PASS)
Full dsp/ check sweep green. fft.cpp = numerical radix-2 (std::cos) not bit-exact
0x140a70; split-radix butterfly + plan-gen giant + sin-table loader remain (multi-week
P3). Required only for FFT-conv byte-parity, not for the bridge renderer.
2026-08-20 21:09:28 +03:00
Matiq d802ee7aed P5: F5b — exp2 0x26b820 assets extracted bit-exact + numeric fallback exp2_dsp
Extracted the 8x16 irrational tables + lead-in -708.4xx series from soothe_mem.bin
into exp2_tables.{hpp,cpp} (P3 bit-exact inputs). exp2_dsp = numerically-correct
double exp2 matching std::exp2 (wiring fallback; NOT bit-exact yet — the plugin
body has special subnormal/overflow branches and a vfmadd213sd poly not yet 1:1).
exp2_check: 2e6-grid PASS (0 cells >1e-13).
2026-08-20 21:07:30 +03:00
Matiq 4e9c1b1ed7 P4: F4 geometry test — internal 48000/4096 does NOT close residual (0.68 vs 1.00); all structural adaptations rejected
Tested internal-geometry (48000/4096 + resample) — worse. Combined with earlier
negative results (parametric LUT x6, FFT-conv window, combine acc), every structural
adaptation is rejected. Bridge (Pchip 0.774) = empirical ceiling. Bytes require live
A/B/gamma capture or bit-exact exp2/FFT kernels.
2026-08-20 20:54:05 +03:00
Matiq fa1ef205df P4: F2 structural wiring tests — combine+FFT-conv naive wiring both regress (doc only)
Wiring FFT-conv step5 (mask*=win) gives mean 5.2, combine/acc (att/rel from kRTAtt/
kRTRel) gives 4.7 vs base 0.75-0.80 on representative subset. Both belong to the
exp2(mask) structural chain (blend 0.8 + bigkernel) NOT the fitted bridge final-gain.
No code change; bridge + Pchip stays canonical (0.773).
2026-08-20 20:52:00 +03:00
Matiq 1cfe013939 P4: bench all existing parametric LUT sets on full honest corpus — Pchip remains best (0.773)
All previously-derived parametric LUT forms (u563a60 A=-13.78/68.29/0.344, lut5/
lut4 gamma-LUT, power-law, linear 0.483/0.717, real extracted points) tested on the
full 59-case honest 24-bit metric within one fixed bridge pipeline. None beat the
committed Pchip (0.773; worst powerlaw 6.8). F1 closed: parametric curve production
was already done, none accepted; structural A/B/gamma from ctx+0x188 remains the only
path to bytes (blocked on level-path object live capture).
2026-08-20 20:44:20 +03:00
Matiq cea562b511 P4: F0 GATE PASSED — output is byte-deterministic; re-renders reproduce committed refs exactly
Two test RPPs (res_only1_500 4s, t1kq_only1_1000 6s) rendered twice each via
reaper -nosplash CLI. Data chunks identical across runs AND byte-identical to the
committed reference wavs. Whole-file differs only in the bext render-timestamp.
=> bit-exact (bytes) is REACHABLE; the per-run-dithrandization blocker is closed.
Next: exact structural chain + kernels + internal 48000/4096 geometry + live A/B/gamma.
2026-08-20 20:03:58 +03:00
Matiq 4014133d57 P4: NOTES — twin res verified vs Python canon (match <1.5%); res_only1 residual is LUT-level, not res-shape 2026-08-20 19:35:52 +03:00
Matiq 067d483f15 P4: NOTES — fit exploration results (mask-level fits do not transfer to full render)
- sqrt-Hann analysis regressed (0.788/2.91) vs committed Hann-Hann (0.774/2.12).
- Full-corpus G/W/A/rp mask-level fit (0.66) regressed in OLA render (0.812/2.37);
  the render metric is the only honest one.
- Residuals level-dependent (t1k_b1f loud +0.8..2.9, al low -1.1..-1.8); solution =
  structural A/B/gamma band LUT, combine/acc 0x5407c8 + FFT-conv 0x535a70 (todo #3).
2026-08-20 19:34:01 +03:00
Matiq 9a26532c60 P4: NOTES — broadband hypothesis tested NEGATIVE (per-bin reduction confirmed) + LUT re-cut rejected
Windowed-FFT of dual ref: gain@500=0.309, gain@2000=0.292 but gain@1000 (empty bin)=0.995
=> reduction is per-bin (am_k/res_k), NOT broadband — validates model structure.
16-knot monotone LUT (floor .35/cap .70) regressed corpus mean 0.77->1.09; reverted.
t1k_b1f/al residuals rooted in am-normalization / input-level differences, not LUT shape.
2026-08-20 18:30:30 +03:00
Matiq 94a6749c9a P4: NOTES — full honest corpus assessment (dual/al/res/t1k/t1kq baseline mean 0.77, max 2.12)
Systematics isolated: Pchip LUT frozen cap under-predicts loud tail (t1k_b1f needs
LUT 0.70 at xv 0.85), over-predicts low tail (al lv24 needs 0.35 at xv -0.5).
Real LUT extracted from refs; parametric fit A=-13.78/B=68.29/g=0.344 regresses dual
(rejects in full render). Structural next: decode BandConfig ctx+0x188 writers.
2026-08-20 18:25:02 +03:00
Matiq da63adc82c P4: METRIC FIX + log-domain LUT chain ported — honest baseline err <0.7 dB
Crucial: earlier dual ref -53.7 dB was a 24-bit-misdecoded artifact; honest ref is
-10.2 dB flat. Root cause of the "dual paradox" was a metric bug + missing log-domain
LUT. Ported the documented bridge (NOTES:147) into framed_model.cpp:
  xv=log10(am/res); C=G*LUT(xv)+W*warp^A; gain=(1-C)*res^rp.
Results (honest 24-bit metric): dual (fc=500 q-sweep) err <=0.7, t1kq fc-scan
err <=0.59. All empiric numbers explicitly marked. Structural A/B/gamma + combine/
FFT-conv still pending.
2026-08-20 17:37:31 +03:00
Matiq f8ecf6a1af P4: Phase B — framed_model re-transcribed to the confirmed chain (NOTES:199-226)
Fixes structural divergences: IIR1 into shared 0x5406f8 buffer + bridge to band
mask (FUN_18052d650, 0x5160); IIR2 on band mask; Hermitian mirror (0x11940);
blend step f6f8=axis(1-mix)+mix*0.8, mask=exp2(-mask)*f6f8; real combine via
kRTAtt/kRTRel weights (0x5406c8/6e8); warp, IIR3x2, dry/wet.

Validation: t1kq only1 fc1000 -21.1 vs -22.1 (OK); fc-scan shape intact;
dual @500 matches (s30 -51.5 vs -53.7), @2000 gap -4..-13 vs -29.6 remains.
That gap = dB-domain band LUT (FUN_180563a60) not yet in chain -> Phase A.
2026-08-20 17:16:22 +03:00
Matiq 8f64539328 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.
2026-08-20 16:25:00 +03:00
Matiq ddf2ac2050 P4: lock PRNG prologue + correct constants (DAT_*=1); scale via prng_fvar30
CRITICAL fix: soothe_mem.bin is VA-linear (offset=RVA). DAT_18262b5c8/b704/b700
are INT 1 (cvtdq2ps -> 1.0), NOT the 0.4552/0.6089/0.6070 read earlier via a bad
section offset. Transcribed FUN_180529fe0 PRNG prologue into prng_fvar30():
fVar30=(int)(LUT[s+1]*LUT[s]+0.001). At live state 112 this is deterministically
1.0 over 300 frames, so scale level *= (1/2048)*440.95 is not randomized in
practice. Scale coefficient now computed structurally; t1kq unchanged -0.43 dB.
2026-08-20 16:14:50 +03:00
Matiq bdf9f21a60 docs: AGENTS.md + refresh README/roadmap/summary/SESSION_HANDOFF to P4 canon; rm empty logs
- AGENTS.md: canonical build/test commands, honest trimmed tone metric, current
  bit-exact state (mask-apply chain), open gaps (PRNG/FFT-conv/exp2/SR-mismatch).
- README.md: status moved to P4 (C++ FramedDetector canon, framed_test), historical
  B.1..B.15 numerical model demoted to <details>; structure/doc table updated.
- roadmap.md: P4 phase marked progress, P4.1/P4.2/P4.3 milestones, top status refresh.
- summary.md: marked historical (behavioral v4).
- SESSION_HANDOFF.md: fixed stale "NOT DECODED" (now decoded), copy note done.
- Removed empty tmp_spec.txt/giant3.txt and untracked .log/__pycache__ clutter.
2026-08-20 15:50:07 +03:00
Matiq 77b639ee82 chore: fix .gitignore to track decompiled .dis/.bin disassemblies
.gitignore used '*' as ignore-all with only extension whitelists, so the 128
handoff/nls_dasm/*.dis + 6 *.bin disassembly outputs (f_563a60, f_56e3e0,
f530850_full, f_52b570, fft, twin, ...) were NOT tracked - data-loss risk.
Now un-ignore handoff/nls_dasm/*.{dis,bin} explicitly. Heavy .bin dumps
(soothe_mem.bin etc.), logs, wav/rpp, dl/lib/bin/ghidra-proj stay ignored.
2026-08-20 15:42:42 +03:00
Matiq 2e0b107b4c P4: document PRNG prologue + remaining bit-exact gaps 2026-08-20 15:32:47 +03:00
Matiq 0d262461ea P4: lock bigkernel semantics (exp2(-mask)*blend) + calibrate scale
Read the 0x26b820 SIMD loop: the exp2 result is multiplied by the blend buffer
(vmulpd at 0x18026bba0 with ymm11=blend) => mask = exp2(-level)*blend, sign
inverted for attenuation. framed_model.cpp corrected to exp2(-scratch)*0.8.
Calibrated level_scale=600 -> t1kq err -0.06 dB (ref -14.98). comb per-tone
errors reduced (max ~7.8 dB); warp/FFT-conv smoothing still approximated.
2026-08-20 15:25:49 +03:00
Matiq f23bbfa1f6 P4: decode FUN_180529fe0 mono-path exactly + extract live mask tables
Full decomp of the per-band mask-apply loop (scale -> IIR1/2/3 leaky ->
blend -> exp2 bigkernel -> combine/accumulate -> dual warp -> dry/wet -> FFT-conv).
Extracted runtime tables to rt_mask_tables.{hpp,cpp}: IIR A1/B1,A2/B2,A3/B3
(leaky y=A*acc+B*x, B=1-A), warp 0x5406a8, per-band 0x540768, PRNG LUT 0x5408b0.
bigkernel 0x26b820 = vectorized exp2 (log2e/floor/mantissa tables). Fixed the
broken warp line in framed_model.cpp (compiles again).
2026-08-20 15:00:53 +03:00
Matiq fc48a9fee4 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.
2026-08-20 13:11:27 +03:00
Matiq 45dfe2b8c2 P4: full decomp FUN_18052e260 frame driver (twin side-chain per band, LUT+mask+FFT-conv run per drained frame); wire order documented 2026-08-20 09:28:12 +03:00
Matiq 88422034f5 P3.1: extract FFT code from rt snap (extract_fft.py); decode cplx_mul 0x8440 = in-place elementwise double mult, twiddle loader 0x39b00 stride copy, dispatcher 0x535a70->0x140a10/70->jumptable[0x1826159a0]=4; implement cplx_mul_scalar_inplace 2026-08-20 02:25:59 +03:00
Matiq 22e4599e0a P2: decode mask-accumulator combine kernels from raw bytes — combine3(0x8d60)=sub, acc_add(0x5a20)=dst+=src, acc_fma(0x3c40)=dst+=a·b; implement + levelpath_check ALL OK 2026-08-20 01:30:33 +03:00
Matiq d3db772121 P2.5: decode twin-mask factory (FUN_18056e3e0 = constant fill 2π/(count·SR)) + band LUT apply (FUN_180563a60: level->gain t^γ/power-law); implement in levelpath.cpp, levelpath_check ALL OK 2026-08-20 01:23:22 +03:00
Matiq a49e35dc25 P1.5: embed live level-tracker A[] + mask scalars into C++ (dsp/leveltrack_data.hpp); leveltrack_check sanity confirms SR=48000, A_ATTACK plateaus 0.692, attack/release=1.0 2026-08-20 01:12:12 +03:00
Matiq 0e90918226 P1.5 SOLVED: live ctx (0x2370040, +0x24==48000) + level-tracker A[] + mask scalars captured via realtime playback; method play.lua + rtctx_rt.py; prior 'unreachable' was offline-engine artifact 2026-08-20 00:44:58 +03:00
Matiq fe43509d50 NOTES_CAPTURE: P1.5 live level-tracker A[]/ctx confirmed unreachable (window ptr only in registry, no +0x24==40000 object); scalars static-derived from RPP; 2 missing consts 0x24c4348/44a4 2026-08-20 00:11:45 +03:00
Matiq 433a0026e6 P2: level-tracker UPDATE-loop located (inline bidirectional IIR in FUN_180529fe0), structural module leveltrack (iir_first_order/bidirectional/unrolled4); scalar==unrolled verified; remaining = live A[] coeffs 2026-08-19 23:53:01 +03:00
Matiq cff28a605c P1.4: full FUN_180529fe0 decomp confirms mask-canon (scale->IIR->blend->combine+weights->warp->dry/wet->FFT-conv); documented remaining live scalars for bit-exact 2026-08-19 23:34:02 +03:00
Matiq 42316efa71 P1.2: confirm f_52d990 memcpy via decomp (FUN_18052d990(lVar22, window+N/2, N/2)); infer N=4096 from freq-axis spacing + window sape; step-5 low-pass near-flat ramp 2026-08-19 23:20:38 +03:00
Matiq 241957bced P1.2: f_52d990 = memmove/memcpy thunk, NOT a multiply; corrected step-3/5 FIR window semantics (copy window tail + const fill); xmm9/xmm13 remain 2026-08-19 23:17:31 +03:00
Matiq fd9b1fd001 P1.1: embed runtime-captured DSP tables (WIN_WINDOW, FREQAXIS@48k, WA/WB/WC/WD), dsp_ctx registry mirror, tables_check ALL OK 2026-08-19 22:48:32 +03:00
Matiq f8b91e8015 P0.3-4: harness reads flat params (in/out/[conf]), byte-verified trim; verify_bit_exact.py uses SOURCE WAVE+RENDER_FILE from RPP, sample-report mono/stereo 2026-08-19 22:00:14 +03:00
Matiq 58164f2952 P0: fix build (levelpath in CMake, FLOOR_LIN, exact LUT curve formulas), robust RPP param decoder (607 rpp ok), preserve f_52b570/f529fe0 disasms 2026-08-19 21:54:26 +03:00
Matiq 55623b998f chore: add rt-capture artifacts (rtobj/rtsnap scripts, rwin_*.npy tables, dsp grep dumps, rpp param decoders) 2026-08-19 20:56:58 +03:00
Matiq 02dd6e8aa7 docs: exact structural LUT curve formulas (FUN_180563440 linear/power-law), consts from PE; roadmap Q1 static side closed 2026-08-19 20:45:45 +03:00
Matiq 34fc852b4f docs: two-point 180s capture confirms registry stability; twin per-note state = {A[3],B[3]} not 342-dbl; Step C closed 2026-08-19 20:27:12 +03:00
Matiq 9c1516171e docs: runtime capture settled — registry heartbeat decodes live 0x540658 window & freq-axis (internal SR=48000); vptr-scan route closed 2026-08-19 20:10:22 +03:00
Matiq abf09a26cc runtime capture: registry heartbeat decodes live DSP tables (WIN 0.540658, freq-axis@48k, per-bin weights), rtsnap_fast/findctx/rtchunk infra 2026-08-19 20:06:14 +03:00
Matiq 8fdb1dc082 docs: add NOTES_TWIN.md (twin resonator + caller + grid) to the repo 2026-08-19 17:41:09 +03:00
Matiq 28cd3b7c62 Q-dep rp + honest TRIMMED metric: mean=0.175 (was misleading 0.144 artifact)
- Exposed artifact: earlier fits measured tone_cmp on untracked-length output
  (nfr*HOP+N); framed_render.synthe trims to len(x). Honest scalar-rp=0.0169
  baseline is 0.280, not 0.160 as previously recorded.
- New model: rp(Q)=rp0*Q^drp, G/W/A/rp0/drp=0.9963/0.3335/0.9807/0.0275/0.2159.
  Trimmed errs: q0.1 0.000/0.001, q1 -0.256/-0.707, q10 +0.086/+0.001.
  q0.1+q10 perfect; bottleneck q1@2000 (structural warp mismatch).
2026-08-19 15:48:56 +03:00
Matiq a909aae7d3 res_power final: dual mean=0.160, envRmse q0.1@500=0.05dB; joint fit confirms LUT is fc-dependent (al_* incompatible) 2026-08-19 13:10:57 +03:00
Matiq 954220139e res_power dual-only: mean=0.080, envRmse 0.64→0.05 at q0.1@500; G/W/A/rp=1.0066/0.3261/1.0764/0.0169 2026-08-19 11:32:25 +03:00
Matiq 627e8373e6 res_power breakthrough: 500Hz residual solved (q0.1 err +0.00), decomp inventory, FUN_180563440 decoded 2026-08-19 09:56:19 +03:00
Matiq 1a57c48318 runtime capture pt2: vst3 loads AT ImageBase 0x180000000; 0x540658 = field [ctx+0x540658] not RVA; beacon->ctx script (racy) 2026-08-18 21:11:29 +03:00