shorepine / amy

AMY - A high-performance fixed-point Music synthesizer librarY for microcontrollers
https://shorepine.github.io/amy/
MIT License
184 stars 11 forks source link

amy.c: filter_logfreq slew-rate limited #127

Closed dpwe closed 2 months ago

dpwe commented 2 months ago

The filter frequency cannot change faster than -2 oct/AMY_BLOCK to avoid filter state glitches. See #126.

Verified that this results in sane behavior of the new test.py:TestFilterReleaseGlitch, which gave a clipping transient before this change.

Screenshot 2024-06-19 at 21 11 54

Top is pre-change, front is post-change. There's still a small transient, but it's not objectionable.

Because the allowed slew rate is so large, none of the other tests are affected. Some Juno voices certainly hit this limit, but I think they are only improved. I quickly ran through them to check nothing was suddenly broken.

dpwe commented 2 months ago

Fixes #126