[PD] saving state of a patch

Enrique Erne enrique at netpd.org
Mon Jul 21 19:17:24 CEST 2008


Atte André Jensen wrote:
> At the end of the day, what would be the best bet, state, pool, memento 
> or pdmtl?
> 
> I should note that what I'm trying to do is work out some abstractions 
> for live electronica, and now I need a way to save piece1.pd and 
> another_piece.pd which contains one or more instances of one or more of 
> my abstractions, complete with gui settings and all. If I could just 
> press "save all this, so everything I loaded in this patch is exactly 
> the same when I open it again" I'd be sooo happy :-)
> 

sssad, bag of tricks and netpd are worth mentioning here too.

i only know little about bag of tricks but its state saving approach is 
based on a message box per gop that allows you to save the state of the 
abstractions with your patch.

you should have a look at netpd level 3 (in netpd/tutorials), where all 
parameters can be saved and loaded in a preset file. basically something 
like that:

[symbol savename(
  |
  |               [symbol loadname(
  |                |
[netpd-x mypatchname]

on top of that i wrote a little abstraction (pad) that handles these 
save-load-names for you and allows inter-patch-communication, so 
"save-all" does work.

[pad mypatchname]
  |             \
[netpd-x mypatchname]

in a 2 approach there is one additional preset-manager (P-Admin) that 
talks to all (pads) and collects data and writes it to a single file. 
(instead of 1 preset per patch). the format here (unlike netpd native 
.pst format) is
patchname parametername and-whatever-number-list-or-array-you-have-here

but once you are here you think about more...
- howto morph between presets
- howto reuse some data from abstractions (effects, envelopes, seqs) in 
other instances (osc?!)
- howto load presets without clicks (i.e. load data into a table or 
dynamically create effects)

as i said, i think it's worth looking at the 3 approaches sssad, bot, 
netpd too

hope that helps or inspires.

eni








More information about the Pd-list mailing list