HISE Logo Forum
    • Categories
    • Register
    • Login

    turn all effect moduls of and keep the effect states

    Scheduled Pinned Locked Moved Scripting
    5 Posts 3 Posters 191 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.
    • T
      treynterrio
      last edited by

      Hi there, I have a button in my FX Plugin that I use to turn off all the effect modules I use. How can I make sure that the effects that were on before I turned them off turn on again and that the effects that were off stay off? Can anyone help me?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @treynterrio
        last edited by

        @treynterrio When you click your button you need to loop over all your effects and store their current state in an array. Then when the button is pressed again you can restore the state using the values in the array.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        T 1 Reply Last reply Reply Quote 1
        • T
          treynterrio @d.healey
          last edited by

          @d-healey do you've an example? or a starting point

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @treynterrio
            last edited by

            @treynterrio I don't think I have an example ready to go, but I'll give you some pointers.

            Create an array in on init, const effectBypassState = [];

            In your button callback run a loop over your effects and populate the array.

            for (x in myEffects) // Put the actual name of your array of effect references here
            {
                effectBypassState.push(x.isBypassed());
            }
            

            At this point you have stored the bypass state of the effects.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            M 1 Reply Last reply Reply Quote 1
            • M
              meto396 @d.healey
              last edited by

              @d-healey I've been watching the post for a few days, did you manage to do it? I don't quite understand how to do it

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

              28

              Online

              1.7k

              Users

              11.8k

              Topics

              102.8k

              Posts