[PD] creation arg, distinction between 0 and no arg, WAS Re: Splitting Objects

Jonathan Wilkes jancsika at yahoo.com
Tue Sep 25 22:22:01 CEST 2012


If you use Pd-l2ork there is no need for dirty hacks.

Using...

[list append $@]

... you can get all the arguments to the abstraction.

Obviously once you have them you can check to see
whether the argument exists, and if it does not set a
default value.

If you use iemguts or my patch on the tracker that gives
you parent args all the way up to the toplevel you can
encapsulate the process of setting default arg values in
an abstraction.


-Jonathan


----- Original Message -----
> From: Cyrille Henry <ch at chnry.net>
> To: pd-list at iem.at
> Cc: 
> Sent: Tuesday, September 25, 2012 12:35 PM
> Subject: Re: [PD] creation arg, distinction between 0 and no arg, WAS Re:  Splitting Objects
> 
> 
> 
> Le 25/09/2012 17:07, Patrice Colet a écrit :
>>  Maybe dirty but skillful!
>> 
>>  Is it possible to have this included somewhere in pdx abs?
> i don't wish to include that in the externals i share on pd svn.
> anyway, my externals collection are not included in pdX.
> 
> so, fell free to do whatever you wish with this patch.
> 
> cheers
> c
> 
> 
>> 
>>>  De: "Cyrille Henry" <ch at chnry.net>
>> 
>>> 
>>>  hello,
>>> 
>>>  a dirty hack allow distinction between no argument and a 0 float arg.
>>>  see attachment.
>>>  cheers
>>>  c
>>> 
>>> 
>>>  Le 25/09/2012 15:45, Patrice Colet a écrit :
>>>> 
>>>>>  De: "Patrice Colet" <colet.patrice at free.fr>
>>>>>>  De: "Funs Seelen" <funsseelen at gmail.com>
>>>>> 
>>>>>>  Speaking about creation arguments: if none are given for
>>>>>>  abstractions
>>>>>>  the default value is always "0" (at least I never 
> figured out a
>>>>>>  way
>>>>>>  to
>>>>>>  give another default value *). For C-objects it is possible 
> to
>>>>>>  use
>>>>>>  any
>>>>>>  float value as default.
>>>>> 
>>>>> 
>>>>>  [loadbang]
>>>>>  |
>>>>>  [$1]
>>>>>  |
>>>>>  [sel 0]
>>>>>  |
>>>>>  [my default value(
>>>>> 
>>>> 
>>>>  indeed it doesn't seem possible to set a default value and keep 
> 0
>>>>  as another value
>>>> 
>>>>  _______________________________________________
>>>>  Pd-list at iem.at mailing list
>>>>  UNSUBSCRIBE and account-management ->
>>>>  http://lists.puredata.info/listinfo/pd-list
>>>> 
>>> 
>>>  _______________________________________________
>>>  Pd-list at iem.at mailing list
>>>  UNSUBSCRIBE and account-management ->
>>>  http://lists.puredata.info/listinfo/pd-list
>>> 
>> 
>>  _______________________________________________
>>  Pd-list at iem.at mailing list
>>  UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>> 
> 
> _______________________________________________
> 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