scope for scope

pix at test.at pix at test.at
Thu Mar 23 02:24:57 CET 2000


is there any scope for scoped identifiers in pd?

because all identifiers are (or seem to be?) global, using sends, receives,
arrays and delays in abstractions is problematic. if you make an abstraction
that uses a delay line, and then you want to use two of them in a patch, you
get behaviour other than what you expected because both abstraction are using
the same delayline, rather than a copy.

i know you can get around this (a little) by handing in a parameter to the abstraction
and using that as the name of the delay buffer, but if you want more than one
delay, it starts getting ugly.

[this is where it starts getting a little less articulate...]

it would be nice if the names of delays and send/recieve busses could be contructed
using strings which contained parameters, say "send $1_blah" and "receive $1_blah"..
this doesn't seem to work tho. if it did, there could be a magic parameter ($0?)
which contained some unique identifier for the current instantiation of an abstraction,
and handing in the parameter would be unnecessary - as any identifier containing
$0 would be guaranteed to be local to the current instantiation..

alternatively, this is already possible, and i'm about to find out how in a
gazillion flaming emails.. which is not so bad either :)

pix.



More information about the Pd-list mailing list