How to know if a Note ID is still valid

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.