[PD] difference send and using msg with ";"

Frank Barknecht fbar at footils.org
Fri Aug 17 18:06:35 CEST 2007


Hallo,
Patrice Colet hat gesagt: // Patrice Colet wrote:

>  You know what, all along the hundreds of lines I've been reading in 
> the list about $0, I don't get a single consistent reason why it hasn't 
> the same behavior in object and message boxes.

Don't know if it's a good reason, but: In a message box, dollar
variables get replaced by looking at (the elements of) incoming
messages. In object boxes, dollars are substituted by looking at the
context of the patch's canvas: If the patch was called as an
abstraction, its arguments replace the dollars, otherwise default
zeros are inserted. A canvas has an additional property in the
unique identifier $0. However messages reaching a message box do not
carry such an unique identifier, as $0 is a property of the canvas,
not a property of the incoming message: There is no $0 in messages,
there's only a $0 in a canvas. An effect of this is, that there's no
$0 in message boxes, but there's a $0 in object boxes. So to get $0
into a message, you first have to collect it from the canvas by using
some kind of object box (float $0, symbol $0-x,...) then make a
message out of it ("1002" or "symbol 1002-x") and then send that
message to the message box.

I guess, the reason, why in Pd $0 and the conversion from canvas
properties to a message are not directly included in a message box, is
just that it would obscure the difference between canvas and message
properties, that's in effect now, so it's more or less an aesthetic
reason. But as Marius' and others' suggestion of changing $ in
messages to # shows, that also has its problems: Should the difference
be made clearer by using different variable identifiers? Or should
users be expected to be insightful enough after a while to understand
the difference without having to type different variable-characters
for messages and objects as in Max? (Personally I prefer that both
messages and object boxes use a dollarsign for simplicity, but I also
know from teaching workshops, that many "newbies" get confused by
this. But then, they also confuse the difference between subpatches
and abstractions ... it goes away with time.)

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-list mailing list