MusicXML import ignores explicit key-signature cancellation naturals
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in src/importexport/musicxml/internal/import/importmusicxmlpass2.cpp at the parser location linked in the issue, then trace how key attributes are imported. Use the self-contained two-bar MusicXML fixture to reproduce the missing naturals in the exported PDF. Done when importing the fixture displays two naturals before the one-flat key change and preserves the note pitches.
Written by the indexing model from the issue text.
Description
Issue type
MusicXML import / engraving
Steps to reproduce
- Save the original two-bar XML below as
cancel.musicxml. - Open it in MuseScore Studio 4.7.7 and look at the change of key in bar 2, or export directly from the MusicXML to PDF.
Expected: With <cancel location="left">2</cancel> the new one-flat key signature should be preceded by two naturals cancelling the two old sharps, as specified by MusicXML 4.0.
Actual: The first imported PDF has two sharps at the initial signature, one flat at the change, and zero printed naturals. Immediate MusicXML re-export keeps both fifths values and both note pitches, but the explicit cancel is gone. This is a key-signature display issue, not incorrectly changed pitches. The input passes MusicXML 4.0 schema validation.
The 4.7.7 parser currently skips cancel. Tested via CLI on Windows; older versions and latest nightly not tested.
Self-contained MusicXML 4.0 fixture
<?xml version="1.0" encoding="UTF-8"?>
<score-partwise version="4.0">
<part-list><score-part id="P1"><part-name>Test</part-name></score-part></part-list>
<part id="P1">
<measure number="1">
<attributes>
<divisions>1</divisions>
<key><fifths>2</fifths></key>
<time><beats>2</beats><beat-type>4</beat-type></time>
<clef><sign>G</sign><line>2</line></clef>
</attributes>
<note><pitch><step>F</step><alter>1</alter><octave>4</octave></pitch><duration>2</duration><type>half</type></note>
</measure>
<measure number="2">
<attributes>
<key><cancel location="left">2</cancel><fifths>-1</fifths></key>
</attributes>
<note><pitch><step>F</step><octave>4</octave></pitch><duration>2</duration><type>half</type></note>
</measure>
</part>
</score-partwise>
- 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 2 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 76/100
musescore/MuseScore#35683 · 1 comment ·
Maintainers usually reply within 1 day
All issues in musescore/MuseScore
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
eclipse-score/logging#531 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
azahar-emu/azahar#2944 ·
Maintainers usually reply within 1 day
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
conan-io/conan-center-index#31637 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Niko1221/Strata#7777 · 1 reaction ·
Maintainers usually reply within 4 days