Hallo, Christopher Charles hat gesagt: // Christopher Charles wrote:
for example: in my patch i have a drum machine abstraction, on it's right, there is a subpatch(e.g. [pd s]) crossconnected, containing an inlet, outlet, a message and a loadbang. everytime the patch is loaded, the loadbang kicks the message into the drum machine, everytime sliders in the drum machine are changed, a newly created status message is sent to the message box in the subpatch via a "set" message. this way, the patch itself becomes the savefile.
Yes, this is a different approach than mine. It is more "traditional" in that a state is saved inside the/a patch using a message and loadbangs. The beauty of it of course is that it is simple and just works. Actually it's the way I also use for "one-off" or "throwaway" patches. And it also is the way used in Pd, when you are using data structures as the "score".
However for example I have one patch which I use when doing "party sets" (see http://footils.org/cms/show/36) where the music is dancy house music. The patch there is always running and contains various instruments like a drum part, a "soul diva sample" part, a "phat bassline" part etc. and sequencers controlling all that. Then I load a big preset for lots of songs into the Memento pool and play along with these for as long as the audience lets me.
With that it is much more useful not to have the sequences stored inside the patch, as the patch will stay the same all the time, but the sequences, the *songs* will change. OTOH I don't want to change the songs when I'm doing changes to the patch. So having both the presets and the instrument as different thing is crucial to me. (Like having a piano on one side and different score sheets on the other in traditional music.)
it's a bit of a hassle to adapt all the abstractions to this behaviour (especially when the abstractions have loads of sliders...) but it works to save all the needed info in the parent patch, and what's best, no additional dependencies (such as pool) are needed (well, i often used [iem_prepend set] in my abstractions, but those could all be substituted with [set $1 $2 $3...etc( messages).
... or now use [list prepend] with pd-0.39.
BTW: To save a bit of patching work, I'm currently experimenting with dynamically generated state saving elements for Memento. For those interested, I attached the current state of affairs with this. The "dynamic-commun" part of this will later go into [originator] itself.
Then instead of creating a lot of [commun] objects by hand, this work can be replaced by sending special messages to [originator] itself as illustrated in dynamic-commun-help.pd
The attached files require a working installation of Memento. Then just drop the three new patches into your Memento directory and open dynamic-commun-help.pd
Frank Barknecht _ ______footils.org_ __goto10.org__