Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Fine' marking in final volta of a repeat handled incorrectly #116

Open
mattblessing opened this issue Jul 26, 2024 · 0 comments
Open

'Fine' marking in final volta of a repeat handled incorrectly #116

mattblessing opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mattblessing
Copy link

mattblessing commented Jul 26, 2024

Describe the issue
Hi there,

I was using 'ms3 extract [...] -M [...]' to obtain a score's measure information. The score has a 'D.C. al Fine' marking at the end and the 'Fine' marking is at the final volta of a particular repeat. The score's playback in MuseScore is as follows: once 'D.C. al Fine' is reached, the score is played again from the beginning, and instead of playing the repeats normally it skips to the final volta of each repeat. Therefore, this final volta marked with 'Fine' is played twice.

I was expecting the measure information to have "next": [..., -1] for this measure, but instead it had "next": [-1] due to lines 935-940 of 'bs4_measures.py':

volta_mcs = dict(df.loc[df.volta.notna(), ["mc", "volta"]].values)
if fine_mc in volta_mcs:
    # voltas can be reached only a single time, hence the name
    self.next[fine_mc] = [-1]
else:
    self.next[fine_mc].append(-1)

I should also note that the score originally (incorrectly) had the 'Fine' marking at the first volta of the repeat, and because this measure isn't even played a second time, the 'Fine' marking was ignored and this resulted in no measures having "next": [..., -1].

I overcame this bug by simply replacing the above lines with 'self.next[fine_mc].append(-1)' because it is evident that voltas can be played more than once when there are markings like 'D.C. al Fine'. However, it may also be valuable to check if a 'Fine' marking is ignored and produce some kind of warning to the user if this is the case.

ms3 version
2.5.1

To Reproduce
This can be reproduced by executing 'ms3 extract [...] -M [...]' on a score with 'D.C. al Fine' at the end and 'Fine' at a volta in the score.

Thanks a lot!

@mattblessing mattblessing added the bug Something isn't working label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants