Forum
    • Categories
    • Register
    • Login

    [feature request] Preset Browser broadcasters

    Scheduled Pinned Locked Moved Feature Requests
    preset browserbroadcasterfeature request
    24 Posts 3 Posters 3.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.
    • DanHD
      DanH @David Healey
      last edited by

      @d-healey crossed wires I think - I just want the brower's functionality (so save, new, import etc) to be available outside of the browser window, so we can have the equivalent buttons wherever we like on the ui.

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

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

        @DanH There should be enough API calls to create, save and import user presets using the file API.

        1 Reply Last reply Reply Quote 1
        • David HealeyD
          David Healey
          last edited by

          @Christoph-Hart I think I was getting the segfault because my ScriptEditors were missing the new ScriptFile tag. I've added this into the XML and HISE is opening now.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey
            last edited by David Healey

            A little example for anyone who wants to use this. fltPresetBrowser is the id of my preset browser floating tile.

                // Broadcaster
                const bc = Engine.createBroadcaster({"id": "PresetBrowser", "args": [component, obj]});
                
                bc.attachToComponentMouseEvents(["fltPresetBrowser"], "Clicks Only", "");
                
                bc.addListener("mouseAction", "Mouse action for preset browser", function(component, obj)
                {
                    Console.print(trace(obj));
                });
            

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            David HealeyD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey @David Healey
              last edited by

              @Christoph-Hart

              I've added a couple of properties:

              int selectedRow = lb->getSelectedRow();
              String file = column->getFileForIndex(rowNumber).getFileName();
              

              For file I had to add the getFileForIndex() function in presetBrowserComponents.h.

              This works, but what I'd really like is for the file to actually be the file object instead of a filename/path. But when I try that I get an error:

              error: cannot convert ‘juce::File’ to ‘const juce::var&’
                955 |                                 dyn->setProperty("file", file);
                    |                                                          ^~~~
                    |                                                          |
                    |                                                          juce::File
              
              

              Any idea how I can handle the conversion?

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

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

                @d-healey the preset browser can't create scripting file objects (also the JSON object should only contain Strings or primitive values), but if you use File::getFullPathName() you can create a file object with FileSystem.fromAbsolutePath() in your script function.

                David HealeyD 2 Replies Last reply Reply Quote 0
                • David HealeyD
                  David Healey @Christoph Hart
                  last edited by

                  @Christoph-Hart Ah that's a good idea, thanks for the explanation.

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @Christoph Hart
                    last edited by

                    @Christoph-Hart bool selected = lb->isRowSelected(rowNumber); is always returning true, even for the expansion column, any suggestion?

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

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

                      @d-healey well after you clicked on it, it‘s selected, no?

                      David HealeyD 1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey @Christoph Hart
                        last edited by David Healey

                        @Christoph-Hart Not for the expansions column, you can click again to deselect

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        DanHD 1 Reply Last reply Reply Quote 0
                        • DanHD
                          DanH @David Healey
                          last edited by

                          @d-healey didn't we discuss having a 'Factory' folder in the Expansions column so users could navigate back to the 'Factory' presets rather than clicking the expansion name again?

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

                          David HealeyD 1 Reply Last reply Reply Quote 0
                          • David HealeyD
                            David Healey @DanH
                            last edited by

                            @DanH Yeah that's another way to do it. But in my case I don't want any factory presets.

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

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

                              Actually I'm not sure if the juce::ListBox class can have a "deselect" action, so you would need to hack around in there.

                              David HealeyD 1 Reply Last reply Reply Quote 0
                              • David HealeyD
                                David Healey @Christoph Hart
                                last edited by

                                @Christoph-Hart I think I'll just track the selected index in my script and if the index is the same as the last index I know it's been deselected :)

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                1 Reply Last reply Reply Quote 0
                                • David HealeyD
                                  David Healey
                                  last edited by David Healey

                                  Am I being silly or is the favourite button state obj.buttonState inverted? Aha! It triggers on mouse up not mouse down :)

                                  Free HISE Bootcamp Full Course for beginners.
                                  YouTube Channel - Public HISE tutorials
                                  My Patreon - HISE tutorials

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

                                  37

                                  Online

                                  2.1k

                                  Users

                                  13.0k

                                  Topics

                                  112.6k

                                  Posts