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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user