Snapshot (VVVV) Module via Setpatch?

hello.

im playing with the idea to build a module that can store all setable values of all ioboxes and inlets of a patch in a preset, without having special “memory” modules attached. i think its possible with the new getpatch and setpatch modules but i think its not that easy, espacially saving the values to right place in the xml-file (changing ids etc). Do you think its possible to patch a convenient snapshot/restore module?
ideas how this should work/concept?

cheers ele

forgot to login.
by the way: is the setpatch xml input spreadable? this could be usefull when setting plenty of values to different io boxes/inlets…

alo ele.

actually i have such a module lying around here already. just needs some cleaning up.

setpatch is not spreadable but you can simply set several ioboxes by providing their xmlstrings in one large string. one after the other.

joreg is working on such thing… see also
this post

Because of the changing ID’s, I would suggest to only save values of IOBoxes that have a Desriptive Name. I order to load values from your preset, you first would have to get the current ID from the IOBoxes where the Descriptive Name is like the stored Descriptive Name.

Attached you find a XSLT Stylesheet, wich gets the ID, Descriptive Name, Datatype, InputPinName, Max-Value, Min-Value from every IOBox, that have a Descriptive Name out of the XML-Description of getPatch. If you store the resulting XML, reload it, get current ID’s and Create the corresponding Message for SetPatch, that should do the job.

Cheers
David

getIOBoxData.xslt (3.2 kB)

setpatch is not spreadable but you can simply set several ioboxes by
providing their xmlstrings in one large string. one after the other.

SetPatch supports Spreads. But it doesn’t really matter which way you take…

Thanks a lot for your help…

thanks to your xslt stylesheet im know able to get the right data, but how can i insert them to the correct place in the xml file of the targetpatch? i have to exchange the old values with the ones i got from that xslt transformation… hmm…
cool that such a module is allready in the making, i think anyone could need such a thing. you think you can post it allready in an unfinished state, just to learn from it @ joreg?

you can simply use setPatch. It does not set an ablsolute patch. it always merges the values to a patch. So If you are saving only IOBox values you could create a simple message like:

<PATCH>
<NODE id=“10”>
<PIN pinname=“Input String” values=“Slice1,Slice2,Slice3” />
</NODE>
</PATCH>

This would be the message for updating values of an IOBox (string).

Hope that helps