AW: [PD] loadbang for externals
Krzysztof Czaja
czaja at chopin.edu.pl
Sat Feb 23 17:38:08 CET 2002
hi Thomas,
it is generally better to get into the arrays when they are needed,
like in a <class>_dsp() method, not in a constructor. Usually you
would only store an array name in <class>_new().
There might be a case, when an array should be written to by an
external object right away after the patch is loaded. If so, there
are two ways: a) requiring of users to explicitly connect a [loadbang]
object to an external object, or b) calling clock_new(<init-routine>)
and clock_delay(<clock>, 0) in a <class>_new() routine, then
clock_free(<clock>) in a <class>_free().
And no -- objects and arrays are created in one pass, in the same order
they happen to have their defining lines in a .pd file. Those lines
(#X obj..., #X array...) are simply ``create this or that'' requests
to a current canvas object.
Krzysztof
Thomas Grill wrote:
...
> Is it the case that in PD all arrays are readily accessible at the creation
> of the other objects?
> I never problems with this, but i'd like to be sure that i wasn't just
> lucky....
>
> In Max/MSP i always have to use loadbang instead of the new routine when
> using a buffer~ (same as an array in pd) as an argument to an object. They
> seem to have no special treatment there and are created just in time with
> the other objects of a patcher.
More information about the Pd-list
mailing list