Issues with playing a midi file via midi player and onNoteOff not being called
-
Hi,
I'm trying to make a midi effect type plugin where I play a midi drum loop based on a single keypress. It's kind of working, however, I can't figure out how to properly do it where it doesn't cause issues in abelton (I am using the vst instrument workaround for abelton). Note on is working the way I want it to, but the note off events aren't being written, so it shows up as a giant messed up blob of midi when you try to record the output.
The following, the clip labeled track 1 is me dragging one of the clips in manually. What you see after is the issue I'm trying to solve (I can confirm there are no note offs being sent from the midi player by logging also).
Here is what my chain looks like. And for context, in the onNoteOn/off in the main interface I am doing Message.ignoreEvent(true); (to stop the main key being pressed from propogating and dual triggering), but even if I say Message.ignoreEvent(false) in the note off, none of the loops note off messages are being sent, only note on. Anyone know how I could fix this properly? (also just to be clear, in Script Processor 1 onNoteOn/off, I am doing Message.sendToMidiOut(), but onNoteOff callback never fires)
-
@thrice801 I think you need to have the ScriptProcessor that has
Message.sendToMidiOut()
in both NoteOn and NoteOff callback, to be 1 level below the MIDI Player.
-
@ulrik said in Issues with playing a midi file via midi player and onNoteOff not being called:
@thrice801 I think you need to have the ScriptProcessor that has
Message.sendToMidiOut()
in both NoteOn and NoteOff callback, to be 1 level below the MIDI Player.
ulrik is right and hopefully this will solve your problem.
Message.sendToMidiOut()
needs to be in a MIDI processor script after any scripts that generate your MIDI.
I always use a container which just contains the Message.sendToMidiOut() for all MIDI callbacks (onNoteOn(), onNoteOff(), onController()) at the lowest point in the module tree. -
@ulrik that did it thanks! swore I tried it yesterday but think I did something wrong