Custom User Preset Browser

  • Hi everybody,

    once in a while there is the request for more customization of the inbuilt preset browser. While I am open to add a few more options, it quickly crosses a line where it tries to become a swiss army knife and bloats the functionality.

    So I went ahead and created another option of handling user presets, which is far more lightweight and customisable: You can get a list of all existing user presets with the new scripting call Engine.getUserPresetList(). This returns an array of all available user presets as relative path (without the file extension). This can be used for any kind of displaying (although the most recommended way would be to throw them at a viewport list).

    Then you can use the new scripting function Engine.loadUserPreset() which takes one of the strings from the array and loads the user preset.

    Feel free to check out the example project I've uploaded to the tutorial repository:

    It contains one knob and a few presets that just move the knob. Then you have a Viewport which shows the preset names and if you click on it, the preset is loaded and the knob moves to the respective position.

    Whenever you just need to select a few prebuilt factory presets, this approach might be more practical as you can customise the appearance / logic of the preset system better.

  • @christoph-hart
    It`s really a good new...

  • This looks very useful Christoph. Presumably we can use the save preset function with this too.

  • Thank you so much, it is so useful...

  • Hello !
    "Interface:! onControl could not be parsed!" when loading backup.xml in 1.5.0

    so: no interface, no OnInit infos. OnControl empty.

    can't test...

  • @staiff You need to build the latest version of HISE from source to use this new feature

  • @d-healey Hello David.

    this is not aversion problem, because tested in 1.50 and latest (1.5.1 downloaded today).
    but i fixed it by copying the Interface.js (from scripts/...processor/Preset) and paste it in the OnInit.

    So: not Fan today.

    As Christoph wrote = must be customized. But at this time i prefer the "classsic" presetmanager by external .js

    I think mixing the 2 presets systems together could do a interesting thing ... will test it.

  • better fixed it !!!!
    you're right David.

    1 - open the example project (load project) before all and after that( because of no preset) : load backup xml.
    2 - of course doing it with the latest/newest version of hise.

    3 (most important) - Listen and read David Healey posts/threads ... the most important thing!:D

  • @d-healey and @Christoph-Hart are kings!

  • Is there a way to retrieve the full name of the loaded preset including the category and bank? Or is there a way to get the index of the currently loaded preset to be used with the getUserPresetList array?

Log in to reply