musescore / musescore/MuseScore
Excerpt layout temporarily changes linked TAB bend fret values
@miiizen is already working on this.
Since Sep 11, 2026.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Engraving / linked score state
Description and native reproduction
Laying out an excerpt temporarily changes the linked master score's TAB bend-continuation frets, even though no musical edit is requested. This is confirmed in native C++; a visible desktop reproduction is not confirmed.
Use vibrato-2.mscz (ZIP), the existing official vtest/scores/vibrato-2.mscz fixture:
- Read the score and lay out the master.
- Create an ordinary Guitar excerpt with
Excerpt::createExcerpt. - Locate the first-measure TAB bend chain: pitch 59 → grace-note pitch 60 → main-note pitch 62 (track 4).
- Lay out the master, then call
part->doLayout(). - Inspect the master note frets before laying out the master again.
Expected: the bend-chain notes keep the starting fret 0 on string index 1. A bend continuation's sounding pitch intentionally differs from its unbent fret pitch.
Actual: the master continuation frets become 1 and 3 rather than 0. The native assertion on the final pitch-62 note reports:
Expected equality of these values:
chain[i]->fret()
Which is: 3
semitones
Which is: 0
Scope and desktop observation
Returning to the master in the desktop application appears to relayout it and restore the displayed frets. Ordinary Parts → Open Guitar → return to master did not visibly show the mutation in the desktop check. No claim of persistent file corruption, a save/reopen regression, or user-visible undo damage is made here. This report concerns actual linked note properties between native layout calls; the practical UI impact still needs assessment.
Version and validation
Official main 48dcc3d469d7b61d8fb371ba84edba0bc6ba1c06, Ubuntu 24.04.2, Qt 6.10.2, GCC 14, Debug/AddressSanitizer. First affected release is not established.
The native Engraving_TabTransposeTests.bendFretsSurviveExcerptLayoutAndTranspose regression fails without the candidate production change. With it, all 73 Parts and TAB-transposition tests pass. The added test covers both linked scores, the real bend chain's +2-semitone transposition (frets become 2), undo, redo, and repeated layout.
Root cause and prior work
StringData::sortChordNotes treats a bend continuation's deliberate pitch/fret difference as invalid fretting. Subsequent fretting updates propagate to linked notes. The candidate exempts only this mismatch check for notes with an incoming bend, retaining invalid-string/fret handling and allowing the bend's starting note to refret during transposition.
Related history: #29075 was addressed by #29465 with a broad bend-note skip. Commit 671ee95072c7d0c6c877103fd153cdcd74180a3d in #31292 later removed that skip to fix transposition. The narrower candidate is tested against actual bend-chain transposition; it does not restore the old blanket skip. This is a newly isolated excerpt-layout trigger in that known problem area, not a claim of first discovery. Maintainer guidance on whether it belongs with the earlier report is welcome.
Candidate fix: #34856.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.