Looking for code for ADSR with nice curves

Anyone know any?

I can find linear ones but I want adjustable curves.

Thanks.