elemaudio / elementary

Elementary is a JavaScript library for digital audio signal processing.
https://www.elementary.audio/
MIT License
331 stars 29 forks source link

Improve bleptriangle #24

Closed pauliusuza closed 1 year ago

pauliusuza commented 1 year ago

Reduce the pole coefficient from .999 to .995 which fixes a discontinuity while the filters are cold. Attached videos demonstrate the effect:

With 0.999 return el.mul(gain, dpole(0.999, el.blepsquare(props, rate))); https://github.com/elemaudio/elementary/assets/536859/7a0bc0ff-b42f-4159-bc6f-3c77604f0326

With 0.995 return el.mul(gain, dpole(0.995, el.blepsquare(props, rate))); https://github.com/elemaudio/elementary/assets/536859/f52a7fc3-2540-4fef-8067-df5f9ab28abf

nick-thompson commented 1 year ago

Excellent, thank you @pauliusuza! Mind just changing the base branch to develop? I'm happy to merge then

pauliusuza commented 1 year ago

@nick-thompson done!

nick-thompson commented 1 year ago

Sorry for the delay @pauliusuza! I merged this one via cherry-pick in https://github.com/elemaudio/elementary/commit/3666f511f8b3257dbae26aded3b6dd8b7cebd798, closing the PR here accordingly. Thanks again 🙏