[PD-dev] $0 in messages, was: multiple $arg-expansion

Mathieu Bouchard matju at artengine.ca
Sat Jan 21 09:32:12 CET 2006


On Sun, 15 Jan 2006, Frank Barknecht wrote:

> It is consistent and the problem may lie elsewhere: messages are the
> only "objects", that do not have access to abstraction properties like
> abstraction arguments and $0. It is hard to give them access, because $x
> already is used for a different purpose in messages. One solution could
> be a "message object", that does both, something like a [makemessage]
> which could be a mix of [makefilename] on steroids and a standard
> [message( - and maybe could reintroduce Max's #x.

Note that there's another related notation already used in Pd. It's in
[expr] and goes like:

  $f1 means float in first inlet
  $v2 means signal in second inlet
  etc

and it could be reused, but then there are two things to take care of:

the type specifiers f,v, must be complemented by other specifiers
s=symbol, p=pointer, and some other letter to mean atom (but not
"anything" in the sense of general message).

there has to be a correspondence between the multi-inlet context of [expr]
and the single-inlet context of the messagebox.

Alternately, the latter issue could be skipped completely if $1 was
replaced not by $f1 or $s1, but by $a1[1] meaning first element of the
message in the first inlet. This notation is also consistent with [expr~].  
$a1[0] would access the selector. Here, "a" really stands for "anything"  
as it is normally in Pd (that is, except for the [bang}->[t a] bug)

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| 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