Preset Next/Previous Buttons - How to navigate different categories?
-
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.
-
@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); }
-
@HISEnberg
Just do this:Engine.loadNextUserPreset(false); Engine.loadPreviousUserPreset(false);
If you set it to
false
it should switch to the next folder. -
Ahh true it's right there in the docs!
-
H HISEnberg has marked this topic as solved
-
@HISEnberg Lol I think this is one of my dumbest posts to date
-
@HISEnberg I also made a video for this
-
@HISEnberg
ha ha
That's what the forum is for! :-) And if anyone else has this question, they can now find the answer here. ;-) -
@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.