[Csnd] way to do something on last kpass?

I’m continuing my experiments in trying to cook up a clean legato syntax that will require the Max host to know as little as possible about csound internals, and am wondering (because there is so much nice new csound stuff I don’t really know yet) if there is an elegant way to do something on only the last kpass of an instrument. I think probably the best solution to my problem is to have some kind of state container for active voices.

Or if not, how one might do this less elegantly… :wink:

thanks!
iain

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Apr 28 2022, Iain Duncan has written:
...

if there is an elegant way to do something on only
the last kpass of an instrument.

...
I think lastcycle is what you're looking for. together with xtratim (to
generate a marked release phase) and the opcode release to indicate that
the instrument is in the release phase (time extension of the realtime
event) you should have a good toolkit.

Best wishes,

Jeanette

Ah sweet, thanks Jeanette.

And thanks Eduardo if you see this, that’s a darn handy new feature!

iain