I see that JS Tasks can be scheduled in millisecond delays, but can they be scheduled to fire when the transport reaches an absolute time in ticks?
Flipping through the SDK, I figure I can probably mash up the
simplejs examples to do something like what I’d like—although I’m not completely certain how to call a JS callback from C.
This is for a Max For Live project. If there’s any other way to have a JS callback fire when the Live transport reaches a specific time, that would work, too.
Quick follow-up question: If there’s a way to schedule events to fire at an absolute tick value in Java with [mxj], that would also be of interest to me.
Thanks, Nick. I’m actually getting really good results from [js] right now—turnaround times in microseconds. Will persist and post here if I see any major performance problems.
FWIW, I also tried making a system to schedule arbitrary messages at specific times in the future with patcher scripting, by creating instances of a patcher that used [timepoint] and [pv], then removed itself with [thispatcher]. This system is way too slow for my purposes, though—several milliseconds in either [js] or [mxj jruby], mainly caused by presence of [thispatcher]. I’ll revert to my original system, which involves a single event loop feeding upcoming events through a single [timepoint] + [pv] combo.
C74 RSS Feed | © Copyright Cycling '74