Solved NoteOn Callback Precedence?
-
If I understand correctly, when a note comes in, it activates both the UI-thread Note-On Callback, and the Real-Time Note-On Callback.
Question: Do both Callbacks get the same Message, or does it go first to the Real-Time Callback—and any changes there are reflected in the Messages received by the UI-thread Note-On Callback?
Thanks!
-
@clevername27 The ui thread is only triggered if the ui is open (if I remember correctly).
-
@d-healey How would the UI not be open?
-
@clevername27 When you load a plugin in a DAW it's common to set the parameters to where you want them and close the plugin UI.
-
@d-healey I never thought of that, lol.
-
@clevername27 any script with a non defer callback gets executed synchronously in the audio thread and the deferred callbacks will get a notification to run at the next timer interval which might happen within the next 30ms or never (if the timer isn‘t running because there is no UI open).
But it‘s guaranteed that a realtime script will always execute before a UI script.
-
@Christoph-Hart Thank you, both.
-