HISE Logo Forum
    • Categories
    • Register
    • Login

    Testing loadUserPreset and saveUserPreset

    Scheduled Pinned Locked Moved Feature Requests
    3 Posts 2 Posters 916 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.
    • jadgJ
      jadg
      last edited by jadg

      Testing Engine.LoadUserPreset(), Engine.saveUserPreset() and Engine.getUserPresetList() I found this:

      When you are running the compiled standalone app, Engine.getUserPresetList() read only from /AppData/Roaming/..../User Presets folder

      LoadUserPreset() read from this folder too...

      but saveUserPreset() write PRESET FILE at the root of the drive where the executable is running from...

      So , when you try to save a user preset, getUserPresetList can´t read the new user preset because is not in ./AppData/Roaming/..../User Presets folder..., and of course loadUserPreset() can't load it, or the changes of an old user preset file, because still reading the old one file ....

      If you manually copy the new ( or the changed ) user preset file to ./AppData/Roaming/..../User Presets folder, this methods works and getUserPresetList() can return the correct list,...and loadUserPreset() can load correctly the new (or the changed) user preset....

      I think this considerations can be useful to find a solution for the User Preset System....,
      I hope
      Thanks for all....

      jadgJ 1 Reply Last reply Reply Quote 0
      • jadgJ
        jadg @jadg
        last edited by

        @jadg said in Testing loadUserPreset and saveUserPreset:

        Testing Engine.LoadUserPreset(), Engine.saveUserPreset() and Engine.getUserPresetList() I found this:

        When you are running the compiled standalone app, Engine.getUserPresetList() read only from /AppData/Roaming/..../User Presets folder

        LoadUserPreset() read from this folder too...

        but saveUserPreset() write PRESET FILE at the root of the drive where the executable is running from...

        So , when you try to save a user preset, getUserPresetList can´t read the new user preset because is not in ./AppData/Roaming/..../User Presets folder..., and of course loadUserPreset() can't load it, or the changes of an old user preset file, because still reading the old one file ....

        If you manually copy the new ( or the changed ) user preset file to ./AppData/Roaming/..../User Presets folder, this methods works and getUserPresetList() can return the correct list,...and loadUserPreset() can load correctly the new (or the changed) user preset....

        I think this considerations can be useful to find a solution for the User Preset System....,
        I hope
        Thanks for all....

        1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart
          last edited by

          but saveUserPreset() write PRESET FILE at the root of the drive where the executable is running from...

          This is of course complete bullshit and shouldn't happen. How the method works is that it creates a sibling file to the currently loaded user preset, but if nothing is loaded, then it does weird things like you described.

          A temporary workaround until I find the time to fix this correctly is to make sure that a user preset is loaded before you call Engine.saveUserPreset()...

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

          46

          Online

          1.7k

          Users

          11.7k

          Topics

          101.9k

          Posts