Add audio test tab with test generator, test fader and output mutes

- switch the DSP's test generator (pink/white noise, sine 20 Hz-20 kHz, command 0x39)
- entering lowers all outputs to -50 dB before the generator starts; one test fader
  raises them together; mute buttons for every output
- presets cannot be stored, recalled, imported or exported while the test runs
- leaving switches the generator off first, then restores every output gain
- a DSP found playing a test signal on connect goes straight into the audio test;
  saved gains survive an app restart (config.json)
- simulator and memory-image support for the test signal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-01 21:33:01 +01:00
1 parent 61400df667
commit 66f988cf08
12 files changed
+280 -12

No files matched your search

+3 -1
View File
@@ -54,9 +54,11 @@ class SimDSP:
if cmd == P.CMD_METER:
t = time.monotonic()
levels = [0.0] * 12
noise = self.state.get("test", {}).get("source", 0) # test generator instead of the analog inputs
for i in range(m.n_in):
ch = self.state["inputs"][i]
lv = 0.0 if ch["mute"] else 0.25 * (1 + math.sin(t * (1.3 + i))) * 10 ** (P.gain_to_db(ch["gain"]) / 20)
src = 0.7 + 0.05 * math.sin(t * 40 + i) if noise else 0.25 * (1 + math.sin(t * (1.3 + i)))
lv = 0.0 if ch["mute"] else src * 10 ** (P.gain_to_db(ch["gain"]) / 20)
levels[m.meter_index("in", i)] = lv
flags = 0
for o in range(m.n_out):