Hi,
what you want is a "t_clock". clock_new() takes a function pointer + void pointer. You can then schedule the function for execution with clock_delay().
For a simple example, check the source code for the delay object ("t_delay") in "x_time.c".
Christof
On 07.06.2021 01:21, Iain Duncan wrote:
Hi folks, I'm hoping someone can point me in the right direction here. I'm porting Scheme for Max to pure data and I'm stuck figuring out how to get delayed functions going. In Max, the SDK has a facility to make register a callback to executed at some point in the future, a few different ways. Is there a Pd equivalent, and if so, could anyone point me at resources or code for it? I basically just need to be able to have a callback fire off at the right time with one argument, which can be void pointer to the rest of the stuff i want to get.
thanks! iain
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev