Script only works when interface is open
-
When used as a VSTi the keyswitching part of my woodwind library only works if the interface is open. If I close the interface and try to KS it doesn't work properly. Any ideas what could cause this? I've tried removing all related code that affects the GUI but this didn't make a difference.
-
Turns out I'm an idiot. I had HISE open in the background while testing the plugin in my DAW :p
-
@d-healey it happens now and then for me too :)
-
Seems I'm not a complete fool.
My on note callback is only triggering when the interface is open - I test this by dumping a json file in the callback.
@Christoph-Hart Any idea what could cause this?
-
Synth.deferCallbacks()?
-
@Christoph-Hart That'll do it! I've been going crazy. Thanks!
-
Calling
Synth.deferCallbacks(true)
will move the execution into the message queue, however if there is no interface open, it won't get called. The reason behind this is to free up resources. We had complaints from HEXERACT users about a year ago that reported a UI freeze when they load more than 20 instances, and this was the fix for the problem.But if you're relying on the message thread to do more than just UI stuff, your application design is flawed anyway :)
-
But if you're relying on the message thread to do more than just UI stuff, your application design is flawed anyway :)
Yup. I've moved my other non-ui stuff into a separate script now and all is working well :)