musescore / musescore/MuseScore

MusicXML import: a <dynamics> element with multiple children imports as separate dynamics instead of one marking

Open
#34,439 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

community MusicXML
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Issue type

Import/export issue

Description with steps to reproduce
  1. Open the attached ffz.xml. It validates against the MusicXML 4.0 schema. Each of its three dynamic markings is one <dynamics> element containing several children, as listed below.
  2. Look at the marking below bar 1, beat 1. It should read as the single dynamic sfmp.
  3. Instead it renders as overlayed dynamics, one per child dynamic in the marking.

The file has one part, two bars, and three markings: each a single <dynamics> element with more than one child.

Location Children Reads as
bar 1, beat 1 <sf/><mp/> sfmp
bar 1, beat 3 <other-dynamics>s</other-dynamics><f/><other-dynamics>m</other-dynamics><p/> sfmp
bar 2, beat 1 <ff/><other-dynamics>z</other-dynamics> ffz
Supporting files, videos and screenshots

ffz.xml

In which versions of MuseScore Studio is this issue present?

4.7.4 and latest dev main

Regression

No.

Operating system

macOS 14.8.7

Additional context

For reference, the MusicXML 4.0 spec states, "The <other-dynamics> element allows other dynamic marks that are not covered here. Dynamics elements may also be combined to create marks not covered by a single element, such as <sf/><mp/>." That is exactly the use case ffz.xml is exercising: the marking at bar 1, beat 1 is literally <sf/><mp/>. One of the advantages of doing it this way is that it represents the exact glyph sequence of the dynamic. The MusicXML exporter might benefit from this as well, but that is outside the scope of this issue.

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
  • I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the attached ffz.xml as the minimal reproduction and start by importing it in MuseScore, then trace the MusicXML dynamics import entry point. Done means the three multi-child elements render as single markings: sfmp, sfmp, and ffz, rather than overlaid dynamics.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.