musescore / musescore/MuseScore

Implement accidental-mark elements for trill imports from MusicXML

Open
#19,764 1 comment 1 reaction 2 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Your idea

When importing MusicXML data containing trills with accidentals, the accidentals are ignored. Trill accidentals are encoded using <accidental-mark> as a sibling element of <trill-mark>.

See MusicXML documentation example related to this issue: https://www.w3.org/2021/06/musicxml40/musicxml-reference/examples/accidental-mark-element-ornament

Problem to be solved

Here is an example:

Click to view MusicXML data for the following rendering in Musescore 4.0.1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.1">
  <work>
    <work-title>Trill + Accidental</work-title>
    <!-- https://www.w3.org/2021/06/musicxml40/musicxml-reference/examples/accidental-mark-element-ornament -->
  </work>
  <part-list>
    <score-part id="P1">
      <part-name/>
    </score-part>
  </part-list>
  <part id="P1">
    <measure number="1">
      <attributes>
        <divisions>4</divisions>
        <key number="1">
          <fifths>0</fifths>
          <mode>none</mode>
        </key>
        <staves>1</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
        </clef>
      </attributes>
      <note>
        <pitch>
          <step>G</step>
          <octave>4</octave>
        </pitch>
        <duration>16</duration>
        <voice>1</voice>
        <type>whole</type>
        <stem>up</stem>
      </note>
    </measure>
    <measure number="2">
      <attributes>
        <divisions>4</divisions>
      </attributes>
      <note>
        <pitch>
          <step>G</step>
          <octave>4</octave>
        </pitch>
        <duration>16</duration>
        <voice>1</voice>
        <type>whole</type>
        <stem>up</stem>
        <notations>
          <ornaments>
            <trill-mark/>
            <accidental-mark placement="above">flat</accidental-mark>
          </ornaments>
        </notations>
      </note>
    </measure>
    <measure number="3">
      <attributes>
        <divisions>4</divisions>
      </attributes>
      <note>
        <pitch>
          <step>E</step>
          <octave>4</octave>
        </pitch>
        <duration>16</duration>
        <voice>1</voice>
        <type>whole</type>
        <stem>up</stem>
        <notations>
          <ornaments>
            <trill-mark/>
            <accidental-mark placement="above">sharp</accidental-mark>
          </ornaments>
        </notations>
      </note>
      <barline location="right">
        <bar-style>regular</bar-style>
      </barline>
    </measure>
  </part>
</score-partwise>
Screenshot 2023-10-18 at 6 24 25 AM

There should be a flat above the trill in the second measure (to create a minor-second trill), and a sharp above the trill in the third measure (to create a major-second trill).

Prior art

Here is an example rendering from Dorico 4.0.31 for the same MusicXML example given in the previous section:

Screenshot 2023-10-18 at 6 28 34 AM

In this case the <accidental-mark> is correctly being read for the <trill-mark>.

Additional context

No response

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.