Send MIDI to Outside World - Instrument Script Not Sending Correct Note-Off
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:
- Change Keys
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!
Comments
-
Maybe try this:
on init declare $noteID end on on note ignore_event($EVENT_ID) $noteID := play_note(67,$EVENT_VELOCITY,0, -1) end on
1 -
Thanks for the help @noY_T !
Your suggestion led me to find a fix for this issue.
First, I changed the settings for Send MIDI to Outside World to:
- Incoming notes [OFF]
- Incoming CCs [OFF]
- Script generated notes [ON]
- Script generated CCs [ON]
Finally, I added this minimal script only if the factory instrument script(s) in use don't generate notes/CCs:
on note play_note($EVENT_NOTE, $EVENT_VELOCITY, 0, -1) end on on controller set_controller($CC_NUM, %CC[$CC_NUM]) end on
This combination results in the correct MIDI note on/off (and CC) information being sent to the outside world.
It seems like this is definitely a bug. I also tested the scenario in Kontakt 7 and the same behavior happens there and the fix also works too.
Thanks again for the help - I REALLY appreciate it!
1 -
I’ve got this issue as well in multiple libraries, but the script doesn’t make a change - do I have to place it before the existing instrument script(s) perhaps?
And is there an easy fix/implementation for those libraries where you’d like to also send CC data?
0
Categories
- All Categories
- 19 Welcome
- 1.4K Hangout
- 60 NI News
- 735 Tech Talks
- 3.9K Native Access
- 15.9K Komplete
- 1.9K Komplete General
- 4.2K Komplete Kontrol
- 5.5K Kontakt
- 1.5K Reaktor
- 365 Battery 4
- 817 Guitar Rig & FX
- 417 Massive X & Synths
- 1.2K Other Software & Hardware
- 5.5K Maschine
- 7K Traktor
- 7K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators