Forum
    • Categories
    • Register
    • Login

    Effect stops working when UI closed

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 43 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MorsM
      Mors
      last edited by

      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);
          }
      });
      
      
      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @Mors
        last edited by

        @Mors Is the code in your interface script?

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        MorsM 1 Reply Last reply Reply Quote 0
        • MorsM
          Mors @David Healey
          last edited by

          @David-Healey It is, and i've also tried doing it in a separate Script Processor and still no good

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @Mors
            last edited by

            @Mors Check the Execution Modes and see if that helps

            https://docs.hise.audio/scripting/scripting-api/transporthandler/index.html

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            18

            Online

            2.2k

            Users

            13.5k

            Topics

            117.6k

            Posts