Best Place For Real-Time Functions?
-
I'm getting acquainted with the fast and slow thread workflow. From my understanding, On Init callbacks are always slow thread, and On Note callbacks are fast thread unless the callback is deferred.
If I want to define a function somewhere that will be called in a fast-thread On Note callback, what is the recommended location for that function? In a new script processor's On Init callback? I would think that puts the mentioned function in the slow thread though...
-
All functions are defined in
on init
. Your main interface script should almost always be deferred. So the answer is to put it in another script (midi processor) that isn't deferred.If the function is called from
on init
then it will be in the slow thread, if it's called fromon note on
(for example) then it will be on the fast thread. -
@d-healey Ohhh okay, that clears up a lot of confusion. Thanks!