Storing and reloading "states" of Max/MSP objects (e.g. value of a number box)
Is there a way to store the ... let's call it "internal state" of Max/MSP objects (e.g. value of a number box, information which inlet of s switch-object is open, etc.) when a patcher is closed. The only solution I can figure out, is to store these "internal state" informations in a coll-object, before the patcher is closed and then, when the patcher is opened the next time, read them form this coll-object and initiate the objects of the patcher with these informations when the patcher.
Maybe, however, there is a better (more simple) solution.
Thanks!
sowatt
I think you want a [preset] object, maybe with a [loadmess 1] to initialise it.
yes, with pattrstorage. I attached a very simple pattr system, which works for me.
I think the [preset] object is exactly what you want. you could [loadmess 1] it to load preset 1, and also have it write to/read from a file.
Thanks, bernd! Kind of that was, what I was looking for
Thanks, team dandot! To my shame I couldn't figure out, in a quick way, how the preset object works. I'll come back to that in due time. At the moment, pattrstorage is sufficient for me.
sowatt
btw:
@bernd: How can I create such a text representation, as you have attached to your post?
you mean to post a patch to this forum? use the "copy compressed" command in the edit menu, then paste into your post
Yes! Thanks!
One more question has emerged:
Is is possible to influence the order in which paremeters are recalled by a 'preset'-object ?
(Note: I know it's possible with 'pattrstorage')
Short answer: yes.
Longer answer: yes, check [preset]'s Help File, tab "include".
Even longer answer: yes, but once you'll see the interpolation features of [pattrstorage], you won't use [preset] anymore.
You can also check out Patcher Snapshots:
https://docs.cycling74.com/max7/vignettes/snapshots
-Ben