I have a problem with Kontakt 6.7.1 where instrument scripts are sending note-off messages, to the outside world, for the incoming note instead of the note changed by the script.
I've tried a couple factory instrument scripts:
- Randomize Pitch
- Change Keys
and both exhibit the same incorrect behavior.
After some troubleshooting, I've narrowed down the problem to the instrument script change_note() function. Here's a minimal instrument script to reproduce the problem:
on note
{ Always play G3 }
change_note($EVENT_ID, 67)
end on
For example, if the note C3 is received by this instrument script, which always changes the note to G3, a note-off message for C3 instead of G3 is sent to the outside world.
These are the options I have enabled for sending MIDI to the outside world in Kontakt:
Here's a screenshot illustrating this problem with a MIDI monitor in Cubase:
- Kontakt is being sent the note C3
- The instrument script always sends G3
- The MIDI output of Kontakt is being sent to a MIDI track with a MIDI monitor
- The MIDI monitor shows note-on G3 and a note-off C3 (the incoming note) instead of G3 (note changed with change_note() function)
This only seems to be a problem with instrument scripts, and multi-scripts behave correctly when sending MIDI to the outside world. If use the factory multi-script:
the correct note-off message is sent to the outside world.
Here's a screenshot of the correct MIDI being sent to the outside world when using a multi-script:
It seems like this is a bug, but maybe there's something I'm doing wrong.
Thanks for the help!