How to know if a Note ID is still valid

Post topics about HALion scripting.
Post Reply
User avatar
dorremifasol
Member
Posts: 456
Joined: Wed Dec 15, 2010 5:20 pm
Contact:

How to know if a Note ID is still valid

Post by dorremifasol » Sun May 26, 2019 9:55 pm

Greetings.

Is there a way to know if a given NoteID is still valid or if the voice has stopped playing completely (after the envelope release phase)? Thanks.
Intel i5 750, Windows 7 64 bit, 16g RAM, Cubase 9, Halion 6, Wavelab 9.5 RME Fireface 802

misohoza
Member
Posts: 862
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: How to know if a Note ID is still valid

Post by misohoza » Wed May 29, 2019 10:49 am

dorremifasol wrote:
Sun May 26, 2019 9:55 pm
Greetings.

Is there a way to know if a given NoteID is still valid or if the voice has stopped playing completely (after the envelope release phase)? Thanks.
Probably not, at least not directly.

There are functions like waitForRelease and isNoteHeld which can help you find out if note has received a note off message. But if the envelope is set to oneshot mode then it's possible the voice will be released (stop playing) even if the note is still held. There are couple of functions that deal with used voices. So you could keep track of the number of used voices and update the value with each new note on and note off. You could also read the values of amp envelope and work out the total time you need to wait since note on and then check for used voices. However this can get complicated if you use quick controls to offset envelope times.
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 9, Wavelab Pro 9, Halion 6, Dorico,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

User avatar
dorremifasol
Member
Posts: 456
Joined: Wed Dec 15, 2010 5:20 pm
Contact:

Re: How to know if a Note ID is still valid

Post by dorremifasol » Wed May 29, 2019 6:11 pm

Thank you for the reply. Yeah I thought about checking the amp envelope values, but I can't find anything that I could use to check if the envelope has finished. It's a pity that Halion doesn't provide a function to query any kind of information about a given Note ID.
Intel i5 750, Windows 7 64 bit, 16g RAM, Cubase 9, Halion 6, Wavelab 9.5 RME Fireface 802

Post Reply

Return to “Halion Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest