From 10d8c1cf5a72ba51a6651e85ae9296516de23547 Mon Sep 17 00:00:00 2001 From: Matiq Date: Tue, 25 Aug 2026 08:42:00 +0300 Subject: [PATCH] =?UTF-8?q?24cc:=20exact=20coef-gen=20formula=20pinned=20?= =?UTF-8?q?=E2=80=94=20exp=5Farg=3D|c|*g/n=20with=20n=3D2049=20([state+8]?= =?UTF-8?q?=20live-verified=20all=20three=20states);=20saturating=20form;?= =?UTF-8?q?=20default=20down-coefs=200.003-0.19=20(gentle,=20cascade-only?= =?UTF-8?q?=20effect)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handoff/BLOCKMAP_529fe0.md | 14 ++++++++++++ scripts/probe_states.py | 45 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 scripts/probe_states.py diff --git a/handoff/BLOCKMAP_529fe0.md b/handoff/BLOCKMAP_529fe0.md index 18697c7..24f3997 100644 --- a/handoff/BLOCKMAP_529fe0.md +++ b/handoff/BLOCKMAP_529fe0.md @@ -381,3 +381,17 @@ out *= 0.5 → store[2j+1] заполняются сеттерами. Осталось: снять их live-значения для наших конфигов (расширить scalar-dump на [ctx+0x180]-объект) и найти потребителя таблицы (интерполятор dB→out) в аудио-тракте. + +## ДОПОЛНЕНИЕ 24cc: точная формула коэф. 533340 (дизасм+live) +[state+8] = n = 2049 (∀ трёх состояний; live probe_states.py). +``` +fc_norm = (X/(sr·0.5))·n ; X=xmm2 (C_hz=1000 или tau — уточнить) +g(i) = min(fc_norm/i, (fc_norm/i)^p) ; p=[ctx+0x54087c]=1 @defaults +c = 1/(1 + g/mult) ; mult=360 (стадия-3) +arg = |c| · g / n ← НАСЫЩАЮЩАЯ форма (пол g→mult/n) +up[i] = exp(arg · (−2π)) ; down[i]=1−up[i] +``` +При дефолтах down ∈ [0.003..0.19] — очень мягкие сглаживатели; эффект +только каскадом в полной цепочке шагов 9–19. +Осталось уточнить: роль xmm13 (множитель перед c), знак/конст экспоненты, +соответствие X=C_hz-vs-tau. diff --git a/scripts/probe_states.py b/scripts/probe_states.py new file mode 100644 index 0000000..0ef95de --- /dev/null +++ b/scripts/probe_states.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +"""probe_states.py — read IIR state headers ([base+8]) for the three +FUN_180533340-generated states during render.""" +import struct, subprocess, sys, time +import glob, os + +def find_host(): + for p in glob.glob('/proc/[0-9]*'): + pid=int(os.path.basename(p)) + try: + cmd=open(f'/proc/{pid}/cmdline','rb').read().replace(b'\0',b' ').decode('utf8','replace') + maps=open(f'/proc/{pid}/maps').read() + except Exception: continue + if 'soothe2' in maps and 'reaper' not in cmd: return pid + return None + +subprocess.run("pkill -9 -x reaper; pkill -9 -f '[y]abridge'; " + "rm -rf /run/user/1000/yabridge-soothe2_x64-*; sleep 1", shell=True) +rpp=sys.argv[1] if len(sys.argv)>1 else '/home/m/soothe-bt/dual_b1q_0.5.rpp' +proc=subprocess.Popen(['/usr/bin/reaper','-nosplash','-ignoreerrors','-renderproject',rpp], + stdout=open('/dev/null','w'),stderr=subprocess.STDOUT) +t0=time.time(); host=None +while time.time()-t0<30 and not host: + host=find_host(); time.sleep(0.002) +print('host',host,flush=True) +fd=os.open(f'/proc/{host}/mem',os.O_RDONLY) +def rd(a,n): + try: return os.pread(fd,n,a) + except OSError: return None +ctx=0x2370040 +STATES=[('st1',0x2404e8),('st2',0x340500),('st3',0x440518)] +seen=set() +while time.time()-t0<10: + vals=[] + for nm,base in STATES: + b=rd(ctx+base+8,4) + f=struct.unpack('