Skip to content

Commit

Permalink
Merge pull request #19438 from miiizen/17852-tuplet-bracketing
Browse files Browse the repository at this point in the history
Create tuplet bracket when on notehead side
  • Loading branch information
cbjeukendrup committed Sep 29, 2023
2 parents 4979bf7 + ea93cd5 commit b005132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/engraving/dom/tuplet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ bool Tuplet::calcHasBracket(const DurationElement* cr1, const DurationElement* c
}
bool tupletStartsBeam = beamStart->elements().front() == c1;
bool tupletEndsBeam = beamEnd->elements().back() == c2;
if (tupletStartsBeam && tupletEndsBeam) {
bool headSide = isUp() != (c1->up() || c2->up());
bool isCross = c1->vStaffIdx() != c2->vStaffIdx();
if (tupletStartsBeam && tupletEndsBeam && (!headSide || isCross)) {
return false;
}

Expand Down Expand Up @@ -240,7 +242,7 @@ bool Tuplet::calcHasBracket(const DurationElement* cr1, const DurationElement* c
endChordDefinesTuplet = endChordDefinesTuplet || nextEndChord->beams() < beamCount;
}

if (startChordDefinesTuplet && endChordDefinesTuplet) {
if (startChordDefinesTuplet && endChordDefinesTuplet && (!headSide || isCross)) {
return false;
}

Expand Down
Binary file added vtest/scores/tuplets-8.mscz
Binary file not shown.

0 comments on commit b005132

Please sign in to comment.