I have a pretty good idea how to do it from previously reading and using Émilie’s work. In the past I based the envelopes in Spectrum for iOS on the code from Peaks envelope generator. I remembered the basic idea, even easier for me this time because it’s a fixed ADSR. But I didn’t want to clone Peaks again, I wanted something where I’m comfortable tweaking the curves to get the feel I’m looking for.
So I end up on DSP stack exchange, and read a post. And the answer is amazingly in depth, with details about how analog envelopes target a value higher or lower than the target in order to actually reach the target value, not just asymptotically. Graphs are provided. The author goes further to suggest a better implementation based on lookup tables - wait a second this is starting to look really familiar - yep the author of the excellent stack exchange answer was none other than pichenettes .
So… just wanted to say thank you for the huge depth of knowledge and effort you have put into sharing what you know. Now I’m off to calculate a lookup table
Hope you have a great day!
(Link to stack exchange: audio - Help with equations for exponential ADSR envelope - Signal Processing Stack Exchange )