HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset Next/Previous Buttons - How to navigate different categories?

    Scheduled Pinned Locked Moved Solved Scripting
    8 Posts 3 Posters 36 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.
    • HISEnbergH
      HISEnberg
      last edited by

      The current method is fine for navigating within the current folder:

      	// Control Callbacks
      	inline function onbtn_PresetNextControl(component, value)
      	{
      	    if (value) 
      			Engine.loadNextUserPreset(true);
      	}
      
      	inline function onbtn_PresetPrevControl(component, value)
      	{
      	    if (value) 
      			Engine.loadPreviousUserPreset(true);
      	}
      
      	btn_PresetNext.setControlCallback(onbtn_PresetNextControl);
      	btn_PresetPrev.setControlCallback(onbtn_PresetPrevControl);
      

      However, does anyone know of a method of cycling through the different folders/banks? So say I reach the end of the presets in this specific folder, then hit next, the first preset in the second folder will load? I can't find anything in the Engine API/File API (other than maybe getting the List with Engine.getUserPresetList and manipulating that somehow). Just wondering if there isn't an easy solution here that someone has discovered.

      HISEnbergH Oli UllmannO 2 Replies Last reply Reply Quote 0
      • HISEnbergH
        HISEnberg @HISEnberg
        last edited by

        @HISEnberg Actually I just tried this and it works but it is kind of buggy! Sometimes I need to click the button twice and sometimes it still cycles through the same folder, other times it will actually change the folder 😮

            inline function onbtn_PresetNextControl(component, value)
            {
                Engine.loadNextUserPreset(value);
            }
        
            inline function onbtn_PresetPrevControl(component, value)
            {
                Engine.loadPreviousUserPreset(value);
            }
        
        1 Reply Last reply Reply Quote 0
        • Oli UllmannO
          Oli Ullmann @HISEnberg
          last edited by

          @HISEnberg
          Just do this:

          Engine.loadNextUserPreset(false);
          
          Engine.loadPreviousUserPreset(false);
          

          If you set it to false it should switch to the next folder.

          HISEnbergH 1 Reply Last reply Reply Quote 1
          • HISEnbergH
            HISEnberg @Oli Ullmann
            last edited by HISEnberg

            @Oli-Ullmann

            Ahh true it's right there in the docs!

            Link Preview Image
            HISE | Scripting | Engine

            An API class for accessing global properties.

            favicon

            (docs.hise.dev)

            HISEnbergH 1 Reply Last reply Reply Quote 1
            • HISEnbergH HISEnberg has marked this topic as solved
            • HISEnbergH
              HISEnberg @HISEnberg
              last edited by

              @HISEnberg Lol I think this is one of my dumbest posts to date 😆

              d.healeyD Oli UllmannO 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @HISEnberg
                last edited by

                @HISEnberg I also made a video for this

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

                HISEnbergH 1 Reply Last reply Reply Quote 1
                • Oli UllmannO
                  Oli Ullmann @HISEnberg
                  last edited by

                  @HISEnberg
                  ha ha 😀
                  That's what the forum is for! :-) And if anyone else has this question, they can now find the answer here. ;-)

                  1 Reply Last reply Reply Quote 1
                  • HISEnbergH
                    HISEnberg @d.healey
                    last edited by

                    @d-healey @Oli-Ullmann haha yes that's why I will leave it up. I think I learned about this before (watching David's video) and just sort of forgot about what the boolean was for. 😆

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

                    17

                    Online

                    2.0k

                    Users

                    12.6k

                    Topics

                    109.4k

                    Posts