Hallo, Phil Stone hat gesagt: // Phil Stone wrote: > I am beginning to see that it might not be a good idea to expose all > those receives, even if the likelihood of name-collision is small. If > all patches were designed this way, there would be a great many possible > collisions, so the likelihood would increase, even with careful naming.
Exactly. I wrote about this issue a bit in my old RRADical paper in section "Communication": http://footils.org/cms/show/1#communication Generally I think, abstraction developers should keep the number of global receivers to an absolute minimum and avoid them wherever possible. As you are using [sssad] there already is one global receiver builtin, that you can use to address all [sssad] enabled objects. You do this in a similar way to saving and restoring all settings: Instead of restoring all, you just restore only one setting. Another good approach to keep the number of global s/r minimal is to use [route] and [list prepend]: [r GLOBAL] | [list trim] | [route one two three] | | | | | ... | ... [s $0-one] By this you have three targets available using only one receiver. With [list prepend] it's easy to make "settable sends" like this: [three( "data" | [two( | |/ [list prepend one] | [s GLOBAL] or directly: [one 1 uno eins( | [two 2 duo zwei( |/ [s GLOBAL] Now replace "GLOBAL" with inlets/outlets and you have reduced the number of global receivers to zero! This is the approach developed and used in RRADical: The rightmost inlet/outlet serves as single border crossing to the internals of a RRADical abstraction, internally then OSCroute is used to multiplex the data sent to such an "OSC-inlet". In [sssad] this is less formalized, but it's the same idea. netpd also uses something like this so I guess it is a kind of design pattern. ;) Ciao -- Frank Barknecht _ ______footils.org_ __goto10.org__ _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list