I am planning to fix this very soon, so this list is mainly to check whether things are correct after the PR that is supposed to fix them.
Basically, the current Piano looping behaviour is extremely janky, as the transport's time gets reset back to the beginning of the loop every time we hit the end of the loop. Transport time is heavily considered by the current synthesizer implementation and the note data models, leading to the following major bugs:
The new system changes the note data model to decouple it from transport time. Currently, all notes store transport time for when they start and end, so a synth needs to inspect transport time to figure out which notes have been held for how long at each point in time that is synthesized. Instead, if note time points are in relation to the beginning of the requested audio chunk (remember that LibDSP Processors handle audio in small chunks to reduce function call overheads), this removes the need for a synth to inspect transport time at all. Examples of relative note timings in the format [start, end]:
Transport time can then still jump around, but the synth needn't care. The additional processing of converting notes to this relative format is negligible, as the correct notes to play need to be collected and adjusted anyways. Keyboard notes also need special treatment but it doesn't appear to be too complicated.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too