I have come across strange behaviour when using HALion 7.0.10 standalone. The releaseVoice function works for the very first note, then stops working, then starts to work again once the note ID gets higher.
function onNote(e) local id = postEvent(e) print(id) wait(250) changeTune(id, 12) wait(250) releaseVoice(id) --fade(id, nil, 0, 10, true) end
ReleaseVoice.vstpreset (8.8 KB)
Steps to reproduce:
- Open HALion 7.0.10 standalone. If you had it running restart it so it resets the note ids.
- Add a script module and paste the script or use the attached preset.
- Use a midi keyboard to play some notes. (The on-screen keyboard and mouse doesn’t have the issue)
- It should play the note, change pitch after 250ms and stop the note after another 250ms even if the note is still held.
- It works for the very first note. Then it stops releasing the voice. It starts working again once the note id gets higher. Usually higher than 400 but it’s not an exact number.