SamiPerttu / fundsp

Library for audio processing and synthesis
Apache License 2.0
805 stars 44 forks source link

Clamp ADSR output #25

Closed gjf2a closed 2 years ago

gjf2a commented 2 years ago

The intent is for the adsr_live() parameters to range between zero and one, and likewise the output should be in that same range. To ensure that the output is in this range, even if exceedingly large parameters are passed in, I added a call to clamp01 to wrap the output value.