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

Fix metronome with changing meter #881

Merged
merged 1 commit into from
Mar 15, 2023
Merged

Conversation

presidento
Copy link

This is a working PoC of a workaround for #849. The problem is that %%MIDI drum is always processed before M:. I don't know whether it is intentional. If you like this approach, I can clean it up and even add tests.

@presidento
Copy link
Author

By the way if the meter changes, but the drum pattern is not redefined, perhaps the implemented one is the specified behavior, so it may not just be a workaround. I'm interested in your opinion.

This is a workaround. Ideally for the following ABC snippet:
    M: 3/4
    %%MIDI drum ddd 76 77 77 90 90 90
first the meter change is handled, then the drum section.
Unfortunately as I see, the %%MIDI part is handled first,
so when the new drum definition has to be handled, the
meter is the previous one.

With this commit the drumDefinition is recalculated every
time when meter changes, so the updated drum pattern
will be used.

Also it will follow the standards when somebody just
forgot to update the drum pattern, and the meter changes.
@presidento presidento changed the title PoC: fix metronome with changing meter Fix metronome with changing meter Feb 12, 2023
@presidento presidento marked this pull request as ready for review February 12, 2023 23:40
@presidento
Copy link
Author

I reverted this patch for myself, since #886 (metronome support) do what I need for metronome. But it can be helpful for others. So feel free to merge or close this PR.

@paulrosen paulrosen merged commit 4de8039 into paulrosen:dev Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants