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.
    • 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

                        51

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts