verovio icon indicating copy to clipboard operation
verovio copied to clipboard

Extend tags are not ended by rests in MusicXML-to-MEI converter

Open bryantgeorge opened this issue 2 years ago • 0 comments

Describe the problem Extend tags in musicxml continue through rests if no lyrics follow

To Reproduce Load the attached musicxml data at https://www.verovio.org/musicxml.html

Expected behavior The second extend should end before the rest like it does when rendered in MuseScore

Input data

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.1">
  <identification>
    <encoding>
      <software>MuseScore 3.6.2</software>
      <encoding-date>2022-06-09</encoding-date>
      <supports element="accidental" type="yes"/>
      <supports element="beam" type="yes"/>
      <supports element="print" attribute="new-page" type="yes" value="yes"/>
      <supports element="print" attribute="new-system" type="yes" value="yes"/>
      <supports element="stem" type="yes"/>
      </encoding>
    </identification>
  <defaults>
    <scaling>
      <millimeters>5.84388</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1913</page-height>
      <page-width>1217</page-width>
      <page-margins type="both">
        <left-margin>68</left-margin>
        <right-margin>68</right-margin>
        <top-margin>68</top-margin>
        <bottom-margin>68</bottom-margin>
        </page-margins>
      </page-layout>
    <word-font font-family="Edwin" font-size="9.9619"/>
    <lyric-font font-family="Edwin" font-size="9.5738"/>
    </defaults>
  <part-list>
    <score-part id="P1">
      <part-name> </part-name>
      <part-abbreviation> </part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name> </instrument-name>
        </score-instrument>
      <midi-device id="P1-I1" port="1"></midi-device>
      <midi-instrument id="P1-I1">
        <midi-channel>1</midi-channel>
        <midi-program>1</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    </part-list>
  <part id="P1">
    <measure number="1" width="410.15">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>50.00</left-margin>
            <right-margin>620.85</right-margin>
            </system-margins>
          <top-system-distance>70.00</top-system-distance>
          </system-layout>
        </print>
      <attributes>
        <divisions>1</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 default-x="80.72" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-y="-40.00" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>A</text>
          <extend/>
          </lyric>
        <lyric number="2" default-y="-60.22" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>A</text>
          <extend/>
          </lyric>
        </note>
      <note default-x="160.42" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note>
        <rest/>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="319.81" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-x="6.50" default-y="-40.00" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>B</text>
          </lyric>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

Current output data

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0.0-dev">
   <meiHead>
      <fileDesc>
         <titleStmt>
            <title />
            <respStmt />
         </titleStmt>
         <pubStmt><availability>
               <distributor>words and music: Jonathan Gabhart and Jake Helder; © Pillar Music, 2019
</distributor>
            </availability>
            <date isodate="2022-06-09" type="encoding-date">2022-06-09</date>
         </pubStmt>
      </fileDesc>
      <encodingDesc xml:id="encodingdesc-s55pm0">
         <appInfo xml:id="appinfo-62ttk6">
            <application xml:id="application-jym9tf" isodate="2022-06-09T11:34:44" version="3.11.0-dev-00d26d1">
               <name xml:id="name-re40op">Verovio</name>
               <p xml:id="p-lnzck6">Transcoded from MusicXML</p>
            </application>
         </appInfo>
      </encodingDesc>
   </meiHead>
   <music>
      <body>
         <mdiv xml:id="mc11zj8">
            <score xml:id="sfknuwj">
               <scoreDef xml:id="sjfxd6p">
                  <pgFoot xml:id="pgcpuu0">
                     <rend xml:id="rvmsny0" halign="center" valign="bottom">words and music: Jonathan Gabhart and Jake Helder; © Pillar Music, 2019
</rend>
                  </pgFoot>
                  <staffGrp xml:id="su6hg45">
                     <staffDef xml:id="P1" n="1" lines="5" ppq="1">
                        <instrDef xml:id="iokbvme" midi.channel="0" midi.instrnum="0" midi.volume="78.00%" />
                        <clef xml:id="caoghh1" shape="G" line="2" />
                        <keySig xml:id="knwh41o" sig="0" />
                        <meterSig xml:id="mprhiag" count="4" unit="4" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section xml:id="syqnpnf">
                  <measure xml:id="mmt98so" right="end" n="1">
                     <staff xml:id="swl38tg" n="1">
                        <layer xml:id="luunzwz" n="1">
                           <note xml:id="n7fg8v5" dur.ppq="1" dur="4" oct="4" pname="g" stem.dir="up">
                              <verse xml:id="vvwzez1" n="1">
                                 <syl xml:id="sbsc2vz" con="u" wordpos="s">A</syl>
                              </verse>
                              <verse xml:id="vyn2tbt" n="2">
                                 <syl xml:id="sy909vf" con="u" wordpos="s">A</syl>
                              </verse>
                           </note>
                           <note xml:id="nrb581l" dur.ppq="1" dur="4" oct="4" pname="g" stem.dir="up" />
                           <rest xml:id="rph2c8n" dur.ppq="1" dur="4" />
                           <note xml:id="nso4ne4" dur.ppq="1" dur="4" oct="4" pname="g" stem.dir="up">
                              <verse xml:id="vhnb10w" n="1">
                                 <syl xml:id="s4peli8" con="s" wordpos="s">B</syl>
                              </verse>
                           </note>
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

Screenshots When rendered in MuseScore, it looks like:

musescore

When rendered in the MusicXML-to-MEI converter, it looks like:

verovio

bryantgeorge avatar Jun 09 '22 15:06 bryantgeorge