HISE Logo Forum
    • Categories
    • Register
    • Login

    A few more broadcaster questions - and possible bugs

    Scheduled Pinned Locked Moved Scripting
    5 Posts 2 Posters 119 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 d.healey

      Probably for @Christoph-Hart

      attachToOtherBroadcaster what's the purpose of the transform function and what if any parameters does it need?

      Can I attach one broadcaster to multiple other broadcasters and is there a way to de-attach them?

      What would I use attachToNonRealtimeChange() for?

      What does removeAllSources() do?

      The documentation for the reset function says

      This resets the value to the default values passed into the constructor and sends a message to all listeners.

      How do we pass default values to the constructor?

      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

        I'm experimenting and poking around in the source code to try and solve these mysteries.

        In this example I have two broadcasters, one attached to the other, the second one also has a listener. I have a button which changes the parameter of the first broadcaster. When this happens I'd expect the listener of the second broadcaster to fire, but it doesn't.

        I also can't unattach the second broadcaster from the first, I tried both removeListener and removeSource.

        HiseSnippet 910.3ocsV8uaSjCD1aZWDYueHPhGfU6esEhhxlKzF.g.RZJWzQaitzCgDBgb75jX0csWY6EHppOg7xvavci8toYCMpThzk+HJim4alO+YOiyHofPUJgD43c1hLJx4WcGufqm2eNlwQCOD4bW2IjynJMp2hLrRQiQNN67ZiWm56hre91K5gSvbBc0RHzaELB8MrTld0pid4ewRRNBGSOikVI5NubHQv6KRD4.S1wsEJCSNGOidB1DVMWzehUyQNOzMNpSzztD79ci5zlPZ28f1O4.BEOcJc+nGePmtS6LESZ0F4bmAwLsPNVi0TEjzdh3EimK9Lun.ukoXSRnFiHzXnxEKi5OmkDOZornPHmcGsRj1oPjdf6wrX1UquRrtm0g+JDUEMmZ2Dkh9InjSEJsaAktu6XhjkoW4wvmewcHWSkfjPWiJEwhpkWysu.hfqalhOmdjDLtBQ39sZ0vG9Zum44AmOJs+DRj+y8Gvmw3zlDIE1H8jBbLAq.PgWvhepe.DTPCerbl5o9uOPY1sAe3xpIo8sIIs2bR.GMwZMlL+Lwo54TYUrPoa3OMmSzLAO7K6cwkM70xbZC+f.CArfiieCChlapE3OHkpwAUfYK1ddW3UGzFkHg1LSx35vfkv.54+H+hvdlmcm4w3Iv14pj3K38x0ZAOxnuRQRHQjlI3fR2v+S3j7hB.7soMOffXWERGjskmIyn59KgEFTlvf8ZpLqaSaebRxDnWI76qGPpJb4DgldJOzVSuK87+dWSmtQek4JATpM41zDKuIfg77zITY0crIP3R65cB2410IPJjkJAJ3C4L8oYzR6iDIwla3lee89FTotZ5fJYHDp11+76k8OEpHhAIotaojhrzu5vMz+L7PrFuLQPNg5jQkZlY63bH8SvvuhFy5tGRUmqEY1XKOLAE3VT1ufbbc9JTsElez0NA8ZM9vHGQbdBVu9bHyD5RGvQxZM+lFbthoWTcB9OwvoV23voaKEuu6HllLeybr1F3HH1+evwxQ5+l6.3MDhdEA208n2ssyu+Ak+uE4ZFe1wXsjYNjOIOcL7zGgBUmyoIJy4cMyE1B6VFaiBLlxisF+K7ozYjw1ozYzRmnTLQJ9Ho3Zt4Qi6ZWA3D29nZc2iM19a31cJ7F1GIj0S00.1daA9GaKvNaKvGus.2eaAdv1Br6OFn4uX7pbsHsnsAgNdz.6zHGmAbLbCzdaE8eWY1xAB
        

        Edit 1: removeAllListeners works but not removeListnener.

        Edit 2: removeListener does work, but you have to pass in the entire object used to create the second broadcaster, you can't just pass the broadcaster or ID, I guess because we're not attatching it like a regular listener. This means the object needs to be declared separately to the broadcaster which is not ideal.

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

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

          Another possible bug, or lack of documentation:

          const bc2 = Engine.createBroadcaster({id: "bc2", args: ["state"]});
          
          bc2.addListener({}, "meta1", function(state)
          {
          	Console.print("Listener1: " + state);
          });
          
          bc2.addListener({}, "meta2", function(state)
          {
          	Console.print("Listener2: " + state);
          });
          
          bc2.removeListener("");
          

          This removes listener 1, but I don't know why...

          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 @d.healey
            last edited by d.healey

            @d-healey said in A few more broadcaster questions - and possible bugs:

            the second broadcaster to fire, but it doesn't.

            Think I've fixed this one - https://github.com/christophhart/HISE/pull/664

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

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

              @d-healey You are the gift that keeps on giving. 🚀

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

              52

              Online

              1.7k

              Users

              11.7k

              Topics

              101.8k

              Posts