HISE Logo Forum
    • Categories
    • Register
    • Login

    defining Preset Save/Load directory

    Scheduled Pinned Locked Moved General Questions
    17 Posts 3 Posters 1.4k 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.
    • LindonL
      Lindon
      last edited by

      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?

      HISE Development for hire.
      www.channelrobot.com

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

        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:

        Link Preview Image
        File not found · davidhealey/sofiawoodwinds

        Contribute to davidhealey/sofiawoodwinds development by creating an account on GitHub.

        favicon

        GitHub (github.com)

        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
        
        1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon
          last edited by

          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)

          HISE Development for hire.
          www.channelrobot.com

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Lindon
            last edited by

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

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

            1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon
              last edited by

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

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey
                last edited by

                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

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

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

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @d.healey
                    last edited by

                    @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.

                    HISE Development for hire.
                    www.channelrobot.com

                    1 Reply Last reply Reply Quote 0
                    • LindonL
                      Lindon
                      last edited by Lindon

                      ...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?

                      HISE Development for hire.
                      www.channelrobot.com

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

                        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 :)

                        LindonL 1 Reply Last reply Reply Quote 0
                        • LindonL
                          Lindon @Christoph Hart
                          last edited by

                          @Christoph-Hart

                          and the not making sound?

                          HISE Development for hire.
                          www.channelrobot.com

                          d.healeyD 1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @Lindon
                            last edited by

                            @Lindon said in defining Preset Save/Load directory:

                            @Christoph-Hart

                            and the not making sound?

                            Did you reload the plugin as per the instructions?

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

                            1 Reply Last reply Reply Quote 0
                            • LindonL
                              Lindon
                              last edited by

                              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....

                              HISE Development for hire.
                              www.channelrobot.com

                              1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey
                                last edited by

                                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...

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

                                1 Reply Last reply Reply Quote 0
                                • LindonL
                                  Lindon
                                  last edited by

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

                                  HISE Development for hire.
                                  www.channelrobot.com

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

                                  56

                                  Online

                                  1.7k

                                  Users

                                  11.7k

                                  Topics

                                  101.8k

                                  Posts