HISE Logo Forum
    • Categories
    • Register
    • Login

    Can you control module presets with buttons?

    Scheduled Pinned Locked Moved General Questions
    13 Posts 5 Posters 724 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.
    • E
      Eskano @Lindon
      last edited by

      @Lindon Thanks a lot for that. Really helpful script!

      1 Reply Last reply Reply Quote 0
      • SteveRiggsS
        SteveRiggs @Lindon
        last edited by

        @Lindon Awesome mate! I've been trying to do this for a while. You hit the nail on the head there. Thanks man!

        I'm experimenting now... I want to try and find a way to make a combo box drop-down menu that will do the same thing. So we could have separate drop downs to change the reverb or delay presets and not have to change the main preset. I'll have a play now and share the code if I manage to work it out!!

        Any advice to make the task a bit quicker though would be mega appreciated. This is my first time back in HISE properly coding since December so I'm a little rusty

        www.anarchyaudioworx.com

        www.facebook.com/groups/audioworx/

        1 Reply Last reply Reply Quote 0
        • ustkU
          ustk
          last edited by

          There's a function (if I'm not mistaken) that is intended for that purpose. You directly save and restore a module's state. I've never tried it though...
          https://docs.hise.audio/working-with-hise/menu-reference/edit/index.html#create-base64-encoded-state

          Can't help pressing F5 in the forum...

          SteveRiggsS 1 Reply Last reply Reply Quote 1
          • SteveRiggsS
            SteveRiggs @ustk
            last edited by

            @ustk That could be pretty useful. I'll have a play around with it. Cheers mate.

            www.anarchyaudioworx.com

            www.facebook.com/groups/audioworx/

            ustkU 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @SteveRiggs
              last edited by

              @SteveRiggs Just tested and it works nicely. Although I can a benefit only for "behind the scene" modules. If the module is controlled by UI, there no need for this function as you have to restore the controls anyway as @Lindon did above, and so is the module consequently.

              Can't help pressing F5 in the forum...

              SteveRiggsS 1 Reply Last reply Reply Quote 0
              • SteveRiggsS
                SteveRiggs @ustk
                last edited by

                @ustk Awesome. I'm still trying to work out how it would be done using a combo box with a list of presets inside instead of buttons 🤔

                www.anarchyaudioworx.com

                www.facebook.com/groups/audioworx/

                ustkU 1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @SteveRiggs
                  last edited by

                  @SteveRiggs I haven't had a look to it but my guess is (if you have multiple values to recall):

                  • Store the values in a 2D array
                  • Recall them with the ComboBox index and a for loop

                  Can't help pressing F5 in the forum...

                  SteveRiggsS 1 Reply Last reply Reply Quote 1
                  • SteveRiggsS
                    SteveRiggs @ustk
                    last edited by

                    @ustk Thanks man! I had a feeling it would be an array of some sort. I'll try and work out how to set up a 2D array and a loop :)

                    www.anarchyaudioworx.com

                    www.facebook.com/groups/audioworx/

                    ustkU 1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @SteveRiggs
                      last edited by

                      @SteveRiggs A quick tip:
                      You don't necessarily need a for loop, in fact it depends on your structure...

                      array = [[val1, val2, val3],
                               [val1, val2, val3],
                               [val1, val2, val3]];
                      

                      then read it like this in the comboBox CB:

                      module.setAttribute(attribute, array[value - 1][0]);
                      module.setAttribute(attribute, array[value - 1][1]);
                      module.setAttribute(attribute, array[value - ][2]);
                      

                      Can't help pressing F5 in the forum...

                      SteveRiggsS 1 Reply Last reply Reply Quote 2
                      • SteveRiggsS
                        SteveRiggs @ustk
                        last edited by

                        @ustk Ahhh! It's starting to make sense now. Thanks mate. I'll try a few things and see how it goes :) Much appreciated!

                        www.anarchyaudioworx.com

                        www.facebook.com/groups/audioworx/

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

                        26

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.7k

                        Posts