From c6860902459a57acee7a84c14f6e468692f0c6a2 Mon Sep 17 00:00:00 2001 From: Cam Gorrie Date: Mon, 29 Dec 2025 02:54:35 -0500 Subject: [PATCH 1/3] Send pedal_snapshot WebSocket message when saving new snapshot When a user saves a new snapshot via /snapshot/saveas, MOD-UI now sends a pedal_snapshot WebSocket message to notify connected clients (like pistomp) of the snapshot change. This ensures pistomp's display immediately updates to show the new snapshot name without requiring the user to manually switch snapshots first. Fixes issue where new snapshots weren't syncing to pistomp until the user switched back to Default and then to the new snapshot. --- mod/webserver.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/webserver.py b/mod/webserver.py index c6ca96b2..67e90785 100644 --- a/mod/webserver.py +++ b/mod/webserver.py @@ -1740,6 +1740,9 @@ def get(self): yield gen.Task(SESSION.host.hmi_report_ss_name_if_current, idx) + # Send WebSocket message to notify clients (e.g., pistomp) of the new snapshot + SESSION.host.msg_callback("pedal_snapshot %d %s" % (idx, title)) + self.write({ 'ok': idx is not None, 'id': idx, From 135afb510888a60e0b1f8aac26a2f13055f07aa3 Mon Sep 17 00:00:00 2001 From: Cam Gorrie Date: Thu, 8 Jan 2026 22:10:12 -0500 Subject: [PATCH 2/3] Write snapshots to disk immediately --- mod/host.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mod/host.py b/mod/host.py index 1b67a49e..073be16d 100644 --- a/mod/host.py +++ b/mod/host.py @@ -3054,6 +3054,12 @@ def snapshot_save(self): name = self.pedalboard_snapshots[idx]['name'] snapshot = self.snapshot_make(name) self.pedalboard_snapshots[idx] = snapshot + + # Write snapshots to disk immediately so external tools (like piStomp blend mode) + # can detect the change and update their state + if self.pedalboard_path: + self.save_state_snapshots(self.pedalboard_path) + return True def snapshot_saveas(self, name): From d297720e3f0587e5e83f7e310e2d004e38f014e2 Mon Sep 17 00:00:00 2001 From: Cam Gorrie Date: Sat, 10 Jan 2026 10:56:25 -0500 Subject: [PATCH 3/3] Better comment --- mod/host.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/host.py b/mod/host.py index 073be16d..46a8fd51 100644 --- a/mod/host.py +++ b/mod/host.py @@ -3055,8 +3055,7 @@ def snapshot_save(self): snapshot = self.snapshot_make(name) self.pedalboard_snapshots[idx] = snapshot - # Write snapshots to disk immediately so external tools (like piStomp blend mode) - # can detect the change and update their state + # Write snapshots to disk immediately so external tools can detect the change if self.pedalboard_path: self.save_state_snapshots(self.pedalboard_path)