superctr/ctrmml

VGM Looping behavior

superctr opened this issue · 1 comments

This is specific for the VGM export. Sequence file exports should not have this problem.

Expected behavior is to not loop at all unless the loop marker L is set in any of the tracks, and in that case set the loop point once all non-looping tracks have finished playing.

Example:

@1 psg 15>12 / 11>0:15
GH t95 o3 @1v12
G l16 cdefgab>cd
H l16 efga

Currently this sets a loop point when the H track ends, even though no L loop marker has been set in any track.

The loop point should be set only once all non-looping tracks have finished and the looping tracks have reached the loop start position at least once.

A track with active portamento at the loop end point doesn't loop properly. (first note after looping will be incorrect). To fix the issue, a larger delay after setting the loop point might be needed, or the portamento effect should be disabled at the loop point. This should only be done for VGM logging though.