zynaddsubfx / zyn-fusion-issues

Issue Only Repo
31 stars 0 forks source link

Legato note transitions are not always smooth with portamento enabled #363

Open Diomendius opened 2 years ago

Diomendius commented 2 years ago

I believe this is the same issue I discovered and fixed in Yoshimi: https://github.com/Yoshimi/yoshimi/issues/51 https://github.com/Yoshimi/yoshimi/pull/86

In legato mode with portamento enabled, the first legato transition for a played note will be smooth, but subsequent transitions do not correctly match the phase or other time-dependent parameters from one side of the transition to the other. This causes distortion such as this example, which was created using a simple sine wave ADSynth preset in legato mode with a long portamento duration: zynaddsubfx_portamento_bad_transition

As I recall, this was caused by the legato code creating a new note but failing to copy over all the necessary fields from the old note. There was also some code to "catch-up" a silent note before unmuting it, which was implemented incorrectly and may still exist in the zyn codebase.

Hopefully the original issue and PR from Yoshimi are still useful, though there is quite a lot to wade through and the codebases have diverged somewhat.

fundamental commented 2 years ago

Thanks for raising the issue. PRs would be welcome to the zyn codebase.