[PD-dev] loadbang order

Mathieu Bouchard matju at artengine.ca
Thu Aug 11 00:41:21 CEST 2005


On Wed, 10 Aug 2005, Tim Blechmann wrote:

> > I am a believer in simplicity. So if it really is important that X
> > is done before Y, then set it up with a t b b going to the appropriate
> > places.
> well, this works for monolithic systems ... using one loadbang for the
> whole patch ... but working on reusable abstractions, you will sooner or
> later have a problem :-/

That was my justification for introducing the comma operator in 
objectboxes in GridFlow, which handles loadbangs like this:

[loadbang]
 |
[a b c, 42 3.14}
 |
[sickle 74]

(where [} is a msgbox) may be reexpressed as the following:

[sickle 74, a b c, 42 3.14]

with the distinction that in the latter case the messages get sent 
_before_ any wires are plugged, while in the former the messages get sent 
_after_.

This solves 90% (maybe) of the loadbang-ordering problems, but I don't 
have any magical solution for the remaining cases.



I think one important rule (to avoid problems) would be:

Never ever use [s] from a [loadbang] where the intended [r] is within an 
object that might be still unfinished constructing. e.g. If you have [blah 
john] and that blah is an abstraction which has a [r $1-doe], then don't 
even try using [s john-doe] from a [loadbang] in the parent of [blah john] 
!!!

Else pretty much everything can be solved with one kick-ass [t b b b b b b
b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b] with wires
all over the place, but since that's a bit clumsy, I introduced the
objectbox-commas, which introduce their own problem as well, due to the
very fact that those messages get sent before the wires are created!

Argh... which one came first, the omelette or the KFC ?

____________________________________________________________________
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
Freelance Digital Arts Engineer, Montréal QC Canada




More information about the Pd-dev mailing list