[Csnd] making single instance envelope instruments for pseudo modulars

Hi all, it’s a been over 10 years since I used csound a lot, so I thought I should check what the smart way to do something nowadays is, given recent additions.

I want to make an equivalent of an analog envelope generator. So there should only ever be one instance running, and a new instrument message (ie score event) should take over the instance, but it should be possible for the instance to change it’s behaviour based on what it’s doing. As in, retriggering the instrument should not be the exact same as restarting the env, it should be able to pickup from where the previous instance was. I remember doing this years ago with various bits of reinit magic, but a) can’t remember how i did it, b) am not sure if what i did will be the right way for use in Max, and c) don’t know if there are new, better ways!

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