[PD-dev] Scheduling to activate control objects
IOhannes zmölnig
zmoelnig at iem.at
Tue Dec 22 16:19:34 CET 2009
PSPunch wrote:
> Hi,
>
>
> I am working on a control rate object which outputs a value, only when a
> variable local to each instance is modified by another thread.
>
> Having not known how to achieve this, the object works fine, but only
> with a [metro] connected to it, polling for a variable change on each bang.
>
> I've looked into [metro] and [netreceive] which also output values
> without an external factor (inlet wise), but I kind of got lost in the code.
>
>
> Is there a simple way of achieving such an effect (i.e. by registering a
> callback), or does this require a reasonable understanding of the time
> scheduling mechanism inside Pd?
>
have a look at the "clock" functionality.
a clock is basically a scheduled callback.
if you want it to happen repeatedly (like metro), you have to reschedule
the clock within the callback.
apart from that: why don't you just use [metro]? thus nobody has to
learn how to start/stop the polling and to set the polling interval;
instead they can just use an object which they already know (and if not
will find that they should already know :-))
fgmnasdr
IOhannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20091222/b79b36b4/attachment.pgp>
More information about the Pd-dev
mailing list