24cc: exact coef-gen formula pinned — exp_arg=|c|*g/n with n=2049 ([state+8] live-verified all three states); saturating form; default down-coefs 0.003-0.19 (gentle, cascade-only effect)
This commit is contained in:
@@ -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('<f',b)[0] if b else float('nan')
|
||||
n=struct.unpack('<i',rd(ctx+base,4) or b'\xff\xff\xff\xff')[0]
|
||||
vals.append((nm,n,f))
|
||||
key=tuple(round(v[2],4) for v in vals)
|
||||
if key not in seen:
|
||||
seen.add(key)
|
||||
print(' '.join('%s:n=%d val=%.6g'%v for v in vals), flush=True)
|
||||
time.sleep(0.05)
|
||||
os.close(fd)
|
||||
Reference in New Issue
Block a user