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).
-
@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);
-
@VirtualVirgin Did you restart HISE after removing it ?
-
@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.
-
@VirtualVirgin Can you post a snippet or send me your project?
-
@VirtualVirgin I just tested your snippet. It is the deferred callbacks thing.
Change
Synth.deferCallbacks(true);
toSynth.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. -
@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:Also, can you define what "realtime thread stuff" is? Are you referring to everything used on the MIDI callbacks?
-
@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
-
@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. -
@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: -
@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.
-
@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 :)
-
@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? -
@VirtualVirgin yeah once in on init is good