HISE Logo Forum
    • Categories
    • Register
    • Login

    Making a button that selects a specific preset

    Scheduled Pinned Locked Moved General Questions
    4 Posts 2 Posters 324 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.
    • SteveRiggsS
      SteveRiggs
      last edited by SteveRiggs

      Hi again all,

      I'm trying to make a button that selects a specific preset in the preset browser.

      Here's what I thought might work as the code but it's not working. It compiles ok but when the button is pushed, the preset doesn't change.

      Any idea where I've gone wrong?

      (My button is called Preset1Button and the preset is just called Preset1)

      Engine.getUserPresetList();
      
      Content.getComponent("Preset1Button").setControlCallback(onPreset1ButtonControl);
      
      inline function onPreset1Button(component, value)
      {
           if(value == 1)
      
           Engine.loadUserPreset("Preset1")(false);
      };
      

      www.anarchyaudioworx.com

      www.facebook.com/groups/audioworx/

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

        @SteveRiggs said in Making a button that selects a specific preset:

        Engine.loadUserPreset("Preset1")(false);

        I'm pretty sure this function has been broken for ages. - https://forum.hise.audio/topic/1142/engine-loaduserpreset

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

        SteveRiggsS 1 Reply Last reply Reply Quote 1
        • SteveRiggsS
          SteveRiggs @d.healey
          last edited by

          @d-healey Ah, no way. I wondered what was going on. Would that code be correct if it wasn't broken? Or is there another way I wonder...

          www.anarchyaudioworx.com

          www.facebook.com/groups/audioworx/

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

            @Christoph-Hart Sorry to bug mate, is it possible to fix the Engine.loadUserPreset function at all? I've got a great idea but can do it without this function.

            www.anarchyaudioworx.com

            www.facebook.com/groups/audioworx/

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

            53

            Online

            1.7k

            Users

            11.7k

            Topics

            101.8k

            Posts