mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-06 12:54:29 +01:00
After 0.9.14's fx_rest, on cpu4's certificates (room_used, dly_used, cho_zeros). fx_buses: the gate shut (what the buses give is exactly 0 until something is sent), nothing sent, the delay's level under the floor and its loop under 100 %, no rate change, the reverb's model settled, CLOUD not frozen: the buses are not run. Their lines and states are silenced over the first six blocks (the reverb's states, the delay's line a quarter at a time, the models' lines) and the certificates hold from there, so the next send starts from silence as a never-excited bus does. The clocks that move whatever the sound (the chorus's LFO and glides, the delay's WOW) keep moving. What the gate hid (a residue under -55 dB: the feedback's limit cycle, the delay's flicker that reopened the gate, the reverb's WIDE side which the gate never covered) is silence now. While awake and bit for bit the same: the reverb certificate, ROOM only until now, covers SPRING, SHIMMER, RESO and CLOUD with each model's block clock advanced exactly (SIZE's glide, the LFO phases, RESO's chord glide, CLOUD's grain scheduler with its random numbers and the grains' ages); the delay's covers WIDE, PING-PONG, a read point's crossfade and the half / quarter-rate line (not the GRAIN read, which draws the shared random numbers: run as before). The DJ FILTER with nothing in, zero states and settled coefficients is not run. tests: empty_fx_test now hashes every model's grain and feedback state (12000 blocks, 11496 skipped, identical); fx_rest_test against a build with FX_REST_OFF: the same output until the gate shuts, exact zeros through the rest, the rest the block after, the wake at level; cpu_vg gains mix/idle (power-on, 2 s) and mix/idle.tail (after a wet chord's tail). 157 golden renders unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
22 lines
1.2 KiB
Python
22 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
# (cpu5) tests/fx_rest_test.c both ways: BIN_REST (fx.c as built) against BIN_REF (built with -DFX_REST_OFF): the same
|
|
# output until the gate shut (the hash), exact zeros through the rest both ways (the C checks), the rest engaged.
|
|
# python3 tests/fx_rest_test.py BIN_REST BIN_REF
|
|
import re, subprocess, sys
|
|
out = {}
|
|
for mode, b in (("rest", sys.argv[1]), ("reference", sys.argv[2])):
|
|
r = subprocess.run([b, mode], capture_output=True, text=True)
|
|
print(r.stdout.strip())
|
|
if r.returncode:
|
|
raise SystemExit(f"fx-rest: {mode} failed ({r.returncode})")
|
|
out[mode] = dict(re.findall(r"(\w+)=(\w+)", r.stdout))
|
|
if out["rest"]["gate_shut_at"] != out["reference"]["gate_shut_at"]:
|
|
raise SystemExit("fx-rest: the gate shut at different blocks")
|
|
if out["rest"]["pre_hash"] != out["reference"]["pre_hash"]:
|
|
raise SystemExit("fx-rest: the output differed before the rest")
|
|
r, f = int(out["rest"]["wake_peak"]), int(out["reference"]["wake_peak"])
|
|
if abs(r - f) > 512:
|
|
raise SystemExit(f"fx-rest: the wake's level differs ({r} vs {f})")
|
|
print("fx-rest: the same until the gate shuts, exact zeros through the rest both ways, the rest engaged, the wake at level PASS")
|