[PD] [PD-announce] patch dans patch
Mathieu Bouchard
matju at artengine.ca
Sun Feb 13 16:39:46 CET 2011
On Sun, 13 Feb 2011, Pedro Lopes wrote:
> Love the syntax of [#downscale_by 3 smoothly]You are almost talking to pd (natural lang)
> :D
I'm using the old syntax, which said that $2 can be either 'smoothly', or
omitted. This is after parens-parsing, thus in :
[#downscale_by (3 4) smoothly]
$1 = 3 4, for anamorphic downscaling,
$2 = smoothly
The new syntax is very similar, actually, but I always forget to use it :
[#downscale_by 3, smoothly]
The difference is that in this case, it counts as there is nothing after
$1, and that "smoothly" is taken to be like a loadbanged messagebox, thus,
"smoothly" is also a selector, and a message without argument.
In turn, this corresponds to a first-inlet method named "smoothly", that
does take one argument, but it's optional, AND its default value is 1, not
0. (in GF, all on/off attributes have their variable default to off, but
their method default to on).
Finally, sending a "get" message to nearly any GF object will output its
attributes out of the rightmost outlet, thus in the case of
[#downscale_by], it will output either "smoothly 0" (not smooth) or
"smoothly 1" (smooth).
In some ways, giving a method to each attribute is like verbing a noun, as
a method is a kind of verb, and an attribute is a kind of noun, but what's
special with [#downscale_by] is that I've nouned an adjective ! (and it's
now a verb too, of course).
There's room for more of this kind of wordplay.
_______________________________________________________________________
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
More information about the Pd-list
mailing list