MusicXML export: a staff hidden at a system start is never shown again (no print-object="yes")
Maintainers usually reply within 1 day
@yuzeguitarist is already working on this.
Since Dec 2, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 69/100
Research direction
Start by tracing the MusicXML export code that writes <staff-details print-object="no"/> at system starts, using the reported cases and related issues #17398, #22098, and #25660 as context. Check for a regression test covering a staff hidden for one system and shown in the next. Done means the third system exports <staff-details print-object="yes"/> for that staff, and the previously cited exports can be read without keeping it hidden.
Written by the indexing model from the issue text.
Description
Issue type
Import/export issue
Description with steps to reproduce
Since #26190 (the fix for #17398), the MusicXML export writes <staff-details print-object="no"/> at the first measure of every system in which a staff is hidden. Nothing is written where the staff is shown again: the first measure of that system has only <print new-system="yes"/>.
In MusicXML, staff-details belongs to <attributes>, and its values stay in force until they are changed. A reader that follows the specification therefore keeps the staff hidden from the first system where it was hidden to the end of the piece, and everything the staff plays after that is not shown. #17398 asked for print-object="yes" or "no" at each point where a staff is shown or hidden; the "yes" half is missing.
I have not run these steps in MuseScore Studio myself; the OpenScore exports below show the result.
- Make a score with two staves and turn on Hide empty staves.
- Leave the second staff empty in the second system only.
- Export as MusicXML.
Actual behaviour: the first measure of the second system has <staff-details print-object="no"/> for the second staff, and the first measure of the third system has no staff-details for it.
Expected behaviour: the first measure of the third system has <staff-details print-object="yes"/> for the second staff.
Supporting files, videos and screenshots
OpenScore's own MusicXML exports, with the scores they were exported from:
- Schubert, Im Gegenwärtigen Vergangenes, D. 710, exported by MuseScore Studio 4.6.3: lc28789279.mxl (score: lc28789279.mscz). Tenore II has
print-object="no"at the systems starting at measures 5, 10, 14, 17, 20, 23, 26, 29 and 33. The systems starting at measure 38 and at the measure numbered X1, where Tenore II starts singing, write nostaff-detailsfor it. The file has 61print-object="no"and noprint-object="yes", so a reader that follows the specification hides Tenore II from measure 5 to the end, including all 93 measures in which it sings. - Berg, String Quartet Op. 3, exported by MuseScore Studio 4.7.4: sq8955300.mxl (score: sq8955300.mscz): 110
print-object="no", noprint-object="yes".
Tenore II in D. 710, where it is hidden and where it comes back:
<measure number="33">
<print new-system="yes"></print>
<attributes>
<staff-details print-object="no"/>
</attributes>
...
</measure>
...
<measure number="38">
<print new-system="yes"></print>
...
</measure>
In which versions of MuseScore Studio is this issue present?
4.6.3 - 4.7.4 (seen in exports from 4.6.3, 4.6.5 and 4.7.4; not checked in a nightly build)
Regression
No.
Operating system
Not OS-specific as far as I can tell (export code); the files above were exported by OpenScore.
Additional context
Across the OpenScore Lieder and String Quartets exports: 4.6.3 writes print-object="no" 104 times, 4.6.5 122 times and 4.7.4 116 times, and none of these files contains print-object="yes". Related: #17398, #22098, #25660.
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report (linked above: the files are public in the OpenScore repositories)
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
- Dominant language
- C++
- Stars
- 15.5k
- Forks
- 3.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 124
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from musescore/MuseScore
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Edit string data dialog opens empty, with no strings and 0 frets, from "Instrument/Staff properties"Possibly taken @igorkorsukov claimed this 3 days ago. OpenP2 regression nightly UX/interaction
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
musescore/MuseScore#35829 · 1 assignee ·
Maintainers usually reply within 1 day
-
MusicXML export: overlapping dashed text lines (<dashes>) are all exported with duplicate number="1"Opencommunity MusicXML
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
MusicXML import loses explicit slur direction when the stop precedes the start in document orderOpenneeds review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
needs review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in musescore/MuseScore
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 2 days
-
bug low priority
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
eclipse-score/logging#531 ·
Maintainers usually reply within 2 days
-
scope:docs status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PX4/PX4-Autopilot#30166 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day