HISE Logo Forum
    • Categories
    • Register
    • Login

    Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback

    Scheduled Pinned Locked Moved Scripting
    17 Posts 2 Posters 86 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 @VirtualVirgin
      last edited by d.healey

      @VirtualVirgin Perfect. So this is HISE telling you that you can't do that thing in a deferred script. You need to move this stuff to a secondary, non-deferred, script (midi processor).

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

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

        @d-healey said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

        @VirtualVirgin Perfect. So this is HISE telling you that you can't do that thing in a deferred script. You need to move this stuff to a secondary, non-deferred, script (midi processor).

        Deferring the script makes no difference. The error occurs both with and without Synth.deferCallbacks(true);

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

          @VirtualVirgin Did you restart HISE after removing it ?

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

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

            @d-healey said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

            @VirtualVirgin Did you restart HISE after removing it ?

            Yes, there is no difference. The error remains.

            d.healeyD 2 Replies Last reply Reply Quote 0
            • d.healeyD
              d.healey @VirtualVirgin
              last edited by

              @VirtualVirgin Can you post a snippet or send me your project?

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

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

                @VirtualVirgin I just tested your snippet. It is the deferred callbacks thing.

                Change Synth.deferCallbacks(true); to Synth.deferCallbacks(false); (no need to restart HISE) and the error goes away. You need to move that realtime thread stuff to a non-deferred processor.

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

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

                  @d-healey I don't quite understand what you mean.
                  Originally the script did not have "Synth.deferCallbacks();" at all until you suggested I add it.
                  I did and that did not change the error.
                  Removing it did not change the error.
                  Setting it to false does not change the error:

                  Screenshot 2025-05-12 at 5.29.13 PM.png

                  Also, can you define what "realtime thread stuff" is? Are you referring to everything used on the MIDI callbacks?

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

                    @VirtualVirgin said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

                    Originally the script did not have "Synth.deferCallbacks();" at all until you suggested I add it.

                    When did I suggest you add it?

                    @VirtualVirgin said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

                    Setting it to false does not change the error:

                    I tested it here and the error went. Can you show me a video, I want to see exactly what steps you're doing to see if I was doing something different?

                    @VirtualVirgin said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

                    Also, can you define what "realtime thread stuff" is? Are you referring to everything used on the MIDI callbacks?

                    Realtime stuff is stuff that must happen in realtime. For example ignoring an event, it's no good trying to ignore it after it's happened. Whereas updating a label on the UI when a note is pressed could happen x number of milliseconds after the actual note has been pressed, it's not going to cause any issues - but if you try to redraw a label in realtime you might get audio dropouts or glitches.

                    Christoph explains it more in this thread - https://forum.hise.audio/topic/79/scripting-best-practices

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

                    VirtualVirginV 2 Replies Last reply Reply Quote 0
                    • VirtualVirginV
                      VirtualVirgin @d.healey
                      last edited by

                      @d-healey said in [Confusing error: "Call of ignoreEvent() .

                      When did I suggest you add it?

                      In your first reply?

                      @VirtualVirgin Is your interface script deferred (it should be)?

                      @d-healey said in [Confusing error: "Call of ignoreEvent() .

                      I tested it here and the error went. Can you show me a video, I want to see exactly what steps you're doing to see if I was doing something different?

                      Here I took the Synth.deferCallbacks() out of the script and restarted HISE and the project.
                      Then I am just playing notes into my keyboard controller (which is on channel 2).
                      Any time I play a note, the error shows up for "Message.ignoreEvent(true)" complaining that it should not be called on a thread other than the midi callbacks (where it is).
                      When I change the input/output configuration by adding more nodes, I get the same thing.
                      The channel outputs are working properly at the output stage with one exception, and that is the original MIDI message needs to be ignored because the Messages are generated instead.
                      When all of the nodes are off, the routing matrix is not supposed to let any MIDI through, but it instead outputs channel 2 because it is not ignoring the original input message.

                      Screen Recording 2025-05-12 at 6.22.29 PM.gif

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

                        @d-healey
                        And here I've gone so far as to commenting out anything else from the callbacks and leaving just "Message.ignoreEvent(true)", that still gives the same errors:

                        Screen Recording 2025-05-12 at 6.42.37 PM.gif

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

                          @VirtualVirgin said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

                          In your first reply?

                          Ah right, miscommunication, I asked if your interface was deferred to try to find out if that could be causing the error - I put "it should be" in parenthesis to indicate that I expected it would be in use already based on the description of the issue.

                          Can you send me the project - the folder minus binaries, pooled resources? The problem with the snippet is it includes references to external files that I don't have so I have to comment out stuff which means I'm not testing the same thing you are.

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

                          VirtualVirginV 2 Replies Last reply Reply Quote 0
                          • VirtualVirginV
                            VirtualVirgin @d.healey
                            last edited by

                            @d-healey Ah, I'm sorry! I reloaded the snippet to see if that would work and all of the .js includes then said "embedded" at the top so I was assuming somehow the snippet export catches all of the .js files and "embeds" them into the snippet.

                            I'll take a look at the project later and figure out how to send you all of the relevant files.
                            Cooking dinner for the fam at the moment.

                            Thanks for your help :)

                            1 Reply Last reply Reply Quote 1
                            • VirtualVirginV
                              VirtualVirgin @d.healey
                              last edited by

                              @d-healey said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

                              @VirtualVirgin said in Confusing error: "Call of ignoreEvent() outside of midi event callback" happening directly on the midi callback:

                              In your first reply?

                              Ah right, miscommunication, I asked if your interface was deferred to try to find out if that could be causing the error - I put "it should be" in parenthesis to indicate that I expected it would be in use already based on the description of the issue.

                              Can you send me the project - the folder minus binaries, pooled resources? The problem with the snippet is it includes references to external files that I don't have so I have to comment out stuff which means I'm not testing the same thing you are.

                              I seem to have found the issue now after digging around.
                              There was a a call to "Synth.deferCallbacks(true)" buried in one of the inline function inside an external script, which obviously is bad practice. I should probably only use it right at the top of onInit, right?

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

                                @VirtualVirgin yeah once in on init is good

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

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

                                42

                                Online

                                1.7k

                                Users

                                11.7k

                                Topics

                                102.1k

                                Posts