[PD] dealing with arguments and inlets

Mathieu Bouchard matju at artengine.ca
Sat Feb 4 21:51:34 CET 2006


On Sat, 4 Feb 2006, Hans-Christoph Steiner wrote:

> I don't entirely get how it works, looking at the help patch.  What are the
> "attributes"?

Attributes are specific to Flext/Pyext, although GridFlow has a variant on
this concept. It's not used in Pd. It's like what's called Keyword
Arguments in several languages like Python and CommonLisp, and it's like
the dash options in Tcl (though in Tcl it's not a language feature, just a
convention).

>  Is [patcherargs 10 20] like this: [float $1]  [float $2]?

I guess so, except that $1 defaults to 10, instead of defaulting to 0, or
worse, instead that whenever $1 is 0, it gets replaced by 10...

[patcherargs] seems to allow any number of arguments in the parent patch 
and so can be used to support varargs abstractions, something that plain 
Pd can't because you can't even know how many args you really have.

Plus, [patcherargs] gives it as a list, which is then easy to process 
using [list] (and that's something that Frank will love).

> It seems to be a black box, which I am not a fan of.  I think we can do
> it cleaner and do it mostly in Pd.

I'm trying to say that Pd is broken and that [patcherargs] is cleaner...

It wouldn't need to have the "attributes" part available, so you could
drop the second outlet and then it would be a very small and simple
external whose code fits on a page. Of course I think it should be
internal.

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