Effect stops working when UI closed
-
Hey! I have an effect built in scriptfx that i'm using the below code to essentially trigger the effect on and off depending on your DAW's playback state.
This works perfectly fine inside HISE and when the plugin UI is open in your DAW, but the moment you close the plugins UI in your daw, it ceases to work.
What am I missing?
Cheers!
const var HardcodedMasterFX1 = Synth.getEffect("HardcodedMasterFX1"); const var handler = Engine.createTransportHandler(); handler.setOnTransportChange(false, function(playing) { if (playing) { // DAW is playing HardcodedMasterFX1.setAttribute(HardcodedMasterFX1.gate, 1); HardcodedMasterFX1.setAttribute(HardcodedMasterFX1.switchy, 1); } else { // DAW stopped HardcodedMasterFX1.setAttribute(HardcodedMasterFX1.gate, 0); HardcodedMasterFX1.setAttribute(HardcodedMasterFX1.switchy, 0); } }); -
@Mors Is the code in your interface script?
-
@David-Healey It is, and i've also tried doing it in a separate Script Processor and still no good
-
@Mors Check the Execution Modes and see if that helps
https://docs.hise.audio/scripting/scripting-api/transporthandler/index.html