HISE Logo Forum
    • Categories
    • Register
    • Login

    [feature request] Preset Browser broadcasters

    Scheduled Pinned Locked Moved Feature Requests
    preset browserbroadcasterfeature request
    24 Posts 3 Posters 2.9k 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.
    • 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
      • d.healeyD
        d.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
        • d.healeyD
          d.healey
          last edited by d.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

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @d.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 @d.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.

              d.healeyD 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.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
                • d.healeyD
                  d.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 @d.healey
                    last edited by

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

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Christoph Hart
                      last edited by d.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 @d.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

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.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 @d.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.

                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.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
                              • d.healeyD
                                d.healey
                                last edited by d.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

                                11

                                Online

                                2.0k

                                Users

                                12.7k

                                Topics

                                110.5k

                                Posts