HISE Logo Forum
    • Categories
    • Register
    • Login

    Parametric EQ callback when changing bands via GUI

    Scheduled Pinned Locked Moved General Questions
    13 Posts 8 Posters 499 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.
    • oskarshO
      oskarsh
      last edited by

      Is it currently possible to get a callback whenever the user Drags on of the EQ Points? I would like to update the Knobs in my application based on the user input inside the EQ FloatingTile.

      HiseSnippet 1461.3oc2X8zaSbDEeVaOnZSC+ohh5ANrJpB4zBQ1NDf1RaLwwl5BIwDGfJ0CvjcGaOJ6NiY2YCjhPhC8KApW5Widqe.3P+Hz68BGZq5sz2r+w6rNtgfKAUQN442ady76812+lzwSXQ88EdHihat6PJx38wc2kKGzX.gwQsWAYbB7pDeI0yLBZ4cGR78o1HCi72PAXTr.J7uWtzxDGB2hlBgP2Uvrn2h4xjonCqeSliSKhMcSlq1tuT81VBdCgiH.3SdbEzPh01j9z0HpskCiLNVSalT30URjTejQgkE161cf3Q7n8eWlOaKGpZQUTW3fhfaIbrULV8aTiALG6NI1sOBYf6j5ExG4ENCdUlMaDdp23TgBLS0P2eXjKK8xmgdU0oWEM5MAJYnQoBQT5z3tVdrgxTIJ9bbbaN7woGAb65TIZunb+QNbCArCtbdWx1zVdvhQZT9xUpbAyEqTYtuXlRyTBb99RycHdlcHdfKW5wdXyaa9klgQDy2mJa1qG0RVd1T4lMu8rQZy3NLN0rW.2RxDbSAeYB2tpJFQw.OgSYKg6PAG3xEfawIfN2LkdxLkLg+bDVDGSF2l9X39pX9IYnv7pSZ8d87oRyOMqD0wCWewLfv9ttD98VARZ4vCM4Bgs9zP1l3T.ipQBqJO6HFO6bpCIl2MHNNaAQhk2uIcPldsowzqdzZ5GnkW6UY40xX4kzr20DR557xyU5IkJV5okLGWTudSTV7Y4P8lnXU4AuCRwx7.2sndIlXxFgblrIh3+8DQ85DVQtFsMJ3s4L45Cowq2epJJ1eB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pmceKKk69hf+Yx5TaJzYgoPmKME5r3TnykmBctxTnyUOPcTMitdfT3FkJB.cZF8lCizYmxi9G.NPFZ0
      

      692934b2-7f16-4f48-b453-873d7be25636-image.png

      Thanks in advance!

      breathing HISE

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

        @oskarsh I believe you can do this with the broadcaster system.

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

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

          // Create a broadcaster. If you intend to attach it to a component, it needs two parameters (conveniently named `component` and `event`)
          const var eqWatcher = Engine.createBroadcaster({"component": undefined, "event": undefined});
          
          // The EQ is named `FloatingTile1` obviously...
          eqWatcher.attachToComponentMouseEvents("FloatingTile1", "All Callbacks");
          
          eqWatcher.addListener("RefreshFunction", function(component, event)
          {
              if(event.drag || event.clicked)
              {
                  Console.print("Update the knobs here");
              }
          });
          
          ulrikU ? 3 Replies Last reply Reply Quote 4
          • ulrikU
            ulrik @Christoph Hart
            last edited by

            @Christoph-Hart great implementation, the broadcaster system, now we all wait for the video David will make, explaining all goodies :)

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

            1 Reply Last reply Reply Quote 0
            • ulrikU
              ulrik @Christoph Hart
              last edited by

              @Christoph-Hart I guess will work on midi overlays as well?

              Hise Develop branch
              MacOs 15.3.1, Xcode 16.2
              http://musikboden.se

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

                @ulrik works on every component, but for MIDI players you might even attach it directly to changes of MIDI content.

                const var MIDIPlayer1 = Synth.getMidiPlayer("MIDI Player1");
                
                const var midiUpdater = Engine.createBroadcaster({"player": undefined});
                
                // The broadcaster checks if any of the parameter has changed 
                // and if it hasn't it will not fire the callbacks. In this case
                // we don't want that behaviour because the parameter is always
                // the same reference to the MIDI player so we need to set it to
                // "Queue" mode which ensures that every message is being sent out.
                midiUpdater.setEnableQueue(true);
                
                // We can use the broadcaster object instead of a function for
                // every API call that expects a callback.
                MIDIPlayer1.setSequenceCallback(midiUpdater);
                
                midiUpdater.addListener("Logger", function(player)
                {
                	var list = player.getEventList();
                
                	for(ev in list)
                		Console.print(ev.dump());
                });
                
                1 Reply Last reply Reply Quote 1
                • oskarshO
                  oskarsh
                  last edited by

                  @d-healey @Christoph-Hart
                  Thanks for the quick answer and snippet this worked out as expected and I was able to get each Band Parameter on drag. Is there an additionally event.onScroll event that I can listen to, so that I am also able to update the Q parameter when user is scrolling?

                  breathing HISE

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

                    @oskarsh no but it's a good idea to add that at some point.

                    1 Reply Last reply Reply Quote 2
                    • ?
                      A Former User @Christoph Hart
                      last edited by A Former User

                      @Christoph-Hart said in Parametric EQ callback when changing bands via GUI:

                      // Create a broadcaster. If you intend to attach it to a component, it needs two parameters (conveniently named `component` and `event`)
                      const var eqWatcher = Engine.createBroadcaster({"component": undefined, "event": undefined});
                      
                      // The EQ is named `FloatingTile1` obviously...
                      eqWatcher.attachToComponentMouseEvents("FloatingTile1", "All Callbacks");
                      
                      eqWatcher.addListener("RefreshFunction", function(component, event)
                      {
                          if(event.drag || event.clicked)
                          {
                              Console.print("Update the knobs here");
                          }
                      });
                      

                      Great example, Thank you!

                      Can we use this to detect which filter node (index) is dragged? For example if 3th node is dragged or clicked.

                      orangeO 1 Reply Last reply Reply Quote 0
                      • orangeO
                        orange @A Former User
                        last edited by orange

                        @harris-rosendahl

                        I think you can get it with local LAF function of the Draggable Filter. In the drawFilterDragHandle function; obj.index value is the number of the selected node.

                        But if you try to show/ hide panels upon this, you'll probably need to disable adding new nodes or limit the node numbers. I don't know if it is possible.

                        laf.registerFunction("drawFilterDragHandle", function(g, obj)
                        {	
                        	// Defining the handle object with an ellipse
                        	g.setColour(0XFF7B8DFF);
                        	g.drawEllipse(obj.handle, 2);
                        
                        	// Getting the selected node number
                        	if(obj.index == 0) 
                        	{
                        
                        
                        	}
                        	
                        	else if(obj.index == 1) 
                        	{
                        
                        
                        	}	
                        });
                        

                        develop Branch / XCode 13.1
                        macOS Monterey / M1 Max

                        ? 1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User @orange
                          last edited by A Former User

                          @orange I got it thank you! You are a great helper.

                          But if you try to show/ hide panels upon this, you'll probably need to disable adding new nodes or limit the node numbers. I don't know if it is possible.

                          • Can we limit the number of the nodes can be inserted in the draggable filter?

                          • Also can we lock the number of the nodes (no delete & no add) in the draggable filter?

                          Please help @Christoph-Hart

                          So we can make something similar to this functionality with Hise. When the node is clicked, the dedicated panel will be opened:

                          alt text

                          lalalandsynthL DanHD 2 Replies Last reply Reply Quote 1
                          • lalalandsynthL
                            lalalandsynth @A Former User
                            last edited by

                            @harris-rosendahl Yep limiting the nodes is something I am interested in as well.

                            https://lalalandaudio.com/

                            https://lalalandsynth.com/

                            https://www.facebook.com/lalalandsynth

                            https://www.facebook.com/lalalandsynth

                            1 Reply Last reply Reply Quote 0
                            • DanHD
                              DanH @A Former User
                              last edited by

                              @harris-rosendahl I did a bit of this in the source code. Removed menu items etc. I didn’t do limiting of nodes but I can point you to where I was editing when I’m back at my computer

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

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

                              48

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.8k

                              Posts