shorepine / amy

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

Added wave=BYO_PARTIALS for cleaner BYO_PARTIALS syntax. #219

Closed dpwe closed 2 months ago

dpwe commented 2 months ago

The old hack of using a negative patch number with wave=PARTIALS still works, and indeed BYO_PARTIALS num_partials=... uses the same wire-code letter as patch, and the message decoder simply flips the sign of it for BYO. Thereafter PARTIALS and BYO_PARTIALS are treated the same.

TODO: Cleanup the distinction between PARTIALS and BYO_PARTIALS in the code, which is currently mediated by looking for a negative patch value in the individual PARTIAL oscs, even though they don't need or care about patch number for anything else.