Pd messages resulting from 'Save' and 'Save New'?

The Organelle Storage menu has a couple options - Save and Save New. I’m wondering if these commands result in any Pd messages being sent to the current patch?

As someone working on my own custom patches, I’m wondering if my patch could receive such a message and use the opportunity to write the current parameters of the patch to a file?

I haven’t found any documentation describing how these functions work. I suppose I could dig around i the firmware, but I thought I would ask here first. I noticed there is a quitting message that sounds like it would allow a patch to save its current state just before it’s shut down.

I found it - the patch receives a saveState message when either of those commands are selected. The patch has a brief window of time to save its settings.

1 Like

An important subtlety - any settings files that are saved should be written to /tmp/state.
This is to prevent the settings in the current patch from being overwritten after a ‘Save New’ command.
The system will copy files from /tmp/state to the new patch at the end of the operation.

(See /home/music/scripts/save-patch.sh and /home/music/scripts/save-new-patch.sh for details.)