[PD] u_loader and global preset manager in RJDJ lib
fbar at footils.org
Mon Jun 6 15:06:52 CEST 2011
On Sun, Jun 05, 2011 at 04:53:22PM +0200, manecante wrote:
> i am trying out the rjdj lib and i am not sure to understand correctly
> how should the SSSAD abstraction u_loader be used.
Easy: Just add one with [u_loader <name_of_abstraction>-$1 $0] to each of your
abstractions and then use [u_dispatch <param> $0] to handle your parameters
inside the abstraction. It's used like that all over the library. See below
for a detailed explanation. If you then use the abstraction, give each instance
an unique first argument (the SOMETAG).
Optionally connect the u_loader's inlet/outlet to the abstraction's control
inlet/oulet (the rightmost ones), like e.g. in [s_fm4].
> I used SSSAD before and built a global preset manager with a coll to
> get an index for each preset.
> Now when i open the u_loader help file i can see that the "SOMETAG"
> argument could represent the index that would permit me to retrieve
> each preset but, in this example, it is not designed in a way that you
> can dynamically change it.
The "SOMETAG" identifier that is used as a placeholder in many help files is
used to make different instances of an abstraction unique in the view of the
saving system. It is not meant to be overridable, and actually I don't see why
you would need to change it dynamically.
The rj library makes extensive use of "local" sssad objects that have a second
argument, usually the parent's $0. This is to avoid nameclashes. These
local sssad objects don't send anything to the usual global receivers SSSAD and
SSSAD_ADMIN, instead they send to $2-SSSAD rsp. $2-SSSAD_ADMIN where $2 usually
is parent-$0: It is taken from the second arg in [sssad myparameter $0].
So far this is not specific to rj or [u_loader], it's just a feature of [sssad]
that I'd guess you probably haven't used much. But because the main receivers
now are some local $2-SSSAD, there has to be another bridge between the sssad
objects in abstractions and your global coll or textfile or whatever you want
to save to.
[u_loader] is that bridge: By convention it is called with the abstraction's
name and $1 as argument - this $1 is replaced for example with the "SOMETAG"
from above. Instead of [sssad] (rsp. [u_sssad]) usually [u_dispatch] is used in
the rj abstractions as a wrapper around [sssad] - it is designed to work nicely
with [u_dispatch] if used like explained above.
Now you can save everything into a textfile/messagebox or probably a coll as
shown in the [u_loader] help file: Send "save" to [s RJ_SCENE_SAVE] and collect
your settings through [r RJ_SCENE]. Reload or remote-control settings via [s
> So each time you save a preset it will save
> the values with this prefix, and i don't understand how this way you
> can differentiate each preset then..
Did you make sure your "SOMETAG" is replaced with something unique (per
All the best,
Frank Barknecht Do You RjDj.me? _ ______footils.org__
More information about the Pd-list