johentsch / ms3

A parser for annotated MuseScore 3 files.
https://ms3.readthedocs.io
GNU General Public License v3.0
41 stars 3 forks source link

Incorrect unfolding if a jump is to happen only the third time [BUG] #69

Open johentsch opened 1 year ago

johentsch commented 1 year ago

Take this example incorrect_unfolding.zip

measure 1 2 3 4 5 6 7
jump 𝄋 |: to 𝄌 :| D.S. al Coda 𝄌

Expected unfolding

1 2 3 4 5 3 4 5 6 2 3 4 7

Actual unfolding

1 2 3 4 5 3 4 7

Suggested solution

The next column for m. 4 needs to read 5 5 7 rather than 5 7. If the pointer hits an end-repeat (m. 5) everything repeated bar could get its next bar prepended. Or only "non-default" bars, such as m. 4 in the example.