[PD] dealing with arguments and inlets

Thomas Grill gr at grrrr.org
Sun Feb 5 23:47:12 CET 2006


Hi all,
although i haven't really followed the thread in detail, i'd like to 
throw in that there's an external called [absattr] in the grill part of 
the PD cvs which implements attributes for abstractions. It's another 
spin-off from vibrez development and i think it's quite useful.
There is an example included.

best greetings,
Thomas

Am 04.02.2006 um 21:51 schrieb Mathieu Bouchard:

> 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
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>
>





More information about the Pd-list mailing list