HISE Logo Forum
    • Categories
    • Register
    • Login

    [feature request] Preset Browser broadcasters

    Scheduled Pinned Locked Moved Feature Requests
    preset browserbroadcasterfeature request
    24 Posts 3 Posters 1.3k 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 @Christoph Hart
      last edited by

      @Christoph-Hart could we also get scriptable callbacks for all the preset buttons please pretty please? So we can use their functionality outside of the preset browser.

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

      Christoph HartC d.healeyD 2 Replies Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart @DanH
        last edited by

        @DanH nah thats super difficult to setup

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

          @DanH You should be able to achieve the same effect with broadcasters once Christoph implements it.

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

          Christoph HartC DanHD 2 Replies Last reply Reply Quote 2
          • Christoph HartC
            Christoph Hart @d.healey
            last edited by

            @d-healey Alright, it's pushed. The system is fairly easy to use so you should be able to extend it yourself instead of nagging me :)

            Just subclass any component you want to attach more properties to from hise::ComponentWithAdditionalMouseProperties, then define a

            void attachAdditionalMouseProperties(const MouseEvent& e, var& obj);
            

            method where you can add more stuff to the obj JSON (you can query the component that's been clicked on with e.eventComponent).

            d.healeyD 1 Reply Last reply Reply Quote 4
            • DanHD
              DanH @d.healey
              last edited by

              @d-healey even if I’m not clicking inside the preset browser?

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

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

                @Christoph-Hart Thank you!

                even if I’m not clicking inside the preset browser?

                No but then how would that work for a control callback?

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

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

                  @Christoph-Hart This commit is segfaulting when I open my project. Getting some preset handler errors

                  JUCE Assertion failure in PresetHandler.cpp:2820
                  JUCE Assertion failure in PresetHandler.cpp:2891
                  JUCE Assertion failure in PresetHandler.cpp:2690
                  JUCE Assertion failure in PresetHandler.cpp:2820
                  JUCE Assertion failure in PresetHandler.cpp:2891
                  JUCE Assertion failure in PresetHandler.cpp:2690
                  
                  

                  If I make a new project with a preset browser it works but seeing these errors on exit.

                  *** Leaked objects detected: 1 instance(s) of class SafeChangeBroadcaster
                  JUCE Assertion failure in juce_LeakedObjectDetector.h:92
                  *** Leaked objects detected: 1 instance(s) of class AsyncBroadcaster
                  JUCE Assertion failure in juce_LeakedObjectDetector.h:92
                  *** Leaked objects detected: 1 instance(s) of class DynamicObject
                  JUCE Assertion failure in juce_LeakedObjectDetector.h:92
                  *** Leaked objects detected: 1 instance(s) of class AudioBuffer
                  JUCE Assertion failure in juce_LeakedObjectDetector.h:92
                  *** Leaked objects detected: 1 instance(s) of class AsyncUpdater
                  JUCE Assertion failure in juce_LeakedObjectDetector.h:92
                  

                  Edit: Seems the segfault is unrelated to those preset handler assertions. I think it's caused by the hydra tabs fix. When I remove my editorData.json file HISE loads up no problem.

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

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

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public 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));
                              });
                          

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public 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?

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public 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.

                                Libre Wave - Freedom respecting instruments and effects
                                My Patreon - HISE tutorials
                                YouTube Channel - Public 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?

                                  Libre Wave - Freedom respecting instruments and effects
                                  My Patreon - HISE tutorials
                                  YouTube Channel - Public 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

                                      Libre Wave - Freedom respecting instruments and effects
                                      My Patreon - HISE tutorials
                                      YouTube Channel - Public 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.

                                          Libre Wave - Freedom respecting instruments and effects
                                          My Patreon - HISE tutorials
                                          YouTube Channel - Public 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
                                            • First post
                                              Last post

                                            16

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.6k

                                            Posts