ignore_event still triggers a voice?
Hi. I got a counter variable in my code that is supposed to be increased in the on note callback and decreased in the on release callback. In the on note callback I also use ignore_event($EVENT_ID) and then follow this up with my own play_note(...) function.
When I play a note it does counts up by 1.
When I release a note however, it counts down by 2.
My guess is that while the original event is ignored (as in doesn´t trigger playback) it still calls the release callback, together with my custom play_note function. Also, the mapping editor always shows the red line for the original event as well as my custom event. Kontakt then counts this as 2 voices in my case. Is there any way to clean this up?
Answers
-
Ignore_event() doesn't play the event but it also doesn't KILL it - you can still access its event ID and so on.
You can query $EVENT_PAR_STATUS and act upon it in release callback, for example you can make it only respond to events coming from outside (if $EVENT_PAR_STATUS is -1).
0 -
I searched the reference manual and there is no entry for $EVENT_PAR_STATUS.
0 -
Oh, apologies! It's of course $EVENT_PAR_SOURCE.
1 -
Thank you very much!
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 62 NI News
- 785 Tech Talks
- 4.1K Native Access
- 16.5K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 378 Battery 4
- 845 Guitar Rig & FX
- 429 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.3K Traktor
- 7.3K 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