[PD] dealing with arguments and inlets

Hans-Christoph Steiner hans at eds.org
Tue Jan 31 01:03:09 CET 2006


I have written some classes for handling arguments when writing classes 
in Pd.  They are [float_argument], [symbol_argument], and 
[any_argument].  Currently, I am thinking in general,  inlets should be 
matched to arguments and vice versa, so these objects all have a 
"convenience" right inlet, to attach the [inlet] to so that the data 
all comes from the [*_argument] object.

To use them, you add the argument you want it to handle like this:

[float_argument $1]

If you want a default value for when none is specified, you would do it 
like this:

[float_argument $2 234]
[symbol_argument $3 default]
[any_argument $9 asdf]
[any_argument $5 444]

My goal is to make these a standard way of handling arguments when 
writing classes in Pd.  What do y'all think?

Also, I am trying to think of a library name in which these would 
belong.  foundation? support?  core?  patching? language?

.hc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: any_argument-help.pd
Type: application/octet-stream
Size: 1070 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060130/6c00bcec/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: any_argument.pd
Type: application/octet-stream
Size: 718 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060130/6c00bcec/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: float_argument.pd
Type: application/octet-stream
Size: 649 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060130/6c00bcec/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symbol_argument.pd
Type: application/octet-stream
Size: 435 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060130/6c00bcec/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-symbol_argument.pd
Type: application/octet-stream
Size: 262 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060130/6c00bcec/attachment-0004.obj>
-------------- next part --------------


________________________________________________________________________ 
____

"If nature has made any one thing less susceptible than all others of  
exclusive property, it is the action of the thinking power called an  
idea, which an individual may exclusively possess as long as he keeps  
it to himself; but the moment it is divulged, it forces itself into the  
possession of everyone, and the receiver cannot dispossess himself of  
it."
                                                        - Thomas  
Jefferson


More information about the Pd-list mailing list