< Back to IRCAM Forum

Snapshot modification by messages

Hi T.,
I’m working on a Spat system that allows me to manage, create and edit snapshots without opening the snapshot window.
I’ve seen that to create a snapshot one has to send the message [/snapshot/add] or [/snapshot/add name].
But there is also another message [/snapshot/n/store] to “store” the snapshot. Apparently, this message works only for existing snapshots, since if the user uses it to store a new snapshot the system gives the following error message:
error occurred when processing “/snapshot/1/store”. Reason: invalid snapshot index “1” ?
So, the “store” message is thaught to modify an existing snapshot?
Thank you

Hello Lorenzo,

Your understanding is correct.
The “/snapshot/add” message is equivalent to clicking the “create & store” button at the top-left of the snapshot window.

The “/snapshot/[index]/store” message is equivalent to clicking the “store” button on a given snapshot.
So, only applicable to an existing snapshot.
By the way, there is also an alias message “/snapshot/[index]/save”, which is equivalent to “/snapshot/[index]/store”.

The supported OSC messages are documented in “spat5.snapshot.management.maxpat”.
Let me know if things are unclear / deserve further explanation.

I’m also happy to add other messages/functionalities if that can help you.

Hope this helps,

Hello Thibault,
Thank you! Yes, I was looking at the spat5.snapshot.management.maxpat. So the “/snapshot/[index]/save” is exactly the same as “/snapshot/[index]/store”, any difference?
I let you know if there is something I need to be added.
I’m implementing a system managing all the parameters of my spatialization system (including those of motion algorithms) with a pattrstorage. The parameters of the spat.oper are stored into snapshots that are created, recalled and modified inside pattrstorage slots (this way I don’t have to manage pattrstorage presets and snapshots separately).

What would be useful for me is to have the possibility to memorize a snapshot by a message specifying the number of the snapshot.
From what I see, so far one can only “add” a snapshot and the system will add the first free number.

“/snapshot/[index]/save” is exactly the same as “/snapshot/[index]/store”, any difference?

No difference. They are just aliases.

What would be useful for me is to have the possibility to memorize a snapshot by a message specifying the number of the snapshot.

Can you be more specific ?

Looking at the attached screenshot, at the moment you can store a snapshot based on its OSC address (second column). It would be relatively easy to also control them via their “index” (first column) or their name (3rd column).
(There’s already a few functionalities available “by title”, BTW)

What would be convenient for you ?

Hi T.,
Thank you! I’ve done everything with a mix of messages (add, name, delete, renumber) and all works fine so far.

Hi T.,
am I wrong or there is no message to insert a snapshot among the others?
Something like: /snapshot/[index]/insert. The message should make room and store the new snapshot in the specified position and renumber the rest of the snapshots accordingly

Good idea ! This is ready for the next release.

1 Like

Great, thank you! In my system, I can create and store snapshots by name (hence, I could ignore their number), but if I want to modify one, I have to point to its exact number.
Let me know when you will implement this function, thank you!

While we’re at it, perhaps it would be useful to have in the snapshot window two buttons of “sort” and “renumber”, there’s some room for them…

Please find a preview build (for macOS) here :

It contains some of the new features we discussed earlier.


1 Like

I will go and check, thank you Thibaut

Hi Thibaut,
which is the message to insert a snapshot? Cannot find in the doc or in the message to send to spat5.oper

Have a look at spat5.snapshot.management.maxpat

ahhh, thank you, I didn’t find it!

Hi Thibaut,
I checked and… if you have, let’s say, 9 snapshots and you insert a new snapshot in position 8, the last snapshot is erased, i.e. the total number of snapshots remains 9… so, it seems that the system doesn’t take into account that there is a new snapshot to add … or I am wrong?

Hum… that is not what I observed.
Check that attached patcher : isn’t it doing what it’s supposed to do ? (inserting the new snapshot in 8-th position)


NB: however, I noticed a tiny bug in the build I sent you earlier: the newly inserted snapshot is actually empty (i.e. not “stored”). This will be fixed in forthcoming builds.
Nevertheless, the “insertion” itself seems to work ok, as far as I can tell.

Hi Thibaut,
Sorry for the many different messages:
My problem was that I did not store the snapshot after inserting it. And… yes, when one inserts a snapshot, it should be stored (this causes also some problems in memorization because the user must also renumber all the snapshots).
However, at some point your patch crashes…
Crash-log.rtf (125.8 KB)