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

incorrect beaming in pickup measure #22080

Closed
mattblo opened this issue Mar 27, 2024 · 2 comments · Fixed by #22083
Closed

incorrect beaming in pickup measure #22080

mattblo opened this issue Mar 27, 2024 · 2 comments · Fixed by #22083
Assignees
Labels
engraving P2 Priority: Medium

Comments

@mattblo
Copy link

mattblo commented Mar 27, 2024

Issue type

Engraving bug (incorrect score rendering)

Bug description

If you have a score with a pickup maesure on an unaccented beat the auto beaming is wrong.

Steps to reproduce

  1. Create a new 6/8 score with a pickup measure 4/8
  2. Write 4 eight Notes
    Wrong:
    image
    image

Right:
image
image

Screenshots/Screen recordings

No response

MuseScore Version

OS: Windows 10 Version 2009 or later, Arch.: x86_64, MuseScore version (64-bit): 4.2.1-240230937, revision: github-musescore-musescore-d757433

Regression

No.

Operating system

Windows 11

Additional context

This also happens in a 3/4 measure with an 3/8 Pickup measure.

@MarcSabatella
Copy link
Contributor

Definitely not a regression - MuseScore has never had an algorithm to try to decide if a given incomplete measure should be treated as the first or second half of a full measure in terms of beaming. Note the same applies when splitting a measure for the purpose of adding mid-measure repeats or system breaks, or indeed any incomplete measure.

I was pretty sure there was already an issue here on GitHub regarding this but I'm not finding it. So I'll just repeat something I know I've observed before - there does exist a simple heuristic for deciding this in the swing playback code:

// adjust for anacrusis
const Measure* cm = chord->measure();
const MeasureBase* pm = cm->prev();
ElementType pt = pm ? pm->type() : ElementType::INVALID;
if (!pm || pm->lineBreak() || pm->pageBreak() || pm->sectionBreak()
|| pt == ElementType::VBOX || pt == ElementType::HBOX
|| pt == ElementType::FBOX || pt == ElementType::TBOX) {
Fraction offset = cm->timesig() - cm->ticks();
if (offset > Fraction(0, 1)) {
tick += offset;
}
}

It doesn't handle split measures on the same system well, though - so, split measures for the purpose of repeats don't play well in swing.

It could be nice to have one function to make this determination consistently for both beaming and for swing.

@oktophonie oktophonie added the P2 Priority: Medium label Mar 27, 2024
@XiaoMigros
Copy link
Contributor

I'd be happy to work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engraving P2 Priority: Medium
Projects
Development

Successfully merging a pull request may close this issue.

5 participants