Add phase view, channel overlays and PEQ/GEQ master bypass

- EQ curve computed as complex response: PEQ biquads (now incl. all-pass),
  crossover filters from Butterworth/Bessel/Linkwitz-Riley prototypes
- Mag/Phase switch; phase wraps at +-180 degrees like the original software
- overlay any other channel of the device in the curve (e.g. sub/top crossover)
- EQ Bypass (0x3C) for all PEQ bands, GEQ Bypass (0x49) for the inputs,
  read from the bit masks at the end of the memory image; preset import aware

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-01 21:47:15 +01:00
1 parent 66f988cf08
commit ae9a20fdf8
9 files changed
+215 -50

No files matched your search

+4 -3
View File
@@ -58,7 +58,7 @@ def _common(s: dict, c: dict) -> dict:
"hp": _filter(s.get("hp"), c["hp"]), "lp": _filter(s.get("lp"), c["lp"]),
"gain": _int(s.get("gain"), 0, 400, c["gain"]), "polarity": bool(s.get("polarity", c["polarity"])),
"delay": _int(s.get("delay"), 0, 65280, c["delay"]), "link": _int(s.get("link"), 0, 0xFFFF, c["link"]),
"mute": bool(s.get("mute", c["mute"]))}
"mute": bool(s.get("mute", c["mute"])), "peq_bypass": bool(s.get("peq_bypass", c.get("peq_bypass", False)))}
def clean_state(model: P.Model, src: dict, base: dict) -> dict:
@@ -70,6 +70,7 @@ def clean_state(model: P.Model, src: dict, base: dict) -> dict:
s = ins[i] if i < len(ins) and isinstance(ins[i], dict) else {}
geq = s.get("geq") if isinstance(s.get("geq"), list) else []
c.update(_common(s, c), peq=_peq(s.get("peq"), c["peq"]), gate=_group(s.get("gate"), c["gate"], _GATE),
geq_bypass=bool(s.get("geq_bypass", c.get("geq_bypass", False))),
geq=[_int(geq[b], 0, 240, v) if b < len(geq) else v for b, v in enumerate(c["geq"])])
for i, c in enumerate(st["outputs"]):
s = outs[i] if i < len(outs) and isinstance(outs[i], dict) else {}
@@ -131,9 +132,9 @@ def import_commands(model: P.Model, st: dict, current: dict) -> list[tuple[int,
cmds.append((P.CMD_LINK, bytes([model.channel(kind, i)]) + (1 << i).to_bytes(2, "little")))
for kind, key in kinds:
for i, ch in enumerate(st[key]):
params = ["name", "gain", "polarity", "delay", "hp", "lp"] + [f"peq.{b}" for b in range(len(ch["peq"]))]
params = ["name", "gain", "polarity", "delay", "hp", "lp", "peq_bypass"] + [f"peq.{b}" for b in range(len(ch["peq"]))]
if kind == "in":
params += [f"geq.{b}" for b in range(len(ch["geq"]))] + ["gate"]
params += [f"geq.{b}" for b in range(len(ch["geq"]))] + ["gate", "geq_bypass"]
else:
params += ["comp", "limit", "matrix"] + [f"mix.{k}" for k in range(len(ch["mix"]))]
for p in params + ["mute"]: