defining Preset Save/Load directory



  • Did a search and couldn't find this being covered.

    I have a FloatingTile set to PresetBrowser, all works fine - except I'd like to define where the presets are saved/loaded. So when my user installs the product I can keep the presets next to the samples...

    At the moment the preset browser seems to be pointing at AppData/Roaming..etc..



  • Currently the path is hardcoded to use a sensitive location that is accessible for non-admin users / sandblocked hosts and every other nagging OS feature that I have learned the hard way. Is there a reason beside cosmetics for this request?



  • Yes, I want to ship a set of presets with my vst, and have them available the first time the user opens the plugin. So as far as I can see (likely I'm wrong) when I ship my product I would need some sort of installer to go find this "hard coded location" and copy the preset file there. Seems arbitrary really - why wouldnt I just (like the samples) have a folder called UserPresets next to my dll?

    Or have i got this completely wrong?



  • You can create "factory presets" simply by adding User presets to your project. They will be embedded into the plugin and automatically extracted the first time the user launches your plugin. No need to think about the directory and which edge case condition might prevent read access for the Installer (russian user account name characters, I am talking to you).

    If you use the .hr1 resource file (which I highly recommend for distribution), the user has to extract the monolith data to a customizable location, and it will automatically create a link file for you.

    The only thing your installer has to do is to copy the plugin to the VST folder. I've supplied @d-healey with installer scripts for macOS (use Whitebox Packages) that you might be able to reuse:

    https://github.com/davidhealey/librewave_woodwinds/tree/master/Installer/OSX

    The windows install script for InnoSetup can be created using the command line:

    %hise_path% set_project_folder "PROJECT_PATH"
    
    %hise_path% create-win-installer -noaax
    
    %hise_path% create-win-installer -noaax
    

    %hise_path% is the path to the HISE executable, which can be used as command line tools for all kinds of fun things, like command line building, etc... type %hise_path% --help for more information:

    HISE Command Line Tool
    ----------------------
    
    Usage: 
    
    HISE COMMAND [FILE] [OPTIONS]
    
    Commands: 
    
    export: builds the project using the default settings
    
    export_ci: builds the project using customized behaviour for automated builds
     - always use VisualStudio 2017 on Windows
     - don't copy the plugins to the plugin folders
     - use a relative path for the project file
    Arguments: 
    FILE      The path to the project file (either .xml or .hip you want to export).
              In CI mode, this will be the relative path from the current project folder
              In standard mode, it must be an absolute path
    -h:{TEXT} sets the HISE path. Use this if you don't have compiler settings set.
    -ipp      enables Intel Performance Primitives for fast convolution.
    -t:{TEXT} sets the project type ('standalone' | 'instrument' | 'effect')
    -p:{TEXT} sets the plugin type ('VST' | 'AU' | 'VST_AU' | 'AAX' | 'ALL')
              (Leave empty for standalone export)
    -a:{TEXT} sets the architecture ('x86', 'x64', 'x86x64').
              (Leave empty on OSX for Universal binary.)
    --test [PLUGIN_FILE]
    Tests the given plugin
    
    set_project_folder -p:PATH
    Changes the current project folder.
    
    set_hise_folder -p:PATH
    Sets the location for the HISE source code folder.
    
    get_project_folder
    Returns the current project folder.
    
    set_version -v:NEW_VERSION_STRING
    Sets the project version number to the given string
    
    clean [-p:PATH] [-all]
    Cleans the Binaries folder of the given project.
    -p:PATH - the path to the project folder.
    
    create-win-installer
    Creates a template install script for Inno Setup for the project
    


  • Thats great!

    So to be clear I make a set of presets save them as a Collection and then put that file in the UserPresets folder in my project and they will be embedded in my plugin at compile time and show up as soon as the usar opens the preset browser?

    Tell me more about this .hr1 resource file (and by "tell me more" please feel free to interpret that as - point me at the documentation)



  • @Lindon Create your presets using the default HISE preset browser, they will automatically be saved in the UserPresets folder.



  • hmm, I did that and they are not showing up in the compiled version... let me retry...



  • The HR is an archive (like zip). It compresses (lossless) the sample monoliths further for delivery to the user. When the user runs the plugin for the first time they will be asked to locate the HR files, then the monoliths will be extracted to their chosen location, after which they can delete the HR files.

    User side documentation here - https://librewave.com/knowledge-base/sample-library-installation-guide/#Installing_the_samples



  • @Lindon said in defining Preset Save/Load directory:

    hmm, I did that and they are not showing up in the compiled version... let me retry...

    If there is already a user preset directory existing, it won't do anything. Try deleting (or renaming) your %APPDATA% user preset directory and reload the plugin.



  • @d-healey OK...

    I managed to work out how to make a .hr1 file....

    I recompiled my plugin
    I started tracktion(a simple enough DAW) and loaded the plugin

    It started, and asked me to point at the hR1 file - which I did and then it gave me this:

    alt text

    ..and thus the user cannot reach the OK button to press it.



  • ...so I worked out how to force the dialog UP so I could see the OK button, this is REALLY bad user design by the way...

    I pressed OK, it installed the samples in the selected directory and gave me the correct interface.

    I play it and no sound comes out.

    Do I need to manually load the sampleMaps?



  • This is UX at its finest - I forgot that people might use plugin heights less than 500px (or whatever). I'll fix this. In the meantime you can check with a bigger height - 700px should get you started 🙂



  • @Christoph-Hart

    and the not making sound?



  • @Lindon said in defining Preset Save/Load directory:

    @Christoph-Hart

    and the not making sound?

    Did you reload the plugin as per the instructions?



  • yeah, and it made all the same sound - so I coded a sampleLoad for each voice in the init and that seems to have it working...

    Now I just await this "smaller" dialog for sample load....



  • It seems user presets don't show up for one of my projects too. The only thing I can think of is I'm using the two column layout...



  • strange - I'm using the default settings and they are showing up now.


Log in to reply
 

6
Online

502
Users

1.8k
Topics

13.6k
Posts