MusicXML roundtrip turns mid-measure grace group with intra-grace slur into after-graces

Aperta
#35,700 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

Start by tracing MusicXML grace-note import and export behavior for the supplied minimal example, focusing on how a slur that starts and stops within a grace group affects grace placement and whether steal-time-following="0" is preserved. Reproduce the described import, export, and reimport sequence in MuseScore Studio 4.7.7; done when the four grace notes remain before the following principal note through the roundtrip.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

When a mid-measure group of before-beat grace notes (<grace16/>) carries a slur that starts on the first grace note and stops on the last grace note (rather than extending to the following principal note), MuseScore Studio 4.7.7 exports bare <grace/> elements without steal-time-following, and its MusicXML importer then imports that group as after-graces (<grace16after/>) attached to the preceding chord instead of before-graces attached to the following principal note.

Adding steal-time-following="0" to <grace> makes first import keep <grace16/> before the second principal note, but ordinary MusicXML export from that imported score omits steal-time-following="0", so reimporting the exported MusicXML turns the group into <grace16after/>. (Checked #34140, which was closed in 4.7.3; this specific intra-grace slur roundtrip remains reproducible in 4.7.7.)

Reproduce
  1. Save the original XSD-valid MusicXML 4.0 example below as intra-grace-slur.musicxml and open/convert it in MuseScore Studio 4.7.7 (MuseScore4.exe -o out.mscz intra-grace-slur.musicxml).
  2. Inspect the resulting .mscx (or rendered score): all four 16th grace notes between C5 and G5 are imported inside G5's <Chord> as <grace16after/> (visually placed as after-graces following C5 rather than before-graces leading into G5).
  3. Control A: move <slur type="stop" number="1"/> from the fourth grace note to G5; MuseScore imports <grace16/>.
  4. Control B: keep the slur on grace notes 1–4 and change <grace/> to <grace steal-time-following="0"/>; first import preserves <grace16/>, but exporting MusicXML again strips steal-time-following="0" and re-triggers <grace16after/> on reimport.
Minimal example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 4.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="4.0">
  <part-list>
    <score-part id="P1"><part-name>Piano</part-name></score-part>
  </part-list>
  <part id="P1">
    <measure number="1">
      <attributes>
        <divisions>4</divisions>
        <key><fifths>0</fifths></key>
        <time><beats>4</beats><beat-type>4</beat-type></time>
        <clef><sign>G</sign><line>2</line></clef>
      </attributes>
      <note>
        <pitch><step>C</step><octave>5</octave></pitch>
        <duration>8</duration>
        <type>half</type>
      </note>
      <note>
        <grace/>
        <pitch><step>F</step><octave>5</octave></pitch>
        <voice>1</voice>
        <type>16th</type>
        <beam number="1">begin</beam>
        <beam number="2">begin</beam>
        <notations><slur type="start" number="1" placement="below"/></notations>
      </note>
      <note>
        <grace/>
        <pitch><step>E</step><octave>5</octave></pitch>
        <voice>1</voice>
        <type>16th</type>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
      </note>
      <note>
        <grace/>
        <pitch><step>D</step><octave>5</octave></pitch>
        <voice>1</voice>
        <type>16th</type>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
      </note>
      <note>
        <grace/>
        <pitch><step>E</step><octave>5</octave></pitch>
        <voice>1</voice>
        <type>16th</type>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        <notations><slur type="stop" number="1"/></notations>
      </note>
      <note>
        <pitch><step>G</step><octave>5</octave></pitch>
        <duration>8</duration>
        <type>half</type>
      </note>
    </measure>
  </part>
</score-partwise>
Version

MuseScore Studio 4.7.7, b750c43e316cf6a00e70451870b231b12f400bda, Windows.

Lingua principale
C++
Stelle
15.5k
Fork
3.4k
Merge medio
2g 18h
PR unite (30g)
114

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di musescore/MuseScore

Tutte le issue di musescore/MuseScore

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.