Hi, i was wondering if somebody have done any preset system for pd? are there any library or examples patches of this?
I would like to store all the values of my sliders and the recover them interpolating between them.
any hint would be appreciated
F.
there's a preset manager by the guy who runs the Pure Data forum, Maelstorm. pretty sure all of his objects are available at one place. here's another one from a different user on the Forum:
http://puredata.hurleur.com/sujet-6810-simple-preset-manager
On Sun, Sep 30, 2012 at 3:53 PM, flad chester flad.chester@gmail.comwrote:
Frank Barknecht's sssad is great: http://puredata.info/downloads/sssad
You can even differentiate between global & local preset, so that you could, for example, load a global preset that instructs subpatches to load particular presets.
You can search the list archives for Frank's responses to my questions about global vs local state saving.
JN
On Sep 30, 2012, at 4:19 PM, "Scott R. Looney" scottrlooney@gmail.com wrote:
this is where I got the idea for my preset system which although the same concept is a bit different. http://gregsurges.com/tag/pure-data/
On Sun, Sep 30, 2012 at 7:32 PM, Joe Newlin jtnewlin@gmail.com wrote:
From: pd-list-bounces@iem.at [mailto:pd-list-bounces@iem.at] On Behalf Of Jonathan Wilkes Sent: Sunday, September 30, 2012 8:46 PM To: flad chester; pd-list@iem.at Subject: Re: [PD] Preset system in pd?
Pd-l2ork now has [preset_hub]/[preset_node] for which I'm currently writing help files. But I don't think it lets you interpolate between values.
-Jonathan
To add to this, preset_node and hub are AFAIK the only preset system on pd that allow for use in conjunction with multiple instances of the same abstraction (e.g. you want to use two abstractions of same type and have presets in them that are controlled in the parent patch above them). For an example, see pd-l2ork K12 module (invoke pd-l2ork with -k12 flag). They also offer communication between nodes and hub allowing each of the nodes to send requests to the hub (e.g. any paired node can send a request to the hub to store and/or recall presets which can lead to some very cool possibilities). It is in many ways synonymous to pattrstorage in Max, so its contents are saved as part of the patch, rather than having to save them in a separate file. Finally, pairing nodes with a hub is simple and does not require any $0 workarounds. Simply have a [preset_hub foo], and as soon as you add [preset_node foo] it will automatically pair with the hub provided hub is positioned hierarchically higher than the node (e.g. in the same canvas or any of its parent canvases, it does not have to be before preset_node in the glist if it is located in the same canvas). Other features include, ability to compensate for infinite undo/redo (pd-l2ork) feature, cut/paste, to front/back (pd-l2ork feature), and other actions that tend to alter glist ordering. As a matter of fact, pd-l2ork always preserves glist structure wherever possible (including infinite undo/redo actions), and since preset_hub saves all presets as part of its creation arguments, undo/redo also recreate all saved presets. Preset_hub/node also support every data format except for pointers (for obvious reasons).
That said, Jonathan is right, the preset_hub and node do not interpolate, but with some [line] love, this can be easily added to the patch with arguably better granularity control.
Cheers!
due to the nature of my polysynth patch I can make [polysynth a] and [polysynth b] and have them both load a seperate preset. I haven't added specifying the preset filename to the creation or to the message structure yet but that is doable, you just have to hit the load preset button. currently things like tuning and lfo filenames are not saved with the preset because with pd vanilla i see no way to browse for a textfile in say lfo/pulsar/ to get pulsar1.txt and have the openpanel return that path it more than likeley will return /users/home/billy/dev/polysynth/lfo/pulsar/pulsar1.txt and if that value is saved then when Johnathon gets the preset Johnathon's synth doesn't load the pulsar1.txt
On Sun, Sep 30, 2012 at 9:42 PM, Ivica Ico Bukvic ico@vt.edu wrote:
Hi Ivica, I don't understand how [line] could fill in for interpolation between states.
On the other hand, I don't think you would actually need all the interpolation states that pattrstorage provides. If you just did linear interpolation by allowing to set the preset with a float (like 1.5) that is between two states, then the user could easily build all the interpolation schemes that pattrstorage's interp message provides simply by putting the necessary objects after [recall $1( . For example, if you want a quartic curve you'd just do [expr pow($f1-int($f1), 2)+int($f1)] and then feed that into preset_hub.
That of course wouldn't work for more complex stuff like cubic interpolation, but that is conspicuously absent in pattrstorage, too.
-Jonathan
is positioned hierarchically higher than the node (e.g. in the same canvas or any of its parent canvases, it does not have to be before preset_node in the glist if it is located in the same canvas). Other features include, ability to compensate for infinite undo/redo (pd-l2ork) feature, cut/paste, to front/back (pd-l2ork feature), and other actions that tend to alter glist ordering. As a matter of fact, pd-l2ork always preserves glist structure wherever possible (including infinite undo/redo actions), and since preset_hub saves all presets as part of its creation arguments, undo/redo also recreate all saved presets. Preset_hub/node also support every data format except for pointers (for obvious reasons).
I thought you wanted values to interpolate between the origin and destination (making a curve over time). Finding a value between is trickier and may require some kind of implementation that belongs to preset_hub. Of course, then the question is how do you weigh such interpolation (or what function do you use?) and the next thing you know preset_hub has become expr and line and tons of other things in one, making it huge, redundant, and unwieldy to maintain. In other words, where do you draw the line? Will the linear interpolation be enough?
From: Jonathan Wilkes [mailto:jancsika@yahoo.com] Sent: Sunday, September 30, 2012 11:43 PM To: Ivica Ico Bukvic; 'flad chester'; pd-list@iem.at Subject: Re: [PD] Preset system in pd?
Hi Ivica, I don't understand how [line] could fill in for interpolation between states.
On the other hand, I don't think you would actually need all the interpolation states that pattrstorage provides. If you just did linear interpolation by allowing to set the preset with a float (like 1.5) that is between two states, then the user could easily build all the interpolation schemes that pattrstorage's interp message provides simply by putting the necessary objects after [recall $1( . For example, if you want a quartic curve you'd just do [expr pow($f1-int($f1), 2)+int($f1)] and then feed that into preset_hub.
That of course wouldn't work for more complex stuff like cubic interpolation, but that is conspicuously absent in pattrstorage, too.
Le 01/10/2012 00:53, flad chester a écrit :
have a look at pbank. it's on, nusmuk/nusmuk-utils on svn, or in http://tot.sat.qc.ca/down/nslam/doc/DOC_HTML/_nSLAMv2Reference.html
cheers c