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?
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.
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: