HISE Logo Forum
    • Categories
    • Register
    • Login

    Two attachToComponentValue broadcasters, one component

    Scheduled Pinned Locked Moved Bug Reports
    broadcastercomponentvalue
    6 Posts 3 Posters 290 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.
    • d.healeyD
      d.healey
      last edited by

      I briefly came across this a few days ago and mentioned it here.

      At the time I thought it was a limitation of the broadcaster system that only one broadcaster of a given type could be attached to an individual component.

      But today I again ran into a situation where it would be ideal to have multiple broadcasters for the same component so I thought I would dig a little deeper.

      Looking at the source code I can see the attachedListeners is an array, and the attachToComponentValue function just appends a new broadcaster to the array, also within HISE both broadcasters do fire at on init just not when the component's value changes.

      So this leads me to believe that all the groundwork is there for multiple broadcasters for a component, but that there is probably a tiny change required in the source to make it work... I'll keep digging but if @Christoph-Hart have any suggestions I would be grateful.

      Here's my test snippet:

      HiseSnippet 971.3ocsV8taaaCDmxNZqQ6OXEXO.D5StcAo1xtNIqXHdwwYynModSdACXnnfljJlKxjBTTY0sneqO.8caOA6MXuAaGkjikWbW67Z8GLvw6Nd+tej72oQZEkmlpzHGuwyS3HmO0MbtzLs+ThPhFdLx4VtSni4oFzQySHoobFxwo92Y85r8Vn7e+4gGQhIRJe4RHz4JAk+HwLgY4pi58PQb7IDFerXVkn6zaHUI6qhUY.Rp61DkPnWRtfeFwFVMWz2SRmhbtqay62ky2qcDiQZ2l0sa2C1+fNGzhD0rCYRqtGzInydA6uWDx4iFvDFkNzPL7TjyVGoXyCmp9MYQANWjJlDysFsPgPkKV9DULy1h1UQ8mJhYiVPQoHXWFsjvpWPXeo6oBl350WRbeQtC7xLpRfN0VEd0WAdspBulUf2ZfjSEHsUAjtsaHUKRLK8Xwym3NTZ35HBbNUEJEwhp855t8UPDRytyHWxOQCFWmQitMatCF96NOvy6d2CejVQXTRJ3Fy3QBovHTRO3TL0fuhnwPWYveCdf7BgjuKUyg9rRRMdgGF6KX9eM12Fp+NVah9hTXkewmplknj.T72A6eEINi6+j7HLjhHdh2KsHwl5toby.IAXqeHimwaDQhS4kvjXLD5TrQg4WA6F1xOEIU3Yrp+hJctsJM7enTMoksp9qtEQBMzPwB.7RttbOXrGUtPCfcxaDatQYRpkNZbcarCNuIti2K71FH4TULe2DsPZZ3OdP33V.Kf+pxXdPQq8tRxA+GX4f+GzbvFwyAuOH5f0xzAaBSGbSldwdfUxyTF9ikMxS16kd3+oqnn05y9rQqhiAvsN2VsN8+VhMjYylv0UgtMP387phDtuYQhpZXzhWwUBTIGB2cdbBW9lT1PkO8sBJknBB0jKm74kxIgwBFWiDfpwG6le7gxAboNNtc6e+PzOM7XhgrXafcDpRBWaD1Fv4X9UvTgBUpscOlmdoQkjGa4wGzju0h9rqGbz6W6Me4TDVO3FRRn34KPTu+34u5PzM0GAkYEKKlXVUt1NTqzAb7rhFoUGTlJLyqNz68lF96JDus6HggNc8Xr1ZvHbL7g.ikS99L2AQQbpYI.2x8je9CyXNzOpxLB4EmRLZAbAv8rrYgvWKP4P0kRdr84gSM6E4B6lVaKCDxkrbi+B9U5rk01ozYqENQyHTs5ozhq+1Yq2JeE.Sx7uCYa2Ss13Uu2m+aFLp+oT5pa0MRLXSSr8llXmMMw6uoI1cSSbuMMw8e6IZ+RruMynlU7rAgNczfbcJGmhQZ42VQ+MPXFm7B
      

      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

        Ah I see, each component only has one valueListener, well that's annoying. So I make this thread a feature request instead :)

        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

          Haha! Got it to work, I've turned valueListener into an Array! I just need to do a little bit of cleanup and I'll make a PR. :)

          Peek 2024-12-06 12-46.gif

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

          LindonL d.healeyD 2 Replies Last reply Reply Quote 4
          • LindonL
            Lindon @d.healey
            last edited by

            @d-healey well done.

            HISE Development for hire.
            www.channelrobot.com

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

              PR - https://github.com/christophhart/HISE/pull/633

              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 Great job, David. Thanks.

                That Pull Requests tab looks a bit depressing, though - lots of good stuff there.

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

                17

                Online

                1.8k

                Users

                11.9k

                Topics

                103.8k

                Posts