HISE Logo Forum
    • Categories
    • Register
    • Login

    Saving and accessing presets

    Scheduled Pinned Locked Moved General Questions
    28 Posts 4 Posters 1.0k 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.
    • d.healeyD
      d.healey @pcs800
      last edited by

      @pcs800 You can set the visible property in the button's callback

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

      pcs800P 1 Reply Last reply Reply Quote 0
      • pcs800P
        pcs800 @d.healey
        last edited by

        @d-healey I don't know what callback means.
        I know I can set the visibility in the preset browser properties window.
        How would I use a button to alternate the browsers visibility?

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

          @pcs800 I recommend you start with this video

          And then possibly this one

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

          pcs800P 1 Reply Last reply Reply Quote 0
          • pcs800P
            pcs800 @d.healey
            last edited by pcs800

            @d-healey Ok, i am using the following script to show/hide the preset browser via a button. However, I have to click it twice to show, and twicce to hide.
            How do I get it to click once for each action?

            inline function onbtnToggleBrowserControl(component, value)
            {
            if (value)
            {
            fltPresetBrowser.set("visible", !fltPresetBrowser.get("visible"));
            }
            }

            const var btnToggleBrowser = Content.getComponent("btnToggleBrowser");
            const var fltPresetBrowser = Content.getComponent("fltPresetBrowser");

            inline function onbtnToggleBrowserControl(component, value)
            {
            if (value) // Only trigger on button press (value == 1)
            {
            fltPresetBrowser.set("visible", !fltPresetBrowser.get("visible"));
            }
            };

            btnToggleBrowser.setControlCallback(onbtnToggleBrowserControl);

            // Hide browser on init
            fltPresetBrowser.set("visible", false);

            pcs800P d.healeyD 2 Replies Last reply Reply Quote 0
            • pcs800P
              pcs800 @pcs800
              last edited by

              @pcs800 Never mind, I found it. The radial group set to 1 works.

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

                @pcs800 Looks like you're making good progress. Each control can only have one control callback. You've assigned two here, so you're going to get weird behaviour.

                This is how I would do it:

                //! fltPresetBrowser
                const var fltPresetBrowser = Content.getComponent("fltPresetBrowser");
                
                //! btnToggleBrowser
                const var btnToggleBrowser = Content.getComponent("btnToggleBrowser");
                btnToggleBrowser.setControlCallback(onbtnToggleBrowserControl);
                
                inline function onbtnToggleBrowserControl(component, value)
                {
                    fltPresetBrowser.set("visible", value);
                }
                

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

                pcs800P 1 Reply Last reply Reply Quote 0
                • pcs800P
                  pcs800 @d.healey
                  last edited by

                  @d-healey This code isn't working. Clicking the button does not show/hide the preset browser.
                  However, the code I posted above is working, so i have another problem now.

                  When the plugin is loaded into a daw, the preset browser shows up. I want it to be hidden at startup. How would I code that?

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

                    @pcs800 said in Saving and accessing presets:

                    This code isn't working

                    Did you remove your code before putting this code in? Did you disable the radio group (set it to 0)? Radio groups are for when you have multiple buttons working together.

                    @pcs800 said in Saving and accessing presets:

                    When the plugin is loaded into a daw, the preset browser shows up. I want it to be hidden at startup. How would I code that?

                    If the button's saveInPreset property is enabled, then as long as you save your project with the preset browser hidden it will be hidden when the plugin is loaded.

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

                    pcs800P 2 Replies Last reply Reply Quote 0
                    • pcs800P
                      pcs800 @d.healey
                      last edited by

                      @d-healey I had not set the radil0 option back to zero, my fault. So yes your code does work, thank you for that.
                      I am compiling a new build with the browser hidden in the reset.
                      I'll let you know if I somehow mess that up too.

                      1 Reply Last reply Reply Quote 0
                      • pcs800P
                        pcs800 @d.healey
                        last edited by

                        @d-healey Ok that worked! Thanks!
                        Now my other issue is that the presets I built in hise, are not showing up in the preset browser when the plugin is loaded into a daw.

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

                          @pcs800 If you've enabled the option in project preferences to embed presets in the plugin then the first time you run the plugin the presets will be extracted - but only the first time.

                          After that the presets won't be extracted unless you clear them from the app data folder (which you can find through the file menu in HISE).

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

                          pcs800P 1 Reply Last reply Reply Quote 0
                          • pcs800P
                            pcs800 @d.healey
                            last edited by

                            @d-healey So go to the project appdata folder and delete the .json file inside the user presets folder?

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

                              @pcs800 Delete the user presets folder

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

                              pcs800P 1 Reply Last reply Reply Quote 0
                              • pcs800P
                                pcs800 @d.healey
                                last edited by

                                @d-healey That worked, but seems odd when thinking in terms of installing on a users computer.
                                But I'll get to that when the time comes.
                                The only issue I have left now, if that when I choose a preset, the browser window closes. It should remain open until the user clicks the show/hide button.
                                How do I accomplish that?

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

                                  @pcs800 You need to save your presets with the button enabled.

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

                                  pcs800P 1 Reply Last reply Reply Quote 0
                                  • pcs800P
                                    pcs800 @d.healey
                                    last edited by

                                    @d-healey I am not sure what you mean.
                                    I do click the button o show the browser, then i create presets and save them. Once done, I then close the browser and export the vst3. The browser closes after selecting a preset.
                                    Actually, it does that in hise too when testing and selecting a preset.

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

                                      @pcs800 Is the button's saveInPreset property enabled?

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

                                      pcs800P 1 Reply Last reply Reply Quote 0
                                      • pcs800P
                                        pcs800 @d.healey
                                        last edited by

                                        @d-healey Yes, it sure is

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

                                          @pcs800 Can you send me a snippet

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

                                          pcs800P 2 Replies Last reply Reply Quote 0
                                          • pcs800P
                                            pcs800 @d.healey
                                            last edited by

                                            @d-healey Actually, I think I found the solution.
                                            In Hise, I open the browser, click a preset, the window closes. I open it again and click save, to resave the preset. This seems to work. I can click presets now and the window does not close.

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

                                            13

                                            Online

                                            1.7k

                                            Users

                                            11.9k

                                            Topics

                                            103.6k

                                            Posts