rism-digital / verovio

🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)
https://www.verovio.org
GNU Lesser General Public License v3.0
687 stars 185 forks source link

Incorrect mRest duration assumption leads to pause in generated audio #1453

Open earboxer opened 4 years ago

earboxer commented 4 years ago

In the following MEI file, there is an mRest in the bass clef of a shortened measure.

When the audio is played back, it pauses for three extra beats, so there is a gap of silence between "what a" and "day". Measure 4 should be only one beat long, so the mRest should only be 1 beats. (Though I don't know how it ought to know that).

This was converted from musicXML:

MusicXML

<?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">
  <movement-title> When We All Get to Heaven</movement-title>
  <identification>
    <creator type="composer">MUSIC (HEAVEN 8.7.8.7.Ref): Emily D. Wilson (1865-1942)</creator>
    <creator type="poet">WORDS: Eliza E. Hewitt (1851-1920)</creator>
    <encoding>
      <software>MuseScore 3.4.2</software>
      <encoding-date>2020-05-07</encoding-date>
      <supports element="accidental" type="yes"/>
      <supports element="beam" type="yes"/>
      <supports element="print" attribute="new-page" type="no"/>
      <supports element="print" attribute="new-system" type="no"/>
      <supports element="stem" type="yes"/>
      </encoding>
    </identification>
  <defaults>
    <scaling>
      <millimeters>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.78</page-height>
      <page-width>1190.55</page-width>
      <page-margins type="even">
        <left-margin>56.6929</left-margin>
        <right-margin>56.6929</right-margin>
        <top-margin>56.6929</top-margin>
        <bottom-margin>113.386</bottom-margin>
        </page-margins>
      <page-margins type="odd">
        <left-margin>56.6929</left-margin>
        <right-margin>56.6929</right-margin>
        <top-margin>56.6929</top-margin>
        <bottom-margin>113.386</bottom-margin>
        </page-margins>
      </page-layout>
    <word-font font-family="FreeSerif" font-size="10"/>
    <lyric-font font-family="FreeSerif" font-size="11"/>
    </defaults>
  <credit page="1">
    <credit-words default-x="1133.86" default-y="1502.09" justify="right" valign="bottom" font-size="12">MUSIC (HEAVEN 8.7.8.7.Ref): Emily D. Wilson (1865-1942)</credit-words>
    </credit>
  <credit page="1">
    <credit-words default-x="56.6929" default-y="1502.09" justify="left" valign="bottom" font-size="12">WORDS: Eliza E. Hewitt (1851-1920)</credit-words>
    </credit>
  <credit page="1">
    <credit-words default-x="595.275" default-y="1627.09" justify="center" valign="top" font-size="24"> When We All Get to Heaven</credit-words>
    </credit>
  <part-list>
    <score-part id="P1">
      <part-name></part-name>
      <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>
    <score-part id="P2">
      <part-name></part-name>
      <score-instrument id="P2-I1">
        <instrument-name></instrument-name>
        </score-instrument>
      <midi-device id="P2-I1" port="1"></midi-device>
      <midi-instrument id="P2-I1">
        <midi-channel>2</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="234.31">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>0.00</left-margin>
            <right-margin>0.00</right-margin>
            </system-margins>
          <top-system-distance>195.00</top-system-distance>
          </system-layout>
        </print>
      <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>
      <direction placement="above">
        <direction-type>
          <metronome parentheses="no" default-x="-36.90" relative-y="20.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>132</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="132"/>
        </direction>
      <note default-x="83.40" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-65.27" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>When</text>
          </lyric>
        </note>
      <note default-x="182.11" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-65.27" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>we</text>
          </lyric>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        </note>
      </measure>
    <measure number="2" width="510.38">
      <harmony print-frame="no">
        <root>
          <root-step>C</root-step>
          </root>
        <kind>major</kind>
        </harmony>
      <note default-x="13.13" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>12</duration>
        <voice>1</voice>
        <type>half</type>
        <dot/>
        <stem>up</stem>
        <lyric number="1" default-x="6.22" default-y="-65.27" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>all</text>
          </lyric>
        </note>
      <note default-x="366.91" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-65.27" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>get</text>
          </lyric>
        </note>
      <note default-x="460.71" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-65.27" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>to</text>
          </lyric>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        </note>
      <note default-x="119.26" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="213.06" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="261.14" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="366.91" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="460.71" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      </measure>
    <measure number="3" width="332.48">
      <note default-x="23.18" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <lyric number="1" default-x="6.22" default-y="-65.27" relative-y="-30.00">
          <syllabic>begin</syllabic>
          <text>heav</text>
          </lyric>
        </note>
      <note default-x="212.67" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-x="9.00" default-y="-65.27" relative-y="-30.00">
          <syllabic>end</syllabic>
          <text>en,</text>
          </lyric>
        </note>
      <backup>
        <duration>12</duration>
        </backup>
      <note default-x="23.18" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>2</voice>
        <type>half</type>
        <stem>down</stem>
        </note>
      <note default-x="212.67" default-y="-50.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <barline location="right">
        <bar-style>none</bar-style>
        </barline>
      </measure>
    <measure number="4" width="171.46">
      <print new-system="yes"/>
      <note default-x="61.37" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>what</text>
          </lyric>
        </note>
      <note default-x="133.10" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>a</text>
          </lyric>
        </note>
      </measure>
    <measure number="5" width="529.76">
      <harmony print-frame="no">
        <root>
          <root-step>C</root-step>
          </root>
        <kind>major</kind>
        <bass>
          <bass-step>E</bass-step>
          </bass>
        </harmony>
      <note default-x="18.54" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>day</text>
          </lyric>
        </note>
      <harmony print-frame="no">
        <root>
          <root-step>D</root-step>
          </root>
        <kind text="7">dominant</kind>
        </harmony>
      <note default-x="119.97" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>of</text>
          </lyric>
        </note>
      <note default-x="209.93" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>begin</syllabic>
          <text>re</text>
          </lyric>
        </note>
      <note default-x="256.03" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>middle</syllabic>
          <text>joic</text>
          </lyric>
        </note>
      <note default-x="345.99" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>end</syllabic>
          <text>ing</text>
          </lyric>
        </note>
      <harmony print-frame="no">
        <root>
          <root-step>G</root-step>
          </root>
        <kind text="7">dominant</kind>
        </harmony>
      <note default-x="392.09" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>that</text>
          </lyric>
        </note>
      <note default-x="482.05" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>will</text>
          </lyric>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        </note>
      <note default-x="119.97" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="209.93" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="256.03" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <accidental>sharp</accidental>
        <stem>down</stem>
        </note>
      <note default-x="392.09" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="482.05" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      </measure>
    <measure number="6" width="375.95">
      <note default-x="19.87" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>12</duration>
        <voice>1</voice>
        <type>half</type>
        <dot/>
        <stem>up</stem>
        <lyric number="1" default-x="8.93" default-y="-65.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>be!</text>
          </lyric>
        </note>
      <backup>
        <duration>12</duration>
        </backup>
      <note default-x="20.23" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="105.50" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="149.21" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="234.48" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="278.19" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <barline location="right">
        <bar-style>none</bar-style>
        </barline>
      </measure>
    </part>
  <part id="P2">
    <measure number="1" width="234.31">
      <print>
        <staff-layout number="1">
          <staff-distance>127.57</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>4</divisions>
        <key>
          <fifths>0</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <clef>
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        </note>
      </measure>
    <measure number="2" width="510.38">
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="119.26" default-y="-172.57">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-55.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>When</text>
          </lyric>
        </note>
      <note default-x="213.06" default-y="-172.57">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-55.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>we</text>
          </lyric>
        </note>
      <note default-x="261.14" default-y="-172.57">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-x="6.58" default-y="-55.02" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>all</text>
          </lyric>
        </note>
      <note default-x="366.91" default-y="-157.57">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="460.71" default-y="-157.57">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        </note>
      <note default-x="119.26" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="213.06" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="261.14" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="366.91" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="460.71" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      </measure>
    <measure number="3" width="332.48">
      <note default-x="23.18" default-y="-157.57">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        </note>
      <note default-x="212.67" default-y="-172.57">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <backup>
        <duration>12</duration>
        </backup>
      <note default-x="23.18" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>8</duration>
        <voice>2</voice>
        <type>half</type>
        <stem>down</stem>
        </note>
      <note default-x="212.67" default-y="-192.57">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <barline location="right">
        <bar-style>none</bar-style>
        </barline>
      </measure>
    <measure number="4" width="171.46">
      <print new-system="yes"/>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        </note>
      </measure>
    <measure number="5" width="529.76">
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="119.97" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>what</text>
          </lyric>
        </note>
      <note default-x="209.93" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>a</text>
          </lyric>
        </note>
      <note default-x="256.03" default-y="-160.24">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>day</text>
          </lyric>
        </note>
      <note default-x="392.09" default-y="-160.24">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>of</text>
          </lyric>
        </note>
      <note default-x="482.05" default-y="-160.24">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>begin</syllabic>
          <text>re</text>
          </lyric>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        </note>
      <note default-x="119.97" default-y="-175.24">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="209.93" default-y="-175.24">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="256.03" default-y="-180.24">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="392.09" default-y="-180.24">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="482.05" default-y="-180.24">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      </measure>
    <measure number="6" width="375.95">
      <note default-x="20.23" default-y="-155.24">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>middle</syllabic>
          <text>joic</text>
          </lyric>
        </note>
      <note default-x="105.50" default-y="-155.24">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>end</syllabic>
          <text>ing</text>
          </lyric>
        </note>
      <note default-x="149.21" default-y="-155.24">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>eighth</type>
        <dot/>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>that</text>
          </lyric>
        </note>
      <note default-x="234.48" default-y="-155.24">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        <lyric number="1" default-x="6.58" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>will</text>
          </lyric>
        </note>
      <note default-x="278.19" default-y="-155.24">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1" default-x="9.30" default-y="-47.52" relative-y="-30.00">
          <syllabic>single</syllabic>
          <text>be!</text>
          </lyric>
        </note>
      <backup>
        <duration>12</duration>
        </backup>
      <note default-x="20.23" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="105.50" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="149.21" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>3</duration>
        <voice>2</voice>
        <type>eighth</type>
        <dot/>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="234.48" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>16th</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        <beam number="2">backward hook</beam>
        </note>
      <note default-x="278.19" default-y="-165.24">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <barline location="right">
        <bar-style>none</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

MEI

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title> When We All Get to Heaven</title>
                <respStmt>
                    <persName role="composer">MUSIC (HEAVEN 8.7.8.7.Ref): Emily D. Wilson (1865-1942)</persName>
                    <persName role="poet">WORDS: Eliza E. Hewitt (1851-1920)</persName>
                </respStmt>
            </titleStmt>
            <pubStmt><availability />
            </pubStmt>
        </fileDesc>
        <encodingDesc xml:id="encodingdesc-0000002050701898">
            <appInfo xml:id="appinfo-0000001181748983">
                <application xml:id="application-0000001726389825" isodate="2020-05-07T14:57:17" version="2.7.0-dev-fbe217a">
                    <name xml:id="name-0000000782234158">Verovio</name>
                    <p xml:id="p-0000000114606572">Transcoded from MusicXML</p>
                </application>
            </appInfo>
        </encodingDesc>
    </meiHead>
    <music>
        <body>
            <mdiv xml:id="mdiv-0000002047307892">
                <score xml:id="score-0000002120748610">
                    <scoreDef xml:id="scoredef-0000000310656014">
                        <pgHead xml:id="pghead-0000001618598938">
                            <rend xml:id="rend-0000000419613734" halign="right" valign="bottom">MUSIC (HEAVEN 8.7.8.7.Ref): Emily D. Wilson (1865-1942)</rend>
                            <rend xml:id="rend-0000000955318652" halign="left" valign="bottom">WORDS: Eliza E. Hewitt (1851-1920)</rend>
                            <rend xml:id="rend-0000000979233554" halign="center" valign="top"> When We All Get to Heaven</rend>
                        </pgHead>
                        <pgFoot xml:id="pgfoot-0000001616994417" />
                        <staffGrp xml:id="staffgrp-0000001650838841">
                            <staffDef xml:id="staffdef-0000000742772135" n="1" lines="5" ppq="4" clef.shape="G" clef.line="2" key.sig="0" meter.count="4" meter.unit="4">
                                <instrDef xml:id="instrdef-0000000159681447" midi.channel="0" midi.instrnum="0" midi.volume="78.00%" />
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000634530566" n="2" lines="5" ppq="4" clef.shape="F" clef.line="4" key.sig="0" meter.count="4" meter.unit="4">
                                <instrDef xml:id="instrdef-0000000229631817" midi.channel="1" midi.instrnum="0" midi.volume="78.00%" />
                            </staffDef>
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-0000001635799011">
                        <pb xml:id="pb-0000000788328983" />
                        <measure xml:id="measure-0000000267258165" n="1">
                            <staff xml:id="staff-0000001964922325" n="1">
                                <layer xml:id="layer-0000001760392264" n="1">
                                    <beam xml:id="beam-0000001030576329">
                                        <note xml:id="note-0000001440748448" dots="1" dur.ppq="3" dur="8" oct="4" pname="e" stem.dir="up">
                                            <verse xml:id="verse-0000001781045611" n="1">
                                                <syl xml:id="syl-0000000259028544" con="s">When</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001597093929" dur.ppq="1" dur="16" oct="4" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000000959560850" n="1">
                                                <syl xml:id="syl-0000001884500627" con="s">we</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                </layer>
                                <layer xml:id="layer-0000000493899655" n="2">
                                    <rest xml:id="rest-0000000947205930" dur.ppq="4" dur="4" />
                                </layer>
                            </staff>
                            <staff xml:id="staff-0000001179148776" n="2">
                                <layer xml:id="layer-0000000974383716" n="1">
                                    <rest xml:id="rest-0000001904306437" dur.ppq="4" dur="4" />
                                </layer>
                                <layer xml:id="layer-0000001729495418" n="2">
                                    <rest xml:id="rest-0000001438328181" dur.ppq="4" dur="4" />
                                </layer>
                            </staff>
                            <tempo xml:id="tempo-0000000445992709" place="above" staff="1" tstamp="1.000000" mm="132" mm.unit="4">
                                <rend xml:id="rend-0000001081532133" fontname="VerovioText"></rend> = 132</tempo>
                        </measure>
                        <measure xml:id="measure-0000000393790299" n="2">
                            <staff xml:id="staff-0000001640730879" n="1">
                                <layer xml:id="layer-0000000992427519" n="1">
                                    <note xml:id="note-0000000223825584" dots="1" dur.ppq="12" dur="2" oct="5" pname="c" stem.dir="up">
                                        <verse xml:id="verse-0000001592724391" n="1">
                                            <syl xml:id="syl-0000000535179682" con="s">all</syl>
                                        </verse>
                                    </note>
                                    <beam xml:id="beam-0000001351718721">
                                        <note xml:id="note-0000000107042234" dots="1" dur.ppq="3" dur="8" oct="4" pname="b" stem.dir="up">
                                            <verse xml:id="verse-0000001615014299" n="1">
                                                <syl xml:id="syl-0000001499508860" con="s">get</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001600907674" dur.ppq="1" dur="16" oct="4" pname="a" stem.dir="up">
                                            <verse xml:id="verse-0000000632663655" n="1">
                                                <syl xml:id="syl-0000000986513288" con="s">to</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                </layer>
                                <layer xml:id="layer-0000001884121287" n="2">
                                    <rest xml:id="rest-0000001780095594" dur.ppq="4" dur="4" />
                                    <beam xml:id="beam-0000001471962001">
                                        <note xml:id="note-0000000253737367" dots="1" dur.ppq="3" dur="8" oct="4" pname="e" stem.dir="down" />
                                        <note xml:id="note-0000001808887874" dur.ppq="1" dur="16" oct="4" pname="e" stem.dir="down" />
                                    </beam>
                                    <note xml:id="note-0000000052507739" dur.ppq="4" dur="4" oct="4" pname="e" stem.dir="down" />
                                    <beam xml:id="beam-0000002029274103">
                                        <note xml:id="note-0000001822051114" dots="1" dur.ppq="3" dur="8" oct="4" pname="g" stem.dir="down" />
                                        <note xml:id="note-0000000096266778" dur.ppq="1" dur="16" oct="4" pname="f" stem.dir="down" />
                                    </beam>
                                </layer>
                            </staff>
                            <staff xml:id="staff-0000001744170925" n="2">
                                <layer xml:id="layer-0000001128954925" n="1">
                                    <rest xml:id="rest-0000001327403230" dur.ppq="4" dur="4" />
                                    <beam xml:id="beam-0000001605961574">
                                        <note xml:id="note-0000001821698722" dots="1" dur.ppq="3" dur="8" oct="3" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000000616065375" n="1">
                                                <syl xml:id="syl-0000001192095438" con="s">When</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000000365241803" dur.ppq="1" dur="16" oct="3" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000001110719895" n="1">
                                                <syl xml:id="syl-0000001941415541" con="s">we</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                    <note xml:id="note-0000000278976327" dur.ppq="4" dur="4" oct="3" pname="g" stem.dir="up">
                                        <verse xml:id="verse-0000000798326488" n="1">
                                            <syl xml:id="syl-0000002142941007" con="s">all</syl>
                                        </verse>
                                    </note>
                                    <beam xml:id="beam-0000000390990903">
                                        <note xml:id="note-0000000084146901" dots="1" dur.ppq="3" dur="8" oct="4" pname="c" stem.dir="up" />
                                        <note xml:id="note-0000001212725381" dur.ppq="1" dur="16" oct="4" pname="c" stem.dir="up" />
                                    </beam>
                                </layer>
                                <layer xml:id="layer-0000000508184790" n="2">
                                    <rest xml:id="rest-0000000519301411" dur.ppq="4" dur="4" />
                                    <beam xml:id="beam-0000000525273269">
                                        <note xml:id="note-0000002110042913" dots="1" dur.ppq="3" dur="8" oct="3" pname="c" stem.dir="down" />
                                        <note xml:id="note-0000002093775880" dur.ppq="1" dur="16" oct="3" pname="c" stem.dir="down" />
                                    </beam>
                                    <note xml:id="note-0000001424175418" dur.ppq="4" dur="4" oct="3" pname="c" stem.dir="down" />
                                    <beam xml:id="beam-0000000263520864">
                                        <note xml:id="note-0000000883881134" dots="1" dur.ppq="3" dur="8" oct="3" pname="c" stem.dir="down" />
                                        <note xml:id="note-0000001245832839" dur.ppq="1" dur="16" oct="3" pname="c" stem.dir="down" />
                                    </beam>
                                </layer>
                            </staff>
                            <harm xml:id="harm-0000002073855873" staff="1" tstamp="1.000000">C</harm>
                        </measure>
                        <measure xml:id="measure-0000000900551655" right="invis" n="3">
                            <staff xml:id="staff-0000001098894771" n="1">
                                <layer xml:id="layer-0000000765051997" n="1">
                                    <note xml:id="note-0000001244318990" dur.ppq="8" dur="2" oct="4" pname="g" stem.dir="up">
                                        <verse xml:id="verse-0000001073510444" n="1">
                                            <syl xml:id="syl-0000001479913861" con="d" wordpos="i">heav</syl>
                                        </verse>
                                    </note>
                                    <note xml:id="note-0000001972148424" dur.ppq="4" dur="4" oct="4" pname="e" stem.dir="up">
                                        <verse xml:id="verse-0000001635954370" n="1">
                                            <syl xml:id="syl-0000001251964049" con="s" wordpos="t">en,</syl>
                                        </verse>
                                    </note>
                                </layer>
                                <layer xml:id="layer-0000001804364294" n="2">
                                    <note xml:id="note-0000001334109971" dur.ppq="8" dur="2" oct="4" pname="e" stem.dir="down" />
                                    <note xml:id="note-0000000509524270" dur.ppq="4" dur="4" oct="4" pname="c" stem.dir="down" />
                                </layer>
                            </staff>
                            <staff xml:id="staff-0000000307289563" n="2">
                                <layer xml:id="layer-0000002064997953" n="1">
                                    <note xml:id="note-0000000937376904" dur.ppq="8" dur="2" oct="4" pname="c" stem.dir="up" />
                                    <note xml:id="note-0000000553591136" dur.ppq="4" dur="4" oct="3" pname="g" stem.dir="up" />
                                </layer>
                                <layer xml:id="layer-0000001307063948" n="2">
                                    <note xml:id="note-0000001213548873" dur.ppq="8" dur="2" oct="3" pname="c" stem.dir="down" />
                                    <note xml:id="note-0000001463712952" dur.ppq="4" dur="4" oct="3" pname="c" stem.dir="down" />
                                </layer>
                            </staff>
                        </measure>
                        <sb xml:id="sb-0000000164291248" />
                        <measure xml:id="measure-0000001557105301" n="4">
                            <staff xml:id="staff-0000001027433825" n="1">
                                <layer xml:id="layer-0000001726518741" n="1">
                                    <beam xml:id="beam-0000000801441723">
                                        <note xml:id="note-0000000813604477" dots="1" dur.ppq="3" dur="8" oct="4" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000001222064490" n="1">
                                                <syl xml:id="syl-0000000704283522" con="s">what</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001523766266" dur.ppq="1" dur="16" oct="4" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000001197142187" n="1">
                                                <syl xml:id="syl-0000000594448166" con="s">a</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                </layer>
                            </staff>
                            <staff xml:id="staff-0000001999259209" n="2">
                                <layer xml:id="layer-0000002020384701" n="1">
                                    <mRest xml:id="mrest-0000000594243343" />
                                </layer>
                            </staff>
                        </measure>
                        <measure xml:id="measure-0000001978695122" n="5">
                            <staff xml:id="staff-0000001333666458" n="1">
                                <layer xml:id="layer-0000001498511403" n="1">
                                    <note xml:id="note-0000001940421852" dur.ppq="4" dur="4" oct="5" pname="c" stem.dir="up">
                                        <verse xml:id="verse-0000000983403222" n="1">
                                            <syl xml:id="syl-0000001023804842" con="s">day</syl>
                                        </verse>
                                    </note>
                                    <beam xml:id="beam-0000001819275461">
                                        <note xml:id="note-0000000690507041" dots="1" dur.ppq="3" dur="8" oct="5" pname="c" stem.dir="up">
                                            <verse xml:id="verse-0000000350209699" n="1">
                                                <syl xml:id="syl-0000001869218313" con="s">of</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000000963620163" dur.ppq="1" dur="16" oct="5" pname="c" stem.dir="up">
                                            <verse xml:id="verse-0000001389897514" n="1">
                                                <syl xml:id="syl-0000001827889379" con="d" wordpos="i">re</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                    <beam xml:id="beam-0000001898473696">
                                        <note xml:id="note-0000000335381546" dots="1" dur.ppq="3" dur="8" oct="5" pname="c" stem.dir="up">
                                            <verse xml:id="verse-0000001760553894" n="1">
                                                <syl xml:id="syl-0000001599608092" con="d" wordpos="m">joic</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000000682020138" dur.ppq="1" dur="16" oct="5" pname="c" stem.dir="up">
                                            <verse xml:id="verse-0000001592235327" n="1">
                                                <syl xml:id="syl-0000000905415622" con="s" wordpos="t">ing</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                    <beam xml:id="beam-0000001021884158">
                                        <note xml:id="note-0000001380318447" dots="1" dur.ppq="3" dur="8" oct="4" pname="b" stem.dir="up">
                                            <verse xml:id="verse-0000001893783835" n="1">
                                                <syl xml:id="syl-0000000969782658" con="s">that</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001745733787" dur.ppq="1" dur="16" oct="5" pname="c" stem.dir="up">
                                            <verse xml:id="verse-0000001626172795" n="1">
                                                <syl xml:id="syl-0000000061790196" con="s">will</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                </layer>
                                <layer xml:id="layer-0000001526372789" n="2">
                                    <rest xml:id="rest-0000002055301308" dur.ppq="4" dur="4" />
                                    <beam xml:id="beam-0000001174621561">
                                        <note xml:id="note-0000000047408856" dots="1" dur.ppq="3" dur="8" oct="4" pname="g" stem.dir="down" />
                                        <note xml:id="note-0000000084209755" dur.ppq="1" dur="16" oct="4" pname="g" stem.dir="down" />
                                    </beam>
                                    <note xml:id="note-0000000121628912" dur.ppq="4" dur="4" oct="4" pname="f" stem.dir="down">
                                        <accid xml:id="accid-0000001960175687" accid="s" accid.ges="s" />
                                    </note>
                                    <beam xml:id="beam-0000000126142782">
                                        <note xml:id="note-0000000515377485" dots="1" dur.ppq="3" dur="8" oct="4" pname="f" stem.dir="down" accid.ges="s" />
                                        <note xml:id="note-0000000935632507" dur.ppq="1" dur="16" oct="4" pname="f" stem.dir="down" accid.ges="s" />
                                    </beam>
                                </layer>
                            </staff>
                            <staff xml:id="staff-0000000348383130" n="2">
                                <layer xml:id="layer-0000001234844188" n="1">
                                    <rest xml:id="rest-0000000744303108" dur.ppq="4" dur="4" />
                                    <beam xml:id="beam-0000000410092381">
                                        <note xml:id="note-0000001147624244" dots="1" dur.ppq="3" dur="8" oct="3" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000001570035201" n="1">
                                                <syl xml:id="syl-0000001450052518" con="s">what</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001952382082" dur.ppq="1" dur="16" oct="3" pname="g" stem.dir="up">
                                            <verse xml:id="verse-0000000135526014" n="1">
                                                <syl xml:id="syl-0000001453051478" con="s">a</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                    <note xml:id="note-0000001018505503" dur.ppq="4" dur="4" oct="3" pname="a" stem.dir="up">
                                        <verse xml:id="verse-0000000429838684" n="1">
                                            <syl xml:id="syl-0000000163773480" con="s">day</syl>
                                        </verse>
                                    </note>
                                    <beam xml:id="beam-0000000677980073">
                                        <note xml:id="note-0000000262855929" dots="1" dur.ppq="3" dur="8" oct="3" pname="a" stem.dir="up">
                                            <verse xml:id="verse-0000000445736824" n="1">
                                                <syl xml:id="syl-0000001075840232" con="s">of</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001101038100" dur.ppq="1" dur="16" oct="3" pname="a" stem.dir="up">
                                            <verse xml:id="verse-0000000280760501" n="1">
                                                <syl xml:id="syl-0000000720167848" con="d" wordpos="i">re</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                </layer>
                                <layer xml:id="layer-0000001756091757" n="2">
                                    <rest xml:id="rest-0000001766399178" dur.ppq="4" dur="4" />
                                    <beam xml:id="beam-0000001057048518">
                                        <note xml:id="note-0000001829714042" dots="1" dur.ppq="3" dur="8" oct="3" pname="e" stem.dir="down" />
                                        <note xml:id="note-0000000038078854" dur.ppq="1" dur="16" oct="3" pname="e" stem.dir="down" />
                                    </beam>
                                    <note xml:id="note-0000000041172372" dur.ppq="4" dur="4" oct="3" pname="d" stem.dir="down" />
                                    <beam xml:id="beam-0000000494321870">
                                        <note xml:id="note-0000001600922494" dots="1" dur.ppq="3" dur="8" oct="3" pname="d" stem.dir="down" />
                                        <note xml:id="note-0000000881743395" dur.ppq="1" dur="16" oct="3" pname="d" stem.dir="down" />
                                    </beam>
                                </layer>
                            </staff>
                            <harm xml:id="harm-0000001645335867" staff="1" tstamp="1.000000">C/E</harm>
                            <harm xml:id="harm-0000000873905130" staff="1" tstamp="2.000000">D7</harm>
                            <harm xml:id="harm-0000000575845782" staff="1" tstamp="4.000000">G7</harm>
                        </measure>
                        <measure xml:id="measure-0000001042872833" right="invis" n="6">
                            <staff xml:id="staff-0000000432815610" n="1">
                                <layer xml:id="layer-0000000804844881" n="1">
                                    <note xml:id="note-0000000028422514" dots="1" dur.ppq="12" dur="2" oct="5" pname="d" stem.dir="up">
                                        <verse xml:id="verse-0000000955823164" n="1">
                                            <syl xml:id="syl-0000001342237788" con="s">be!</syl>
                                        </verse>
                                    </note>
                                </layer>
                                <layer xml:id="layer-0000001708744329" n="2">
                                    <beam xml:id="beam-0000000567126172">
                                        <note xml:id="note-0000001157147418" dots="1" dur.ppq="3" dur="8" oct="4" pname="f" stem.dir="down" />
                                        <note xml:id="note-0000000564747094" dur.ppq="1" dur="16" oct="4" pname="f" stem.dir="down" />
                                    </beam>
                                    <beam xml:id="beam-0000001974172765">
                                        <note xml:id="note-0000001299315205" dots="1" dur.ppq="3" dur="8" oct="4" pname="f" stem.dir="down" />
                                        <note xml:id="note-0000001976927739" dur.ppq="1" dur="16" oct="4" pname="f" stem.dir="down" />
                                    </beam>
                                    <note xml:id="note-0000000357522989" dur.ppq="4" dur="4" oct="4" pname="f" stem.dir="down" />
                                </layer>
                            </staff>
                            <staff xml:id="staff-0000000750002366" n="2">
                                <layer xml:id="layer-0000001708241119" n="1">
                                    <beam xml:id="beam-0000000699610290">
                                        <note xml:id="note-0000000877176705" dots="1" dur.ppq="3" dur="8" oct="3" pname="b" stem.dir="up">
                                            <verse xml:id="verse-0000000233644280" n="1">
                                                <syl xml:id="syl-0000001259307244" con="d" wordpos="m">joic</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000001005938373" dur.ppq="1" dur="16" oct="3" pname="b" stem.dir="up">
                                            <verse xml:id="verse-0000001814965827" n="1">
                                                <syl xml:id="syl-0000001272932401" con="s" wordpos="t">ing</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                    <beam xml:id="beam-0000001037900185">
                                        <note xml:id="note-0000002126228361" dots="1" dur.ppq="3" dur="8" oct="3" pname="b" stem.dir="up">
                                            <verse xml:id="verse-0000001392177247" n="1">
                                                <syl xml:id="syl-0000001488656264" con="s">that</syl>
                                            </verse>
                                        </note>
                                        <note xml:id="note-0000000584178592" dur.ppq="1" dur="16" oct="3" pname="b" stem.dir="up">
                                            <verse xml:id="verse-0000002141845307" n="1">
                                                <syl xml:id="syl-0000001873183735" con="s">will</syl>
                                            </verse>
                                        </note>
                                    </beam>
                                    <note xml:id="note-0000000617734100" dur.ppq="4" dur="4" oct="3" pname="b" stem.dir="up">
                                        <verse xml:id="verse-0000001321069102" n="1">
                                            <syl xml:id="syl-0000000374970981" con="s">be!</syl>
                                        </verse>
                                    </note>
                                </layer>
                                <layer xml:id="layer-0000000984864378" n="2">
                                    <beam xml:id="beam-0000001959133617">
                                        <note xml:id="note-0000001939425115" dots="1" dur.ppq="3" dur="8" oct="3" pname="g" stem.dir="down" />
                                        <note xml:id="note-0000001411113639" dur.ppq="1" dur="16" oct="3" pname="g" stem.dir="down" />
                                    </beam>
                                    <beam xml:id="beam-0000001925016852">
                                        <note xml:id="note-0000001917089509" dots="1" dur.ppq="3" dur="8" oct="3" pname="g" stem.dir="down" />
                                        <note xml:id="note-0000001826221822" dur.ppq="1" dur="16" oct="3" pname="g" stem.dir="down" />
                                    </beam>
                                    <note xml:id="note-0000001473879430" dur.ppq="4" dur="4" oct="3" pname="g" stem.dir="down" />
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>
wergo commented 4 years ago

The problem here is that a <type>quarter</type> is missing in the musicXML (which is correct I guess) and even though the <duration> is correctly given as 4 units (thus a quarter note), an mRest is inserted.

https://github.com/rism-ch/verovio/blob/715be288841c07eab0a468359183dc81e491c6aa/src/iomusxml.cpp#L2270

  `// we assume /note without /type or with duration of an entire bar to be mRest
    else if (typeStr.empty() || duration == (m_ppq * 4 * m_meterCount / m_meterUnit)
   || HasAttributeWithValue(rest.node(), "measure", "yes")) {`

It should be: (typeStr.empty() && duration == (m_ppq * 4 * m_meterCount / m_meterUnit)) ... shouldn't it, @rettinghaus?

rettinghaus commented 4 years ago

@wergo the condition is correct. If you reimport the file into MuseScore (where it came from), it shows a whole measure rest too.

wergo commented 4 years ago

Should we really base an argument on the MusicXML import capabilities of MuseScore, that often that it is faulty?

The xml pertinent snipped is this (with <division> defined as 4 earlier):

   <measure number="4" width="171.46">
            <print new-system="yes"/>
            <note>
                <rest/>
                <duration>4</duration>
                <voice>1</voice>
            </note>
        </measure>

So, the <duration> element correctly specifies a quarter note, even though <type>quarter</type>is missing. Shouldn't that import correctly as a quarter-note rest?

earboxer commented 4 years ago

The musicxml specifies a whole measure rest (because type is undefined), and the whole measure is 1 quarter-note long.

So I think we should create an mRest with dur and dur.ppq set appropriately...

rettinghaus commented 4 years ago

Putting @dur.ppqon mRest wouldn't resolve the issue (as it is not implemented for mRest). And even then the same error would prevail on MEI files (that don't have a @dur.ppqon mRest). The calculation of mRest duration has to be improved.

rettinghaus commented 4 years ago

@lpugin this is not an MusicXML issue, but one about mRest duration calculation.

lpugin commented 4 years ago

(The MEI posted in #1481 does not contain any mRest.)

The result of the MusicXML conversion of the example above leaves me doubtful: image

<measure xml:id="measure-0000000347293321" right="invis" n="3">
   <staff xml:id="staff-0000000269333995" n="1">
      <layer xml:id="layer-0000000010344056" n="1">
         <note xml:id="note-0000001551771701" dur.ppq="8" dur="2" oct="4" pname="g" stem.dir="up">
          <verse xml:id="verse-0000000177835352" n="1">
             <syl xml:id="syl-0000000247952080" con="d" wordpos="i">heav</syl>
          </verse>
         </note>
         <note xml:id="note-0000000232489823" dur.ppq="4" dur="4" oct="4" pname="e" stem.dir="up">
          <verse xml:id="verse-0000000941134656" n="1">
             <syl xml:id="syl-0000001224484950" con="s" wordpos="t">en,</syl>
          </verse>
         </note>
      </layer>
      <layer xml:id="layer-0000000452441359" n="2">
         <note xml:id="note-0000001851782662" dur.ppq="8" dur="2" oct="4" pname="e" stem.dir="down" />
         <note xml:id="note-0000001886512702" dur.ppq="4" dur="4" oct="4" pname="c" stem.dir="down" />
      </layer>
   </staff>
   <staff xml:id="staff-0000000494954418" n="2">
      <layer xml:id="layer-0000000075432589" n="1">
         <note xml:id="note-0000000324438461" dur.ppq="8" dur="2" oct="4" pname="c" stem.dir="up" />
         <note xml:id="note-0000001459657811" dur.ppq="4" dur="4" oct="3" pname="g" stem.dir="up" />
      </layer>
      <layer xml:id="layer-0000000430161242" n="2">
         <note xml:id="note-0000000937456504" dur.ppq="8" dur="2" oct="3" pname="c" stem.dir="down" />
         <note xml:id="note-0000001052792774" dur.ppq="4" dur="4" oct="3" pname="c" stem.dir="down" />
      </layer>
   </staff>
</measure>
<sb xml:id="sb-0000000828106355" />
<measure xml:id="measure-0000001298228642" n="4">
   <staff xml:id="staff-0000000890427094" n="1">
      <layer xml:id="layer-0000000777033468" n="1">
         <beam xml:id="beam-0000000906894824">
          <note xml:id="note-0000001327870263" dots="1" dur.ppq="3" dur="8" oct="4" pname="g" stem.dir="up">
             <verse xml:id="verse-0000000829096040" n="1">
                <syl xml:id="syl-0000000336840856" con="s">what</syl>
             </verse>
          </note>
          <note xml:id="note-0000000744896718" dur.ppq="1" dur="16" oct="4" pname="g" stem.dir="up">
             <verse xml:id="verse-0000000803708960" n="1">
                <syl xml:id="syl-0000001374662137" con="s">a</syl>
             </verse>
          </note>
         </beam>
      </layer>
   </staff>
   <staff xml:id="staff-0000001747086282" n="2">
      <layer xml:id="layer-0000001383504811" n="1">
         <mRest xml:id="mrest-0000000479382709" />
      </layer>
   </staff>
</measure>

So, yes, the mRest calcutation in the MIDI output is wrong, but before we tweak it we need to make sure that this is an appropriate MEI encoding. I am not.

rettinghaus commented 4 years ago

Consider the following example. The length of each measure changes. Adding notes works fine, but removing them adds an extra pause from the mRest in the second line. (Note, that no meter is given!) The problem in #1481 basically is the same: We have something that looks like a whole measure, while the @dur.ppq value tells something different, but is getting ignored.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
                <respStmt />
            </titleStmt>
            <pubStmt />
        </fileDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef>
                        <staffGrp>
                            <staffDef n="1" lines="5" ppq="1" clef.shape="G" clef.line="2" key.sig="2s">
                                <label>Violin</label>
                            </staffDef>
                            <staffDef n="2" lines="5" ppq="1" clef.shape="G" clef.line="2" key.sig="2s">
                                <label>Violin</label>
                            </staffDef>
                        </staffGrp>
                    </scoreDef>
                    <section>
                        <pb />
                        <measure>
                            <staff n="1">
                                <layer n="1">
                                    <note dur.ppq="1" dur="4" oct="4" pname="c" accid.ges="s" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <rest dur.ppq="1" dur="4" />
                                </layer>
                            </staff>
                            <tempo place="above" staff="1" tstamp="1.000000" mm="92" mm.unit="4" />
                        </measure>
                        <measure n="1">
                            <staff n="1">
                                <layer n="1">
                                    <note dur.ppq="1" dur="4" oct="4" pname="d" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="f" accid.ges="s" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="a" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="b" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <mRest />
                                </layer>
                            </staff>
                        </measure>
                        <measure n="2">
                            <staff n="1">
                                <layer n="1">
                                    <note dur.ppq="1" dur="4" oct="4" pname="a" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="f" accid.ges="s" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="d" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <mRest />
                                </layer>
                            </staff>
                        </measure>
                        <measure n="3">
                            <staff n="1">
                                <layer n="1">
                                    <note dur.ppq="1" dur="4" oct="4" pname="e" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="g" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="b" />
                                    <note dur.ppq="1" dur="4" oct="5" pname="d" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <mRest />
                                </layer>
                            </staff>
                        </measure>
                        <measure n="4">
                            <staff n="1">
                                <layer n="1">
                                    <note dur.ppq="1" dur="4" oct="5" pname="f" accid.ges="s" />
                                    <note dur.ppq="1" dur="4" oct="5" pname="a" />
                                    <note dur.ppq="1" dur="4" oct="5" pname="f" accid.ges="s" />
                                    <note dur.ppq="1" dur="4" oct="5" pname="d" />
                                    <note dur.ppq="1" dur="4" oct="4" pname="b" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <mRest />
                                </layer>
                            </staff>
                        </measure>
                        <measure n="5" metcon="false">
                            <staff n="1">
                                <layer n="1">
                                    <note dur.ppq="1" dur="4" oct="4" pname="a" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <rest dur.ppq="1" dur="4" />
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

NB: A general break however would have to rely on a given meter.

lpugin commented 4 years ago

Yes, to make your example complete, I would expect to have

<scoreDef meter.unit="4" meter.count="3" meter.form="invis"/>

with appropriate values and whenever necessary, wouldn't you?

(PS there are no @dur.ppq on mRest in your example)

lpugin commented 4 years ago

(To help understanding) image

rettinghaus commented 4 years ago

To me it looks more like a <scoreDef meter.unit="4" meter.count="4" meter.form="invis"/>. You could make these changes in meter explicit, but the meaning of mRest in this example is unquestionable. (PS there are @dur.ppq on rest in #1481)

lpugin commented 4 years ago

As I said, "with appropriate values", so I gave the example for measure 2 (the measure with @n=2) for which you complained that a gap was added. Sorry, I thought this was obvious.

(PS there are @dur.ppq on rest in #1481)

I am confused: are you talking about rest or mRest? For rest, you can simply use @dur.ges. This is the way to encode it - both MIDI and visual rendering are what I would expect:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
                <respStmt />
            </titleStmt>
            <pubStmt />
        </fileDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef>
                        <staffGrp>
                            <staffDef n="1" lines="5" ppq="1" clef.shape="G" clef.line="2" key.sig="2s">
                                <label>Violin</label>
                            </staffDef>
                            <staffDef n="2" lines="5" ppq="1" clef.shape="G" clef.line="2" key.sig="2s">
                                <label>Violin</label>
                            </staffDef>
                        </staffGrp>
                    </scoreDef>
                    <section>
                        <measure n="1">
                            <staff n="1">
                                <layer n="1">
                                    <note dur="4" oct="4" pname="d" />
                                    <note dur="4" oct="4" pname="f" accid.ges="s" />
                                    <note dur="4" oct="4" pname="a" />
                                    <note dur="4" oct="4" pname="b" />
                                </layer>
                            </staff>
                            <staff n="2">
                                <layer n="1">
                                    <rest dur="1" dur.ges="4"/>
                                    <note dur="2" dots="1" oct="4" pname="d" />
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

image

rettinghaus commented 4 years ago

Ok. I'm talking about mRests. And I see now, that #1481 is indeed a different problem, what I'll be thinking about.

earboxer commented 3 years ago

Yes, to make your example complete, I would expect to have <scoreDef meter.unit="4" meter.count="3" meter.form="invis"/>

You could make these changes in meter explicit, but the meaning of mRest in this example is unquestionable.

It might be unquestionable in that example, but what if the notes in measure n="1" get removed. How could an improved mRest duration calculation handle this issue? Should it be 0 beats (probably not), 1 beat (likely), or 3 (the number of beats in the next measure)? It seems like either the mRest needs a duration or we need an invisible scoreDef to remove all possible ambiguity. (not that it means much, but for comparison, if you remove the duration from the rest in musicxml, and load it into MuseScore, they also have an unexpected pause in playback).

Since the MusicXML has the duration, I think we should try to use that. (Which would also make the conversion less lossy).

(This doesn't mean that we shouldn't try to improve mRest duration calculation, just know that doing so won't solve all potential issues.)

Next Steps: