From 80485186af29dab6f81592301c5ea8a948a25e5b Mon Sep 17 00:00:00 2001 From: Shawn Date: Sat, 13 Jun 2026 11:58:38 -0400 Subject: [PATCH] fix: activate preset on boot after restore_state() restore_state() loads the last state from disk but doesn't call activate() on the pipeline, so the NAM model was never loaded on boot and no audio passed through. Added select() call with the restored bank/program values so the pipeline loads the preset chain including the NAM model. --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 9c66bcf..a923aeb 100644 --- a/main.py +++ b/main.py @@ -192,6 +192,12 @@ class PedalApp: self.presets.select(0, 0) except Exception: logger.info("No presets exist yet — pedal ready for MIDI/footswitch input") + else: + # restore_state() loads from disk but doesn't activate the pipeline + # Need to call select() to trigger pipeline.load_preset() and load NAM + logger.info("State restored — activating preset '%s' (bank=%d, program=%d)", + restored.name, restored.bank, restored.program) + self.presets.select(restored.bank, restored.program) # ── 4. MIDI handler ────────────────────────────────── self.midi = MIDIHandler()