ADSR Performance


I just thought of a small performance improvement in the ADSR::applyEnvelopeToBuffer method. I think a check at the start if the state is currently sustain (or maybe idle) would greatly improve the performance. Most of the time, the state should be sustain and that state does not require the loop as the envelope value does not change during this state until ::noteOff is called.

Would be interesting to read your thoughts on this.

Yes that seems like a good improvement, we’ve added this to develop here:

1 Like