HISE Logo Forum
    • Categories
    • Register
    • Login

    Broadcaster + SliderPack

    Scheduled Pinned Locked Moved Scripting
    6 Posts 2 Posters 218 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
      last edited by

      This is some code for attaching xtra mouse events to a sliderpack.

      const var CCWatch = Engine.createBroadcaster({"component": undefined, "event": undefined});
      CCWatch.setEnableQueue(true);
      
      CCWatch.attachToComponentMouseEvents(Content.getComponent("CC1SP"), "All Callbacks");
      
      CCWatch.addListener("RefreshFunction", function(component, event)
      {
          if (event.clicked && event.shiftDown)
          {
              Console.print("working");
          }
      });
      

      Is it possible to make SP not respond on some of the events?
      I'm talking of the events .shiftDown, altDown and ctrlDown, if I'm right these are not needed by the sliderpack?

      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 you can use different callback levels like in the scriptpanel in order to filter out frequent events that you don‘t need, but if you don‘t care about a shift click then just check that and return from the function.

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

          @Christoph-Hart yes you're right as always :) thank you I didn't think of that.
          Btw the broadcaster system seems very powerful! 👍

          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 wait, I said of course to soon 😰

            This is what I have

            cclanes.gif

            I use a sliderpack, and it's mouse callbacks, as you see in the picture

            but I don't want the sliderpack to change its values when holding down the shiftKey, I want to use the event.shiftDown (set in the broadcaster function), to control other parameters.

            So I don't want the sliderpack to react if the shiftKey is down, is it possible?

            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 No, you can't change the native functionality, you can only attach new logic.

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

                @Christoph-Hart Ok, I understand, thank you!

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

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

                36

                Online

                1.7k

                Users

                11.7k

                Topics

                102.1k

                Posts