HISE Logo Forum
    • Categories
    • Register
    • Login

    Value Change Broadcaster not firing?

    Scheduled Pinned Locked Moved Scripting
    7 Posts 3 Posters 235 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.
    • A
      aaronventure
      last edited by

      Alright, I'm fucking lost. Can anyone make any sense of this?

      broadcaster.gif

      Why is animatorButtonValue not firing?

      	const var buttonValueBc = Engine.createBroadcaster({
      		"id": "animatorButtonValue",
      		"args": ["component", "value"] // this needs to match function arguments
      	});
      

      I'm attaching a component to it from inside a helper function that creates the component. I do the same for the Value Globalize broadcaster you see here, and it works. But animatorButtonValue doesn't fire.

      buttonValueBc.attachToComponentValue(component, "-");
      

      However, if I attach it outside the helper function i.e. inside on init after calling the function and creating the control, it works as expected. But I already have another value change that I'm attaching inside the helper function and it works! What gives?

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

        Just ran into this myself. Did you find a solution?

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

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

          Ah it seems to be a different issue in my case. Apparently you can only attach 1 broadcaster to a component's value.

          Why would I want two value broadcasters attached to the same component instead of using two listeners and one broadcaster??? I'm glad you asked.

          I have two namespaces, declared one after the other that both need to respond to the component's value but the two name spaces are unaware of each other and I want to keep it that way. So I thought I would put a broadcaster in each namespace. My solution for now will be to use a broadcaster in a third namespace that is visible to the other two.

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

          A 1 Reply Last reply Reply Quote 1
          • A
            aaronventure @d.healey
            last edited by

            @d-healey Yeah same thing.

            1 Reply Last reply Reply Quote 0
            • clevername27C
              clevername27 @aaronventure
              last edited by clevername27

              @aaronventure @d-healey Do you have the queue engaged? (Is the Broadcaster not firing, or is the Receive not receiving?)

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @clevername27
                last edited by aaronventure

                @clevername27 it's unrelated to the queue, you just cannot attach a component to more than one value broadcaster.

                I mean you can, but only the first one will fire.

                clevername27C 1 Reply Last reply Reply Quote 1
                • clevername27C
                  clevername27 @aaronventure
                  last edited by

                  @aaronventure HISE's broadcaster system is my favourite thing about HISE (with the exception of the surprise queue). The GUI that @Christoph-Hart innovated is spectacular. But…it also scares me because it puts so much flow control out my hands, that if there's a problem with the system, there's no way I can work around it because everything is so intertwined—that's not a critique of the HISE implementation, it's endemic to any complex system. I ended up creating my own broadcaster system for my plugin—it's generally inferior to HISE's, and I'll slowly migrate it…but only after I'm confident I'll be OK doing so.

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

                  16

                  Online

                  1.8k

                  Users

                  11.9k

                  Topics

                  103.8k

                  Posts