[PD] Finding "$0" and dealing with it in messages

Mathieu Bouchard matju at artengine.ca
Fri Dec 4 21:43:41 CET 2009


On Thu, 3 Dec 2009, Jonathan Wilkes wrote:

> Where does the conversion from, say, "list 12" to "float 12" happen in 
> pd?  Is it left to each object to convert one-element lists to a 
> symbol/float/pointer?

pd_defaultlist looks at the content of the list. if the size is 0 and 
there is a nondefault bangmethod, it is called. if the size is 1 and there 
is a matching floatmethod, symbolmethod or pointermethod, it is called. 
otherwise, it will be auto-unpacked and distributed to inlets, unless the 
object is a «nonpatchable» (that is, it's a DS).

> [list 12(
> |
> [$0 1 2 3 4(
>
> [list(
> |
> [$0 one two three(

The message class defines a method 'list', and because of that, a 'list' 
selector would naturally stay 'list'.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801


More information about the Pd-list mailing list