while note is held
-
Hi, i just started using hise, and its my first time posting in here , english is not my mother tongue so sorry if i write something wrong.
In kontakt you can use " while ($NOTE_HELD = 1) " to make something happend while a key is pressed and held, is there a function like that one in hise scripting?Thank you
-
No that is not possible. Script callbacks are supposed to return immediately so any kind of "thread management" (sleep, while, etc) is not available.
What you need to do is to set a variable to true in the
onNoteOn
callback, then query it somehow (either using a timer callback or other callbacks) and reset it to false in theonNoteOff
callback.