MidiPlayers NoteOff message?
I am unable to get NoteOff messages when playing sequences from the MidiPlayer, NoteOn messages is visible in the NoteOn Callback but there is no NoteOff messages in the NoteOff Callback, is this a bug?
Are you sure? Of course there are note-off messages - still no CC messages though
How did you test it? Console.print() in the noteOff callback?
@Christoph-Hart Yes that's how I tested it
If you create the MIDI sequence programatically like this:
Does it still not fire the noteOff callback?
ulrik last edited by ulrik
@Christoph-Hart It still doesn't send NoteOff
@Christoph-Hart Have you had the time to fix this issue?
@Christoph-Hart Bump! and continuous controllers
Ah, now I get it. It will not fire the onNoteOff callback if the script processor is in the same MIDI chain as the MIDI Player (= a sibling of the MIDI Player). If you add a Sine wave to the example and put the logger script into the Sine Wave's slot, it will fire both callbacks.
The reason is that the note offs will be pushed to a "future" buffer holding all upcoming notes, which will not be processed by the script processors of the same sibling (because otherwise
Message.delayEvent(441000)would cause an infinite loop).
Can you work around this?
@Christoph-Hart could you provide a small snippet of how to do that?
I am not sure what you're trying to do so not sure how a snippet could help. If you want to react to MIDI note offs coming from a MIDI player you need to put that processing into a child containers MIDI processor slot.
@Christoph-Hart Ok, now I understand what you mean, I managed to set it up so that I can receive NoteOff messages.
I just have to make another solution to what I want to do, I think it will work if I manage to route the midi messages from a child containers MIDI processor slot to a sampler located in the main container, any advise?
" If you want to react to MIDI note offs coming from a MIDI player you need to put that processing into a child containers MIDI processor slot."
Yes that is what I want to do.
Just put everything except for the MIDI Player (and the interface script) into a new container, so:
- Root Container - MIDI Player -- Content Container -- Sampler -- ...
@Christoph-Hart Beautiful, I will try that, thanks a lot!
@Christoph-Hart after a hard struggle I managed to get this working
The struggle was about, how to make references between ScriptProcessors and the Interface, it was not so intuitive for me, is there some tutorials regarding this subject, or demo projects that I can study?
d.healey last edited by
make references between ScriptProcessors and the Interface
What do you mean?
@d-healey in this case I had a MidiPlayer in the root container and all samplers in a child container, just to get the NoteOff values from the midi sequence and use the NoteOff values to set some values in the GUI.
Just as Christoph-Hart explains above this post.
I was not able to use the MidiPlayers NoteOff values to trigger buttons or knobs in the Interface GUI, (maybe it's possible but I could not figure it out how to do it), so I created those knobs and buttons in a ScriptProcessor in the same thread as the samplers and controlled them with the NoteOff values.
Then I had to connect them to the knobs and buttons I had in the GUI to get it to work as I wanted.
Maybe I'm overdoing everything but I could not find an easy way to make the connection.
I should say that the MidiPlayers NoteOff values doesn't show up in the main NoteOff Callback, so that's why I had to move the samplers.
You can check the snippet above to see that there's no response in NoteOff CB