DaisySP icon indicating copy to clipboard operation
DaisySP copied to clipboard

Update adsr.h

Open jwjmayo opened this issue 3 years ago • 2 comments

changed line 68 from sus_level <= 0.f to sus_level < 0.f. This prevents the envelope from locking down indefinitely when a note is held down. I believe this is an old bug thats crept back in.

jwjmayo avatar Sep 29 '21 16:09 jwjmayo

I believe this is an old bug thats crept back in. The problem occurs when a note is held but decays to zero, changing the <= to < solves this.

jwjmayo avatar Sep 29 '21 16:09 jwjmayo

Would you feel comfortable writing a little unit test for this? I think the ADSR class could really benefit from that.

TheSlowGrowth avatar Oct 08 '21 21:10 TheSlowGrowth