sensorium / Mozzi

sound synthesis library for Arduino
https://sensorium.github.io/Mozzi/
GNU Lesser General Public License v2.1
1.07k stars 186 forks source link

Wavefolder #157

Closed tomcombriat closed 1 year ago

tomcombriat commented 1 year ago

Hello!

This is a response to #153: a simple wavefolder with settable high and low limits. The wave can be folded multiple times. Not fully tested so far. Seems to work well on the scope.

Lacks at least an example before considering merging but if someone see an obvious optimization, I am all hear! I had to resort to use one division, which are notoriously slow on microcontrollers but I am not sure if the trick of computing the inverse on the changes of bounds only is actually worth it, open to comment!

Best, Tom

tomcombriat commented 1 year ago

PS: I do not understand why I have so many commits, I did a hard reset before creating this branch :(