[PD] constants (was: Re: specifying time)

Jonathan Wilkes jancsika at yahoo.com
Wed Feb 15 22:11:04 CET 2012

----- Original Message -----
> From: IOhannes m zmoelnig <zmoelnig at iem.at>
> To: Jonathan Wilkes <jancsika at yahoo.com>
> Cc: "pd-list at iem.at" <pd-list at iem.at>
> Sent: Wednesday, February 15, 2012 2:54 PM
> Subject: Re: [PD] specifying time
> Hash: SHA1
> On 2012-02-15 20:50, Jonathan Wilkes wrote:
>>>  3 minutes.
> darn, given that i wanted some distance, should i use the speed of
> light, of sound or my car to multiply with the time?

Let's go back:

Instead of time units, let's take the incoming single-selector "pi" and replace it with 
the float value of pi for any object that doesn't have a "pi" method or an 
"anything" method (but does have a float method).  Furthermore, if a class defines a 
float argument but the argument provided isn't a float, then check first if what it received 
was A_SYMBOL 'pi' and if so replace with the float value of pi.

Is what I wrote above possible to do without causing huge problems to performance or 
creating ambiguities?  Is it something people would look at as a feature, or a nuisance that 
makes it harder to learn Pd?  If the answer is that something like this constant expansion 
is a bad idea then there's no point discussing macro expansion for time units.


> fgmar
> IOhannes
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> iEYEARECAAYFAk88DWYACgkQkX2Xpv6ydvRc5ACgtv6fVjriSSqnpodaIDImSM48
> =ATle

More information about the Pd-list mailing list