Closed cutlasses closed 1 year ago
Hi @cutlasses, thanks a lot for this contribution. I am helping Electrosmith with PR review. Everything looks good here, I was able to reproduce the issue and confirm that this fixes it. Nice!
There's a linter check failure, could you please run clang-format -i Source/Control/adenv.cpp
from the root of the repo and commit the changes? After that I can get this merged.
Thanks!
Hi Nick,
I think I’ve done that now, it was a single space that Clang format has removed haha.
Thanks for taking the change.
Scott
On 24 Apr 2023, at 22:20, Nick Donaldson @.***> wrote:
clang-format -i Source/Control/adenv.cpp
Fix for an issue where if an envelope was re-triggered when it was at the very end of the attack stage it could get locked and never complete. This was because cinc could become so small (due to the delta between the current value and the target value being very small, and then divided by the sample rate) that when added to val the value of val does not change (due to floating point inaccuracies). Ensure cinc is at least as big as std epsilon, so that it will always cause val to change.
[This is my first ever pull request, so apologies if this is not the correct way to contribute to DaisySP]