HISE Logo Forum
    • Categories
    • Register
    • Login

    Samplemap Loads; Samplemap Broadcaster Doesn't Fire

    Scheduled Pinned Locked Moved Solved General Questions
    8 Posts 3 Posters 183 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.
    • clevername27C
      clevername27
      last edited by clevername27

      In my plugin, the Samplemap Receiver executes when I load a SampleMap in HISE's Sampler interface (as it should).

      When I load a SampleMap with scripting, the SampleMap loads, but the broadcaster doesn't execute.

      Any ideas on this? Been beating my head against the wall for five weeks on this one. 🤪 Cheers.

      EDIT: @Christoph-Hart , you were right - enabling the queue solved the problem. Thank you so much - I was dead in the water. (And thank you, @d-healey, as always.)

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

        @clevername27 got a minimal example?

        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 Thank you for your reply. Do you mean a self-contained snippet? Unfortunately, that's not possible. Here is the broadcaster code. It works up until a certain point of complexity in the other other code – and then it doesn't.

          const var sampleMapBroadcaster = Engine.createBroadcaster({
          	id: "sampleMapListener",
          	args: ["eventType", "samplerId", "data"]
          });
          
          sampleMapBroadcaster.attachToSampleMap("Sampler", "SampleMapChanged", "");
          
          sampleMapBroadcaster.addListener("SampleMap Name", "sampleMapListener", function(eventType, samplerId, data) {
          
          Christoph HartC d.healeyD 2 Replies Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @clevername27
            last edited by

            @clevername27 do you load many samplemaps at once?

            Does it help to enable the queue based messaging in broadcasters (s
            Broadcaster.setEnableQueue)?

            clevername27C 2 Replies Last reply Reply Quote 0
            • clevername27C
              clevername27 @Christoph Hart
              last edited by

              @Christoph-Hart Thank you. As below…

              • Yes, I set that value to True.

              • I'm currently loading one Sample at a time (via the loadSampleMapFromBase64). There's nothing in the SampleMaps folder. (However, when I was loading them normally, and there about 17 in the folder, I experienced the same issue.)

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

                @Christoph-Hart @d-healey

                Restoring the SampleMap folder does not make the receiver execute (but the SampleMap still loads). When I select the SampleMap in the HISE's Sampler GUI (which is possible, because I restored the folder), the Receiver fires.

                This may be helpful: When I load my "real" code, and run HISE's cyclic reference tool, the tool reports no problems. If I then load a SampleMap (via my script), and run that tool, HISE crashes immediately. (Makes me wonder if a message is timing out?)

                Update: When I moved where I placed SetEnableQueue in my test code (to the end of UI OnInit) , the Receiver began executing. Doing so in my "real" code produced no change. Now it's not working…I'm unaware of changing anything.

                @d-healey My "test code" is my snippet case, but it's still requires many data files. You're right of course that this is helpful. I just can't post anything.

                This also may be relevant: When I load my project, HISE appears to compile it twice. (This doesn't happen when I choose "Compile All Scripts". )

                ce73d2b0-7b0b-4501-a72b-c2794c0d8034-image.png

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

                  @clevername27 said in Samplemap Loads; Samplemap Broadcaster Doesn't Fire:

                  Do you mean a self-contained snippet? Unfortunately, that's not possible

                  I mean make a new little project where I can press a button and it triggers the described behaviour. Isolating the issue like this will make it easier to find a solution.

                  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 clevername27

                    @d-healey I understand and appreciate that (truly). I've been trying to do that for 5 weeks — all the data is dynamic – it can't be reduced like that, unfortunately.

                    1 Reply Last reply Reply Quote 0
                    • clevername27C clevername27 has marked this topic as solved on
                    • First post
                      Last post

                    20

                    Online

                    1.8k

                    Users

                    12.0k

                    Topics

                    104.5k

                    Posts