[PD] PD OOP?
Mathieu Bouchard
matju at artengine.ca
Tue Dec 14 21:08:14 CET 2010
On Mon, 13 Dec 2010, Jonathan Wilkes wrote:
> Jmax Phoenix does this. If I recall correctly it breaks the nested list
> feature in Gridflow.
Well, it's a bit more complicated. Back then, GridFlow's nested lists were
written using braces {}, but they weren't GridFlow's nested lists, they
were supported directly by jMax. I had to add the parentheses hack to
GridFlow so that I could port it to Pd.
the (pitch * 2) feature of jMax does it with variables only (such as [v])
(or constant-declarations, a jMax-only feature) and I think that this is
at creation time only, but I don't recall using it, anyway.
for some reason that I don't remember, the * that is supposed to be a
multiplication only within parentheses, was also considered a
multiplication sign outside of parentheses, where it was considered to be
a syntax error instead of a symbol. This is why I decided to ditch jMax
completely and go for Pd as much as possible. (But ditching jMax was going
to happen not long after that anyway, as IRCAM cancelled the project,
deleted the mailing-list archives, etc.)
> But considering your [osc~ (pitch * 2)] example-- what would happen if
> you change the value of pitch? The value of the [osc~] object's
> argument is assigned to be the initial frequency only when the object is
> created, so it doesn't seem like it would have an effect unless you
> recreate the object.
It's not currently possible to know how to update it dynamically : the
creation arguments are only passed to creators (constructors), not
assigned in any explicit way to inlets or inlet/message combinations. The
first argument is not even consistently assigned to the second inlet.
As an example, if I implemented such a feature in GridFlow,
[# + (pitch * 2)]
Pd would read it as :
$1 = +
$2 = (pitch
$3 = *
$4 = 2)
GridFlow would reparse it as :
$1 = +
$2 = (pitch * 2)
But at that point, something is lacking, to say that the second argument
is assigned to the second inlet, and that the first argument corresponds
to a method named "op" instead.
_______________________________________________________________________
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
More information about the Pd-list
mailing list