Giter VIP home page Giter VIP logo

humlib's People

Contributors

alexandermorgan avatar craigsapp avatar gregchapman-dev avatar juyaolongpaul avatar katherinevivianw avatar martha-thomae avatar paul-bayleaf avatar valeriyvan avatar wenliana avatar wolfgangdrescher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

humlib's Issues

mei2hum: keySig as scoreDef child

keySig is not processed as a child of scoreDef:

                    <scoreDef xml:id="scoredef-0000000587709528" meter.count="3" meter.unit="4">
                        <keySig xml:id="keysig-0000001854416470">
                            <keyAccid xml:id="keyaccid-0000000747442379" pname="f" accid="s" />
                            <keyAccid xml:id="keyaccid-0000001632212550" pname="c" accid="s" />
                            <keyAccid xml:id="keyaccid-0000000640221072" pname="g" accid="s" enclose="brack" />
                        </keySig>

For solving this situation I would do:

  • Tool_mei2hum::getRecursiveSDString, add a new case at the last if clause:
} else if (name == "pgFoot") {
		return;
	} else if (name == "keySig") { // drizo
		return;
	} else {
		cerr << "Unknown element in scoreDef descendant: " << name << endl;
	}
}
  • Tool_mei2hum::parseScoreDef: , add a new case at the only if clause:
		} else if (nodename == "pgFoot") {
		    processPgFoot(item, starttime);
		} else if (nodename == "keySig") { // drizo
			processKeySig(m_scoreDef.global, item, starttime); // drizo
		} else {
			cerr << DKHTP << scoreDef.name() << "/" << nodename << CURRLOC << endl;
		}
  • Add a new method:
// drizo
void   Tool_mei2hum::processKeySig(mei_staffDef& staffinfo, xml_node keysig, HumNum starttime) {
	MAKE_CHILD_LIST(children, keysig);
	string token = "*k[";
	for (xml_node item : children) {
		string pname = item.attribute("pname").value(); 			
		string accid = item.attribute("accid").value();
		if (accid == "s") {
			token += (pname + "#");
		} else {
			token += (pname + "-");
		}
	}
	token += "]";

	staffinfo.keysig = token;
}

Highlight all notes in chord in composite -N option

Composite -N will mark all notes in the score to mark notes that are present in two composite rhythm streams.

The problem is that currently only the first note of a chord is marked, but all notes in a chord should be marked.

autostem: no support for octave clefs

autostem tool doesn't work when spine is written in octave clef:

input:

**kern	**kern	**kern
*clefF4^	*clefG2v	*clefG2^
4C	4C	4cc
4D	4D	4dd
4E	4E	4ee
4F	4F	4ff
4G	4G	4gg
4A	4A	4aa
4B	4B	4bb
4c	4c	4ccc
4d	4d	4ddd
4e	4e	4eee
4f	4f	4fff
4g	4g	4ggg
4a	4a	4aaa
*-	*-	*-

output:

**kern	**kern	**kern
*clefF4^	*clefG2v	*clefG2^
4C/	4C/	4cc\
4D/	4D/	4dd\
4E/	4E/	4ee\
4F/	4F/	4ff\
4G/	4G/	4gg\
4A/	4A/	4aa\
4B/	4B/	4bb\
4c/	4c/	4ccc\
4d/	4d/	4ddd\
4e/	4e/	4eee\
4f/	4f/	4fff\
4g/	4g/	4ggg\
4a/	4a/	4aaa\
*-	*-	*-

fix implicit conversions

humlib.cpp:58948:46: m_cmrPeakCount[index1] = m_cmrPitch[index1].size();
humlib.cpp:59289:35: m_cmrIndex.push_back(m_cmrIndex.size());

grace note problem in musicxml2hum

Here's an example file containing a grace note that causes problem in the converter.

Here is the data shown in MuseScore with the grace note at the start of the third measure:

xxx

Removing the grace note will allow the MusicXML to be converted properly. Here is what it looks like in VHV after removing the grace note:

xxx-nograce

Here is the MusicXML export from MuseScore:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <identification>
    <encoding>
      <software>MuseScore 2.0.3</software>
      <encoding-date>2017-06-06</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</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>
  <part-list>
    <score-part id="P1">
      <part-name print-object="no">Voice</part-name>
      <score-instrument id="P1-I1">
        <instrument-name>Voice</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P2">
      <part-name print-object="no">Piano</part-name>
      <score-instrument id="P2-I1">
        <instrument-name>Piano</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="403.61">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>-0.00</right-margin>
            </system-margins>
          <top-system-distance>70.00</top-system-distance>
          </system-layout>
        </print>
      <attributes>
        <divisions>4</divisions>
        <key>
          <fifths>3</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="110.37" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>bo</text>
          </lyric>
        </note>
      <note default-x="145.07" default-y="-15.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="179.76" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>ie</text>
          </lyric>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        </note>
      <note default-x="283.86" default-y="-15.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>pat</text>
          </lyric>
        </note>
      <note default-x="318.55" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>rzał</text>
          </lyric>
        </note>
      <note default-x="361.33" default-y="-30.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>zwest</text>
          </lyric>
        </note>
      </measure>
    <measure number="2" width="317.68">
      <note default-x="29.06" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>6</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>middle</syllabic>
          <text>chnie</text>
          </lyric>
        </note>
      <note default-x="136.69" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>niem</text>
          </lyric>
        </note>
      <note default-x="172.57" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>single</syllabic>
          <text>na</text>
          </lyric>
        </note>
      <note default-x="208.45" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>wi</text>
          </lyric>
        </note>
      <note default-x="244.33" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>middle</syllabic>
          <text>szą</text>
          </lyric>
        </note>
      <note default-x="280.20" default-y="-30.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>cą</text>
          </lyric>
        </note>
      </measure>
    <measure number="3" width="335.20">
      <note default-x="7.75" default-y="-20.00">
        <grace slash="yes"/>
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        </note>
      <note default-x="26.19" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>zbro</text>
          </lyric>
        </note>
      <note default-x="91.20" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>ie</text>
          </lyric>
        </note>
      <note>
        <rest/>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  <part id="P2">
    <measure number="1" width="403.61">
      <print>
        <staff-layout number="1">
          <staff-distance>80.00</staff-distance>
          </staff-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>4</divisions>
        <key>
          <fifths>3</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note>
        <rest>
          <display-step>E</display-step>
          <display-octave>4</display-octave>
          </rest>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="145.07" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="145.07" default-y="-160.00">
        <chord/>
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="145.07" default-y="-145.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note>
        <rest>
          <display-step>E</display-step>
          <display-octave>4</display-octave>
          </rest>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="214.46" default-y="-175.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="214.46" default-y="-160.00">
        <chord/>
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="214.46" default-y="-150.00">
        <chord/>
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note>
        <rest>
          <display-step>E</display-step>
          <display-octave>4</display-octave>
          </rest>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="283.86" default-y="-135.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="318.55" default-y="-140.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="361.33" default-y="-150.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>8</duration>
        <voice>2</voice>
        <type>half</type>
        <staff>1</staff>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="283.86" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="318.55" default-y="-165.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="110.37" default-y="-225.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="179.76" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="249.16" default-y="-260.00">
        <pitch>
          <step>A</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="318.55" default-y="-255.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="361.33" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">end</beam>
        </note>
      </measure>
    <measure number="2" width="317.68">
      <note default-x="29.06" default-y="-145.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>6</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="136.69" default-y="-155.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="208.45" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="244.33" default-y="-155.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="280.20" default-y="-150.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="29.06" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="64.94" default-y="-165.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="100.81" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="136.69" default-y="-155.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="208.45" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="244.33" default-y="-165.00">
        <pitch>
          <step>D</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <accidental>sharp</accidental>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="280.20" default-y="-165.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <accidental>natural</accidental>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="29.06" default-y="-235.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="100.81" default-y="-250.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="136.69" default-y="-245.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">end</beam>
        </note>
      <note default-x="172.57" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="244.33" default-y="-275.00">
        <pitch>
          <step>E</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="3" width="335.20">
      <note>
        <rest/>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="57.93" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="57.93" default-y="-145.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="91.20" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="91.20" default-y="-145.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="122.93" default-y="-140.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="142.77" default-y="-145.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        </note>
      <note default-x="162.60" default-y="-150.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="182.43" default-y="-145.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="202.27" default-y="-140.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="222.10" default-y="-135.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        </note>
      <note default-x="241.93" default-y="-130.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="261.77" default-y="-125.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="281.60" default-y="-120.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="301.44" default-y="-115.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="26.19" default-y="-260.00">
        <pitch>
          <step>A</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <staff>2</staff>
        </note>
      <note default-x="122.93" default-y="-215.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="122.93" default-y="-205.00">
        <chord/>
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="162.24" default-y="-210.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>8</duration>
        <voice>6</voice>
        <type>half</type>
        <staff>2</staff>
        </note>
      <note default-x="162.60" default-y="-220.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="241.93" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

And here is the same MusicXML data with the grace note removed (which is not causing a problem with the converter):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <identification>
    <encoding>
      <software>MuseScore 2.0.3</software>
      <encoding-date>2017-06-06</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</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>
  <part-list>
    <score-part id="P1">
      <part-name print-object="no">Voice</part-name>
      <score-instrument id="P1-I1">
        <instrument-name>Voice</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P2">
      <part-name print-object="no">Piano</part-name>
      <score-instrument id="P2-I1">
        <instrument-name>Piano</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="404.13">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>0.00</right-margin>
            </system-margins>
          <top-system-distance>170.00</top-system-distance>
          </system-layout>
        </print>
      <attributes>
        <divisions>4</divisions>
        <key>
          <fifths>3</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="110.37" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>bo</text>
          </lyric>
        </note>
      <note default-x="145.15" default-y="-15.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="179.93" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>ie</text>
          </lyric>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        </note>
      <note default-x="284.28" default-y="-15.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>pat</text>
          </lyric>
        </note>
      <note default-x="319.07" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>rzał</text>
          </lyric>
        </note>
      <note default-x="361.85" default-y="-30.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>zwest</text>
          </lyric>
        </note>
      </measure>
    <measure number="2" width="318.20">
      <note default-x="29.06" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>6</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>middle</syllabic>
          <text>chnie</text>
          </lyric>
        </note>
      <note default-x="136.88" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>niem</text>
          </lyric>
        </note>
      <note default-x="172.83" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>single</syllabic>
          <text>na</text>
          </lyric>
        </note>
      <note default-x="208.77" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>wi</text>
          </lyric>
        </note>
      <note default-x="244.71" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>middle</syllabic>
          <text>szą</text>
          </lyric>
        </note>
      <note default-x="280.65" default-y="-30.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>cą</text>
          </lyric>
        </note>
      </measure>
    <measure number="3" width="334.17">
      <note default-x="24.65" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>zbro</text>
          </lyric>
        </note>
      <note default-x="89.73" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>ie</text>
          </lyric>
        </note>
      <note>
        <rest/>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  <part id="P2">
    <measure number="1" width="404.13">
      <print>
        <staff-layout number="1">
          <staff-distance>80.00</staff-distance>
          </staff-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>4</divisions>
        <key>
          <fifths>3</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note>
        <rest>
          <display-step>E</display-step>
          <display-octave>4</display-octave>
          </rest>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="145.15" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="145.15" default-y="-160.00">
        <chord/>
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="145.15" default-y="-145.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note>
        <rest>
          <display-step>E</display-step>
          <display-octave>4</display-octave>
          </rest>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="214.72" default-y="-175.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="214.72" default-y="-160.00">
        <chord/>
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="214.72" default-y="-150.00">
        <chord/>
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note>
        <rest>
          <display-step>E</display-step>
          <display-octave>4</display-octave>
          </rest>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="284.28" default-y="-135.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="319.07" default-y="-140.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="361.85" default-y="-150.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>8</duration>
        <voice>2</voice>
        <type>half</type>
        <staff>1</staff>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="284.28" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="319.07" default-y="-165.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="110.37" default-y="-225.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="179.93" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="249.50" default-y="-260.00">
        <pitch>
          <step>A</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="319.07" default-y="-255.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="361.85" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">end</beam>
        </note>
      </measure>
    <measure number="2" width="318.20">
      <note default-x="29.06" default-y="-145.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>6</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="136.88" default-y="-155.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="208.77" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="244.71" default-y="-155.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="280.65" default-y="-150.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="29.06" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="65.00" default-y="-165.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="100.94" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="136.88" default-y="-155.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="208.77" default-y="-160.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="244.71" default-y="-165.00">
        <pitch>
          <step>D</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <accidental>sharp</accidental>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        </note>
      <note default-x="280.65" default-y="-165.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>2</voice>
        <type>eighth</type>
        <accidental>natural</accidental>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="29.06" default-y="-235.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="100.94" default-y="-250.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="136.88" default-y="-245.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        <beam number="1">end</beam>
        </note>
      <note default-x="172.83" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="244.71" default-y="-275.00">
        <pitch>
          <step>E</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="3" width="334.17">
      <note>
        <rest/>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <staff>1</staff>
        </note>
      <note default-x="56.45" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="56.45" default-y="-145.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="89.73" default-y="-170.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        </note>
      <note default-x="89.73" default-y="-145.00">
        <chord/>
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="121.53" default-y="-140.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="141.40" default-y="-145.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        </note>
      <note default-x="161.28" default-y="-150.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="181.15" default-y="-145.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="201.03" default-y="-140.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="220.91" default-y="-135.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        </note>
      <note default-x="240.78" default-y="-130.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">begin</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="260.66" default-y="-125.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="280.53" default-y="-120.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">continue</beam>
        <beam number="2">continue</beam>
        </note>
      <note default-x="300.41" default-y="-115.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>down</stem>
        <staff>1</staff>
        <beam number="1">end</beam>
        <beam number="2">end</beam>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note default-x="24.65" default-y="-260.00">
        <pitch>
          <step>A</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note>
        <rest/>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <staff>2</staff>
        </note>
      <note default-x="121.53" default-y="-215.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="121.53" default-y="-205.00">
        <chord/>
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>eighth</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="160.92" default-y="-210.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>16</duration>
        </backup>
      <note>
        <rest/>
        <duration>8</duration>
        <voice>6</voice>
        <type>half</type>
        <staff>2</staff>
        </note>
      <note default-x="161.28" default-y="-220.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <note default-x="240.78" default-y="-240.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

Melisma

When in a vocal piece there are two verses on first section and only one in second, melisma marks everything in second section.

Zrzut ekranu z 2020-03-15 19-04-44

!!!Xfilter: extract -s 10-12 | melisma
!!!COM: Anonymous
!!!OTL@@POL: Wszyscy mieszkańcy domu niebieskiego
**kern	**text	**text
*staff1	*staff1	*staff1
*I"Canto I	*	*
=1-	=1-	=1-
*clefG2	*	*
*k[]	*	*
*met(c|)	*	*
*M2/2	*	*
1ee	Wszy-	Lej-
=2	=2	=2
2gg\	-scy	-cie
2ee\	miesz-	łzy
=3	=3	=3
4ff\@@	-kań-	gorz-
4ee\@@	.	.
2dd\@@	.	.
=4	=4	=4
1cc	-cy	-kie
=5	=5	=5
1gg	do-	płacz-
=6	=6	=6
1ee	-mu	-cie
=7	=7	=7
2ff#\	nie-	Kr&oacute;-
2gg\	-bie-	-la
=8	=8	=8
1aa	-skie-	swe-
.	.	.
.	.	.
.	.	.
=9	=9	=9
1gg#@	-go.	-go.
=10:|!	=10:|!	=10:|!
1aa@	Dziś	.
=11	=11	=11
2ff#\@	na	.
2ff#\@	po-	.
=12	=12	=12
1gg@	-wie-	.
=13	=13	=13
1gg@	-trzu	.
=14	=14	=14
2gg\@	wi-	.
2gg\@	-si	.
=15	=15	=15
2ff\@	pod-	.
2ff\@	-nie-	.
.	.	.
=16	=16	=16
2.ee\@@	-sio-	.
4dd\@@	.	.
=17	=17	=17
1cc@	-ny	.
=18	=18	=18
1ee@	Jam	.
=19	=19	=19
4ff\@@	B&oacute;g	.
4gg\@@	.	.
2aa\@	wcie-	.
=20	=20	=20
1gg#i@	-lo-	.
=21	=21	=21
1aa@	-ny.	.
==	==	==
*-	*-	*-
!!!RDF**kern: @ = marked note (melisma)

Dummy translation added

This example MusicXML data causes a dummy transposition to be added to the Humdrum conversion:

<?xml version="1.0" encoding='UTF-8' standalone='no' ?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.0">
 <work>
  <work-title>Empty transposition test</work-title>
 </work>

 <part-list>
  <score-part id="P1">
  </score-part>
 </part-list>
 <part id="P1">

  <measure number="1" width="314">
   <print new-page="yes">
    <system-layout>
     <system-margins>
      <left-margin>94</left-margin>
      <right-margin>0</right-margin>
     </system-margins>
     <top-system-distance>217</top-system-distance>
    </system-layout>
   </print>
   <attributes>
    <divisions>256</divisions>
    <key color="#000000">
     <fifths>0</fifths>
     <mode>major</mode>
    </key>
    <staves>1</staves>
    <clef number="1" color="#000000">
     <sign>G</sign>
     <line>2</line>
    </clef>
   </attributes>
   <note default-x="75">
    <rest />
    <duration>512</duration>
    <instrument id="P1-I1" />
    <voice>1</voice>
    <type>half</type>
    <staff>1</staff>
   </note>
  </measure>

  <measure number="2" width="432">
   
   <!-- this element is causing a transposition of *Trd0c0 to be added: -->
   <attributes>
    <staff-details number="1" print-object="yes" />
   </attributes>

   <note default-x="57">
    <rest />
    <duration>512</duration>
    <instrument id="P1-I1" />
    <voice>1</voice>
    <type>half</type>
    <staff>1</staff>
   </note>
  </measure>

 </part>
</score-partwise>

The converted score:

!!!OTL: Empty transposition test
**kern
!!pagebreak:original
*clefG2
*k[]
*C:
=1
2r
=2
*Trd0c0
2r
=
*-

The *Trd0c0 should not be there.

timebase and rhytmic values crossing barlines

timebase unfortunately does not work with rhytmic values crossing the barline:

file.krn

**kern	**kern
1C	00r
=	=
1C	.
=	=
1C	.
=	=
1C	.
=	=
*-	*-

timebase -t 16 file.krn

output:

**kern	**kern
*tb16	*tb16
1C	00r
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
.	.
=	=
timebase: ERROR: No duration specified in line 4 for token '.'.

Would it be possible to allow this kind of rhytms in timebase?

It would be also very helpful if timebase was built in Verovio Humdrum Viewer - that would help to deal with tremolo for instance.

Wrong spine number produced by musicxml2hum

A wrong number of spine is produced by running musicxml2hum,

The error message is

Previous line is: *     *v      *v      *       *       *       *v      *v      *v      *v      *       *
Error on line 299:
   Expected 8 fields,    but found 9
Line is: *      *       *v      *v      *       *       *       *       *

The output krn file is

8E-	8c# 8ff 8gg#X 8ggg#X	.	8g#X 8cc# 8ff	4r	8gg#X 8ccc#X 8fff	4r	8EE- 8E- 8G#X 8c# 8f 8g#X	8E- 8ccn 8ff 8gg#X	4r	8ggg#X	8ggg#X
*	*	*	*	*	*	*clefG2	*	*	*	*	*
8E-J	8c#J 8ggn 8bb- 8bbb-X	.	8b-J 8cc# 8ee- 8gg	.	8cccnJ 8eee- 8ggg	.	8EE-J 8E- 8Gn 8c# 8e- 8gn 8b-X	8E-J 8cc#X 8ggn 8bb-X	.	8bbb-XJ	8bbb-XJ
*	*v	*v	*	*	*	*v	*v	*v	*v	*	*
*	*	*v	*v	*	*	*	*	*

cmake dependency

With the addition of the pugixml external library, cmake is now needed to compile humlib. Try to find a way to avoid needing cmake.

Also there is a similar but lesser problem with unzip, as it is more commonly installed in linux and MacOS computers by default.

compiling humlib fails

I can't compile new version of humlib...
I did make update and then make, and that's what I get (Linux Mint 19.3):

make
ar: tworzenie lib/libpugixml.a
bin/makehumlib
[CC] humlib.o
src/humlib.cpp: In member function 'bool hum::HumdrumFileStructure::analyzeStrophes()':
src/humlib.cpp:22774:7: warning: variable 'dataQ' set but not used [-Wunused-but-set-variable]
  bool dataQ;
       ^~~~~
src/humlib.cpp: In member function 'bool hum::Tool_filter::run(hum::HumdrumFileSet&)':
src/humlib.cpp:56123:2: error: 'Tool_kernview' was not declared in this scope
  Tool_##NAME *tool = new Tool_##NAME;            \
  ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
src/humlib.cpp:56123:2: note: suggested alternative: 'Tool_kern2mens'
  Tool_##NAME *tool = new Tool_##NAME;            \
  ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
src/humlib.cpp:56123:15: error: 'tool' was not declared in this scope
  Tool_##NAME *tool = new Tool_##NAME;            \
               ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
src/humlib.cpp:56123:15: note: suggested alternative: 'bool'
  Tool_##NAME *tool = new Tool_##NAME;            \
               ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
src/humlib.cpp:56123:26: error: 'Tool_kernview' does not name a type; did you mean 'Tool_kern2mens'?
  Tool_##NAME *tool = new Tool_##NAME;            \
                          ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
src/humlib.cpp:56129:10: error: type '<type error>' argument given to 'delete', expected pointer
   delete tool;                                 \
          ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
src/humlib.cpp:56134:9: error: type '<type error>' argument given to 'delete', expected pointer
  delete tool;
         ^
src/humlib.cpp:56270:4: note: in expansion of macro 'RUNTOOL'
    RUNTOOL(kernview, infile, commands[i].second, status);
    ^~~~~~~
Makefile:189: recipe for target 'humlib.o' failed
make: *** [humlib.o] Error 1

Is it my system's fault? Or something else?

musedata2hum work title and movement title

For MuseData to Humdrum conversion, the 7th line in the file header (excluding comments) is the title, and the 8th line is the movement title. These should be mapped to !!!OTL and !!!OMV.

Also the 6th line is the (principal) source printed edition, which should perhaps be mapped to !!!SMS: (but this is not typically a full reference, just the publisher and primary editor of the edition, not to a specific edition or reprint of an edition.

Example:

https://raw.githubusercontent.com/musedata/corelli/master/op1/musedata/corelli-op1n10-03.msd

Screen Shot 2020-01-27 at 12 08 54 PM

Ignore MIDI files in MuseData to Humdrum coverter.

In the file https://github.com/musedata/corelli/blob/master/op1/musedata/corelli-op1n10-03.msd#L889-L918
there is a file used for MIDI conversion. This file should not be treated as an instrumental part as is currently being done.

These lines would be used to detect if it is related to MIDI:

Group memberships: midi
midi: part 1 of 4

(but there is only one file not four as implied by the "part 1 of 4" text. Alternatively, any filename that has "mchan" in it should be ignored:

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
FILENAME = mchan2
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Add system grouping information

An alternate system for system decroration would be useful to add as illustrated in the following example:

groups-system-decoration

**kern	**kern	**kern	**kern	**kern
*group2	*group2	*group1	*group1	*group1
*staff5	*staff4	*staff3	*staff2	*staff1
=	=	=	=	=
1C	1G	1c	1g	1cc
==	==	==	==	==
*-	*-	*-	*-	*-
!!!system-decoration: [(s1,s2,s3)],[(s4,s5)]

Notice the *group line: there are two groups, and these groups would be automatically beamed together as a group on the system without the need for the system-decoration instruction.

This would be useful as an alternate to the !!!system-decoration: system, not necessarily as a replacement.

When extracting music the *group information can be used to control the beaminging of staves.

Another idea is to allow for system-decoration to work on the group level, such as:

!!!system-decoration: [g1][g2]

g1 would automatically be identified and expanded to (s1, s2, s3) for example.

Should trillspell add an editorial marker (x)?

Tranks again for adding the trillspell filter.
Since after running this filter all trills can be considered 'interpreted', wouldn't it be better to add an x directly after the ornament?

musicxml2hum aborts when converting file exported from a musescore file

The attached MusicXML file, exported from a Musescore file, makes musicxml2hum abort at the Tool_musicxml2hum::convertOttavaToHumdrum() function.

I don't know exactly which is the culprit. May be the MusicXML file is ill-exported by Musescore. musicxml2hum aborts due to lines humlib.cpp:54401-54406 computing a 'staffindex' value equal to -1, which causes the program to abort due to an 'out_of_range' exception at line 54412. May be the use of 'atoi()' in that code produces some undefined behaviour.

exported_by_musescore.zip

1%3 -> 0. in musicxml2hum

The msuicxml2hum convert is converting dotted breves into 1%3 rather than 0.. The durations are the same, but the latter is better since it is a printable note. The conversion algorithm is probably not told about the augmentation dot.

Compiling from humlib.h and humlib.cpp fails at `include "pugiconfig.hpp"`

I put humlib.h and humlib.cpp in a clean directory together with the example from the README saved in a file called test.cpp. Then, g++ test.cpp fails with

./humlib.h:98:10: fatal error: 'pugiconfig.hpp' file not found
#include "pugiconfig.hpp"

Evidently this file (which as you know is in the include directory of this repository) is not found. Is it possible to compile from with only humlib.h and humlib.cpp somehow, as the README suggests? Or do we need to include other files as well? Thanks!

improve clef changes in MusicXML-to-humdrum converter

When clef changes occur when multiple voices are active, the subspines for those voices merge into a single spine to place the clef in the spine:

**kern	**kern
*part1	*part1
*staff2	*staff1
*clefF4	*clefG2
*k[f#c#]	*k[f#c#]
*M4/4	*M4/4
=1-	=1-
*^	*^
2A	1D	4cc#	4e
.	.	4dd	4f#
2E	.	4ee	4f#
.	.	4ff#	4e
*	*	*v	*v
*v	*v	*
=2	=2
*	*clefF4
*^	*^
2B	1BB	4g	4BB
.	.	4f#	4F#
2E	.	4d	4F#
.	.	4e	4C#
*	*	*v	*v
*v	*v	*
=3	=3
*	*clefG2
*^	*^
2A	1BB	4ff#	4d
.	.	4ee	4d
2F#	.	4dd	4c#
.	.	4ff#	4c#
*	*	*v	*v
*v	*v	*
==	==
*-	*-

Instead, the subspines should attempt to remain constant, inserting null interpretations (*) to remove the need for spine manipulators. Here is what the conversion should look like for the test example:

**kern	**kern
*part1	*part1
*staff2	*staff1
*clefF4	*clefG2
*k[f#c#]	*k[f#c#]
*M4/4	*M4/4
=1-	=1-
*^	*^
2A	1D	4cc#	4e
.	.	4dd	4f#
2E	.	4ee	4f#
.	.	4ff#	4e
=2	=2	=2	=2
*	*	*clefF4	*
2B	1BB	4g	4BB
.	.	4f#	4F#
2E	.	4d	4F#
.	.	4e	4C#
=3	=3	=3	=3
*	*	*clefG2	*
2A	1BB	4ff#	4d
.	.	4ee	4d
2F#	.	4dd	4c#
.	.	4ff#	4c#
*	*	*v	*v
*v	*v	*
==	==
*-	*-

Imported MusicXML file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <identification>
    <encoding>
      <software>MuseScore 2.0.3</software>
      <encoding-date>2017-06-22</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</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>
  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
      <part-abbreviation>Pno.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Piano</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="399.19">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>-0.00</right-margin>
            </system-margins>
          <top-system-distance>70.00</top-system-distance>
          </system-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>1</divisions>
        <key>
          <fifths>2</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="101.69" default-y="-15.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="175.66" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="249.64" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="323.61" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="101.69" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="175.66" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="249.64" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="323.61" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="101.33" default-y="-105.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="249.28" default-y="-120.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="98.37" default-y="-125.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="2" width="342.22">
      <attributes>
        <clef number="1">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="15.32" default-y="30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="96.65" default-y="25.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="177.97" default-y="15.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="259.30" default-y="20.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="15.32" default-y="-30.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="96.65" default-y="-10.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="177.97" default-y="-10.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="259.30" default-y="-25.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="14.96" default-y="-100.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="177.61" default-y="-120.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="3" width="315.08">
      <attributes>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="15.32" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="87.61" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="159.90" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="232.19" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="15.32" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="87.61" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="159.90" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="232.19" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <identification>
    <encoding>
      <software>MuseScore 2.0.3</software>
      <encoding-date>2017-06-22</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</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>
  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
      <part-abbreviation>Pno.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Piano</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="399.19">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>-0.00</right-margin>
            </system-margins>
          <top-system-distance>70.00</top-system-distance>
          </system-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>1</divisions>
        <key>
          <fifths>2</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="101.69" default-y="-15.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="175.66" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="249.64" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="323.61" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="101.69" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="175.66" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="249.64" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="323.61" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="101.33" default-y="-105.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="249.28" default-y="-120.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="98.37" default-y="-125.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="2" width="342.22">
      <attributes>
        <clef number="1">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="15.32" default-y="30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="96.65" default-y="25.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="177.97" default-y="15.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="259.30" default-y="20.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="15.32" default-y="-30.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="96.65" default-y="-10.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="177.97" default-y="-10.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="259.30" default-y="-25.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="14.96" default-y="-100.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="177.61" default-y="-120.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="3" width="315.08">
      <attributes>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="15.32" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="87.61" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="159.90" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="232.19" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="15.32" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="87.61" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="159.90" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="232.19" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="14.96" default-y="-105.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="159.54" default-y="-115.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="14.96" default-y="-105.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="159.54" default-y="-115.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

Preserve instrument names in mei2hum

When converting from MEI to Humdrum with the mei2hum tool, the instrument names should be preserved.

An example is found on the page . http://plugins.humdrum.org/topic/mei

Where the scoreDef element:

                  <scoreDef xml:id="scoredef-0000001205720306">
                        <staffGrp xml:id="staffgrp-0000001379034265" bar.thru="false">
                            <staffDef xml:id="staffdef-0000000879784629" clef.shape="G" clef.line="2" clef.dis="8" clef.dis.place="below" key.sig="4s" meter.count="3" meter.unit="4" n="1" lines="5">
                                <label xml:id="label-0000000665763348">Tenor 1</label>
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000478264066" clef.shape="G" clef.line="2" clef.dis="8" clef.dis.place="below" key.sig="4s" meter.count="3" meter.unit="4" n="2" lines="5">
                                <label xml:id="label-0000000421618405">Tenor 2</label>
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000932329301" clef.shape="F" clef.line="4" key.sig="4s" meter.count="3" meter.unit="4" n="3" lines="5">
                                <label xml:id="label-0000000112074548">Bass 1</label>
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000324409866" clef.shape="F" clef.line="4" key.sig="4s" meter.count="3" meter.unit="4" n="4" lines="5">
                                <label xml:id="label-0000000210608024">Bass 2</label>
                            </staffDef>
                        </staffGrp>
                        <pgHead xml:id="pghead-0000001418995525">
                            <rend xml:id="rend-0000001251888740" halign="center" valign="middle">
                                <rend xml:id="rend-0000001596763521" fontsize="x-large">Vier Lieder</rend>
                                <lb xml:id="lb-0000001589211302" /> 
<lb xml:id="lb-0000001196580865" /> </rend>
                            <rend xml:id="rend-0000000679757185" halign="right" valign="bottom" fontsize="small">Felix Mendelssohn</rend>
                        </pgHead>
                    </scoreDef>

contains <label> elements for each staff. These need to be converted into *I" records in the Humdrum file:

*I"Bass 2	*I"Bass 1	*I"Tenor 2	*I"Tenor 1

Figured bass continuation lines failed to translate using musicxml2hum

This is the MusicXML file:

<?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">
  <work>
    <work-title>Allein zu dir, Herr Jesu Christ</work-title>
    </work>
  <movement-title>Allein zu dir, Herr Jesu Christ</movement-title>
  <identification>
    <creator type="composer">Bach, Johann Sebastian</creator>
    <encoding>
      <software>MuseScore 2.3.2</software>
      <encoding-date>2019-10-08</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>7</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1697.14</page-height>
      <page-width>1200</page-width>
      <page-margins type="even">
        <left-margin>57.1429</left-margin>
        <right-margin>57.1429</right-margin>
        <top-margin>57.1429</top-margin>
        <bottom-margin>114.286</bottom-margin>
        </page-margins>
      <page-margins type="odd">
        <left-margin>57.1429</left-margin>
        <right-margin>57.1429</right-margin>
        <top-margin>57.1429</top-margin>
        <bottom-margin>114.286</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="1142.86" default-y="1515" justify="right" valign="bottom" font-size="12">Bach, Johann Sebastian</credit-words>
    </credit>
  <credit page="1">
    <credit-words default-x="600" default-y="1640" justify="center" valign="top" font-size="24">Allein zu dir, Herr Jesu Christ</credit-words>
    </credit>
  <part-list>
    <score-part id="P1">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Voice</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P2">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P2-I1">
        <instrument-name>Voice</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P3">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P3-I1">
        <instrument-name>Voice</instrument-name>
        </score-instrument>
      <midi-device id="P3-I1" port="1"></midi-device>
      <midi-instrument id="P3-I1">
        <midi-channel>3</midi-channel>
        <midi-program>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P4">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P4-I1">
        <instrument-name>Voice</instrument-name>
        </score-instrument>
      <midi-device id="P4-I1" port="1"></midi-device>
      <midi-instrument id="P4-I1">
        <midi-channel>4</midi-channel>
        <midi-program>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    </part-list>
  <part id="P1">
    <measure number="1" width="151.44">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>57.53</left-margin>
            <right-margin>0.00</right-margin>
            </system-margins>
          <top-system-distance>195.00</top-system-distance>
          </system-layout>
        </print>
      <attributes>
        <divisions>2</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="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="2" width="295.28">
      <note default-x="12.00" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="51.12" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="90.24" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="168.49" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="231.09" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="3" width="280.54">
      <note default-x="12.00" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="81.89" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>down</stem>
        </note>
      <note default-x="222.74" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="4" width="300.92">
      <note default-x="12.00" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="75.85" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="139.70" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="219.51" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    </part>
  <part id="P2">
    <measure number="1" width="151.44">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>2</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="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="2" width="295.28">
      <note default-x="12.00" default-y="-150.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="51.12" default-y="-155.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>sharp</accidental>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="90.24" default-y="-150.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="168.49" default-y="-155.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="231.09" default-y="-155.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <accidental>natural</accidental>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="3" width="280.54">
      <note default-x="12.00" default-y="-150.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="82.25" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="117.37" default-y="-140.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="152.49" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="222.74" default-y="-150.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="4" width="300.92">
      <note default-x="12.00" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="75.85" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="139.70" default-y="-140.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <accidental>sharp</accidental>
        <stem>up</stem>
        </note>
      <note default-x="219.51" default-y="-135.00">
        <pitch>
          <step>G</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <accidental>sharp</accidental>
        <stem>up</stem>
        </note>
      </measure>
    </part>
  <part id="P3">
    <measure number="1" width="151.44">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>2</divisions>
        <key>
          <fifths>0</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
          <clef-octave-change>-1</clef-octave-change>
          </clef>
        </attributes>
      <direction placement="above">
        <direction-type>
          <metronome parentheses="no" default-x="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="113.60" default-y="-230.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      </measure>
    <measure number="2" width="295.28">
      <note default-x="12.00" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="90.24" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="168.49" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="231.09" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="3" width="280.54">
      <note default-x="12.00" default-y="-230.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="47.12" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="81.89" default-y="-240.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        </note>
      <note default-x="222.74" default-y="-240.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="4" width="300.92">
      <note default-x="12.00" default-y="-240.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="75.85" default-y="-215.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="139.70" default-y="-220.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="219.51" default-y="-220.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    </part>
  <part id="P4">
    <measure number="1" width="151.44">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>2</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>
      <direction placement="above">
        <direction-type>
          <metronome parentheses="no" default-x="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-315.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="2" width="295.28">
      <figured-bass>
        <figure>
          <figure-number>5</figure-number>
          <extend type="start" />
          </figure>
        </figured-bass>
      <note default-x="12.00" default-y="-335.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <figured-bass>
        <figure>
          <extend type="continue" />
          </figure>
        </figured-bass>
      <note default-x="51.12" default-y="-325.00">
        <pitch>
          <step>F</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <figured-bass>
        <figure>
          <extend type="continue" />
          </figure>
        </figured-bass>
      <note default-x="90.24" default-y="-330.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <figured-bass>
        <figure>
          <extend type="stop" />
          </figure>
        </figured-bass>
      <note default-x="129.37" default-y="-335.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <figured-bass>
        <figure>
          <prefix>sharp</prefix>
          </figure>
        </figured-bass>
      <note default-x="168.49" default-y="-315.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <figured-bass>
        <figure>
          <figure-number>5</figure-number>
          <suffix>natural</suffix>
          </figure>
        </figured-bass>
      <note default-x="231.09" default-y="-325.00">
        <pitch>
          <step>F</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <tie type="start"/>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <notations>
          <tied type="start"/>
          </notations>
        </note>
      </measure>
    <measure number="3" width="280.54">
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        <figure>
          <figure-number>4</figure-number>
          </figure>
        <figure>
          <figure-number>2</figure-number>
          </figure>
        </figured-bass>
      <note default-x="12.00" default-y="-325.00">
        <pitch>
          <step>F</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <tie type="stop"/>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <notations>
          <tied type="stop"/>
          </notations>
        </note>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        </figured-bass>
      <note default-x="82.25" default-y="-330.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="117.37" default-y="-335.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        </figured-bass>
      <note default-x="152.49" default-y="-330.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="187.62" default-y="-325.00">
        <pitch>
          <step>F</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="222.74" default-y="-320.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="4" width="300.92">
      <note default-x="12.00" default-y="-340.00">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <notations>
          <fermata type="upright"/>
          </notations>
        </note>
      <note default-x="75.85" default-y="-305.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        <figure>
          <figure-number>4</figure-number>
          <suffix>cross</suffix>
          </figure>
        <figure>
          <figure-number>2</figure-number>
          </figure>
        </figured-bass>
      <note default-x="139.70" default-y="-305.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="179.61" default-y="-300.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <figured-bass>
        <figure>
          <figure-number>7</figure-number>
          </figure>
        <figure>
          <figure-number>5</figure-number>
          <suffix>cross</suffix>
          </figure>
        <figure>
          <figure-number>2</figure-number>
          </figure>
        </figured-bass>
      <note default-x="219.51" default-y="-305.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="259.42" default-y="-310.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      </measure>
    </part>
  </score-partwise>

It can be rendered by MuseScore 2.3.2 like this, where you can see the continuation line:

image

This is the **kern code after using musicxml2hum to translate:

!!!COM:	Bach, Johann Sebastian
!!!OMV:	Allein zu dir, Herr Jesu Christ
!!!OTL:	Allein zu dir, Herr Jesu Christ
**kern	**fb	**kern	**kern	**kern
*part4	*part4	*part3	*part2	*part1
*staff4	*	*staff3	*staff2	*staff1
*I"Voice	*	*I"Voice	*I"Voice	*I"Voice
*I'V	*	*I'V	*I'V	*I'V
*clefF4	*	*clefGv2	*clefG2	*clefG2
*k[]	*	*k[]	*k[]	*k[]
*M4/4	*	*M4/4	*M4/4	*M4/4
4A	.	8AL	4e	4cc
.	.	8BJ	.	.
=1	=1	=1	=1	=1
8DL	5_	4A	8dL	8fL
8FJ		.	8c#XJ	8eJ
8EL		4A	4d	4f
8DJ		.	.	.
4A;	#	4A;	4c#;	4e;
[4F	nr5	4A	4cn	4a
=2	=2	=2	=2	=2
4F]	6 4 2	8BL	4d	4g
.	.	8AJ	.	.
8EL	6	2G	8gL	2cc
8DJ	.	.	8fJ	.
8EL	6	.	4e	.
8FJ	.	.	.	.
4G	.	4G	4d	4b
=3	=3	=3	=3	=3
4C;	.	4G;	4e;	4cc;
4c	.	4e	4e	4g
8cL	6 4| 2	4d	4f#X	4a
8dJ	.	.	.	.
8cL	7 5| 2	4d	4g#X	4b
8BJ	.	.	.	.
=	=	=	=	=
*-	*-	*-	*-	*-
!!!system-decoration: s1,s2,s3,s4

An error appeared when using the musicxml2hum command-line to translate:
image

That's where the continuation line begins. The **kern code cannot be rendered by Verovio Humdrum Viewer becasue of the error.

I managed to fix the error by manually changed the **kern code:

!!!COM:	Bach, Johann Sebastian
!!!OMV:	Allein zu dir, Herr Jesu Christ
!!!OTL:	Allein zu dir, Herr Jesu Christ
**kern	**fb	**kern	**kern	**kern
*part4	*part4	*part3	*part2	*part1
*staff4	*	*staff3	*staff2	*staff1
*I"Voice	*	*I"Voice	*I"Voice	*I"Voice
*I'V	*	*I'V	*I'V	*I'V
*clefF4	*	*clefGv2	*clefG2	*clefG2
*k[]	*	*k[]	*k[]	*k[]
*M4/4	*	*M4/4	*M4/4	*M4/4
4A	.	8AL	4e	4cc
.	.	8BJ	.	.
=1	=1	=1	=1	=1
8DL	5_	4A	8dL	8fL
8FJ	._	.	8c#XJ	8eJ
8EL	._	4A	4d	4f
8DJ	._	.	.	.
4A;	#	4A;	4c#;	4e;
[4F	nr5	4A	4cn	4a
=2	=2	=2	=2	=2
4F]	6 4 2	8BL	4d	4g
.	.	8AJ	.	.
8EL	6	2G	8gL	2cc
8DJ	.	.	8fJ	.
8EL	6	.	4e	.
8FJ	.	.	.	.
4G	.	4G	4d	4b
=3	=3	=3	=3	=3
4C;	.	4G;	4e;	4cc;
4c	.	4e	4e	4g
8cL	6 4| 2	4d	4f#X	4a
8dJ	.	.	.	.
8cL	7 5| 2	4d	4g#X	4b
8BJ	.	.	.	.
=	=	=	=	=
*-	*-	*-	*-	*-
!!!system-decoration: s1,s2,s3,s4

And the rendered the result is:

image

Thank you for the help!

Figured bass information partially missing when using musicxml2hum to convert

This is the MusicXML file:

<?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">
  <work>
    <work-title>Allein zu dir, Herr Jesu Christ</work-title>
    </work>
  <movement-title>Allein zu dir, Herr Jesu Christ</movement-title>
  <identification>
    <creator type="composer">Bach, Johann Sebastian</creator>
    <encoding>
      <software>MuseScore 2.3.2</software>
      <encoding-date>2019-10-08</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>7</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1697.14</page-height>
      <page-width>1200</page-width>
      <page-margins type="even">
        <left-margin>57.1429</left-margin>
        <right-margin>57.1429</right-margin>
        <top-margin>57.1429</top-margin>
        <bottom-margin>114.286</bottom-margin>
        </page-margins>
      <page-margins type="odd">
        <left-margin>57.1429</left-margin>
        <right-margin>57.1429</right-margin>
        <top-margin>57.1429</top-margin>
        <bottom-margin>114.286</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="1142.86" default-y="1490" justify="right" valign="bottom" font-size="12">Bach, Johann Sebastian</credit-words>
    </credit>
  <credit page="1">
    <credit-words default-x="600" default-y="1640" justify="center" valign="top" font-size="24">Allein zu dir, Herr Jesu Christ</credit-words>
    </credit>
  <part-list>
    <score-part id="P1">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Voice</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P2">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P2-I1">
        <instrument-name>Voice</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P3">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P3-I1">
        <instrument-name>Voice</instrument-name>
        </score-instrument>
      <midi-device id="P3-I1" port="1"></midi-device>
      <midi-instrument id="P3-I1">
        <midi-channel>3</midi-channel>
        <midi-program>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P4">
      <part-name>Voice</part-name>
      <part-abbreviation>V</part-abbreviation>
      <score-instrument id="P4-I1">
        <instrument-name>Voice</instrument-name>
        </score-instrument>
      <midi-device id="P4-I1" port="1"></midi-device>
      <midi-instrument id="P4-I1">
        <midi-channel>4</midi-channel>
        <midi-program>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    </part-list>
  <part id="P1">
    <measure number="1" width="157.09">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>57.53</left-margin>
            <right-margin>0.00</right-margin>
            </system-margins>
          <top-system-distance>220.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="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="2" width="318.45">
      <note default-x="12.00" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="88.21" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="126.32" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="164.43" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="202.53" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="240.64" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="3" width="314.65">
      <note default-x="12.00" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="108.40" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>down</stem>
        </note>
      <note default-x="253.91" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="4" width="237.99">
      <note default-x="12.00" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>down</stem>
        <notations>
          <fermata type="inverted"/>
          </notations>
        </note>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="174.16" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    </part>
  <part id="P2">
    <measure number="1" width="157.09">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</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>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <direction placement="above">
        <direction-type>
          <metronome parentheses="no" default-x="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="2" width="318.45">
      <note default-x="12.00" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="50.11" default-y="-150.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="88.21" default-y="-155.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="126.32" default-y="-150.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="164.43" default-y="-145.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="202.53" default-y="-140.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="240.64" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="3" width="314.65">
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>6</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <stem>up</stem>
        </note>
      <note default-x="151.77" default-y="-140.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>sharp</accidental>
        <stem>up</stem>
        </note>
      <note default-x="194.78" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="253.91" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="4" width="237.99">
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <notations>
          <fermata type="inverted"/>
          </notations>
        </note>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="174.16" default-y="-135.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    </part>
  <part id="P3">
    <measure number="1" width="157.09">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</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>G</sign>
          <line>2</line>
          <clef-octave-change>-1</clef-octave-change>
          </clef>
        </attributes>
      <direction placement="above">
        <direction-type>
          <metronome parentheses="no" default-x="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="116.42" default-y="-230.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      </measure>
    <measure number="2" width="318.45">
      <note default-x="12.00" default-y="-225.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="50.11" default-y="-230.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="88.21" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="164.43" default-y="-240.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      <note default-x="240.64" default-y="-240.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="278.75" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>up</stem>
        <beam number="1">end</beam>
        </note>
      </measure>
    <measure number="3" width="314.65">
      <note default-x="12.00" default-y="-230.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        </note>
      <note default-x="55.01" default-y="-235.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>16th</type>
        <stem>up</stem>
        <beam number="1">begin</beam>
        <beam number="2">begin</beam>
        </note>
      <note default-x="81.89" default-y="-230.00">
        <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">end</beam>
        </note>
      <note default-x="108.77" default-y="-225.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="151.77" default-y="-220.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <note default-x="194.78" default-y="-215.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <note default-x="253.91" default-y="-220.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="4" width="237.99">
      <note default-x="12.00" default-y="-215.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>down</stem>
        <notations>
          <fermata type="inverted"/>
          </notations>
        </note>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="174.16" default-y="-225.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    </part>
  <part id="P4">
    <measure number="1" width="157.09">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</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>
      <direction placement="above">
        <direction-type>
          <metronome parentheses="no" default-x="-33.50" default-y="40.00">
            <beat-unit>quarter</beat-unit>
            <per-minute>100</per-minute>
            </metronome>
          </direction-type>
        <sound tempo="100"/>
        </direction>
      <note default-x="77.35" default-y="-315.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="2" width="318.45">
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        </figured-bass>
      <note default-x="12.00" default-y="-330.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <figured-bass>
        <figure>
          <figure-number>5</figure-number>
          </figure>
        <figure>
          <figure-number>3</figure-number>
          </figure>
        <duration>2</duration>
        </figured-bass>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        <figure>
          <figure-number>4</figure-number>
          </figure>
        <duration>2</duration>
        </figured-bass>
      <note default-x="88.21" default-y="-325.00">
        <pitch>
          <step>F</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        </figured-bass>
      <note default-x="164.43" default-y="-330.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">begin</beam>
        </note>
      <note default-x="202.53" default-y="-335.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <beam number="1">end</beam>
        </note>
      <figured-bass>
        <figure>
          <figure-number>5</figure-number>
          </figure>
        <duration>2</duration>
        </figured-bass>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        <duration>2</duration>
        </figured-bass>
      <note default-x="240.64" default-y="-340.00">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    <measure number="3" width="314.65">
      <note default-x="12.00" default-y="-320.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <figured-bass>
        <figure>
          <figure-number>7</figure-number>
          </figure>
        <duration>2</duration>
        </figured-bass>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          <suffix>backslash</suffix>
          </figure>
        <duration>2</duration>
        </figured-bass>
      <note default-x="108.77" default-y="-315.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <figured-bass>
        <figure>
          <figure-number>6</figure-number>
          </figure>
        <figure>
          <figure-number>4</figure-number>
          </figure>
        </figured-bass>
      <note default-x="194.78" default-y="-320.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      <figured-bass>
        <figure>
          <figure-number>5</figure-number>
          </figure>
        <figure>
          <figure-number>3</figure-number>
          </figure>
        </figured-bass>
      <note default-x="253.91" default-y="-320.00">
        <pitch>
          <step>G</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        </note>
      </measure>
    <measure number="4" width="237.99">
      <note default-x="12.00" default-y="-340.00">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>8</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <notations>
          <fermata type="inverted"/>
          </notations>
        </note>
      <note>
        <rest/>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        </note>
      <note default-x="174.16" default-y="-340.00">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        </note>
      </measure>
    </part>
  </score-partwise>

This can be rendered by MuseScore 2.3.2 like this:

image

This is the resulting **kern file using musicxml2hum to convert:

!!!COM:	Bach, Johann Sebastian
!!!OMV:	Allein zu dir, Herr Jesu Christ
!!!OTL:	Allein zu dir, Herr Jesu Christ
**kern	**fb	**kern	**kern	**kern
*part4	*part4	*part3	*part2	*part1
*staff4	*	*staff3	*staff2	*staff1
*I"Voice	*	*I"Voice	*I"Voice	*I"Voice
*I'V	*	*I'V	*I'V	*I'V
*clefF4	*	*clefGv2	*clefG2	*clefG2
*k[]	*	*k[]	*k[]	*k[]
*M4/4	*	*M4/4	*M4/4	*M4/4
4A	.	8AL	4e	4cc
.	.	8BJ	.	.
=1	=1	=1	=1	=1
4E	6	8cL	8eL	4g
.	.	8BJ	8dJ	.
4F	6 4	4A	8cL	8aL
.	.	.	8dJ	8bJ
8EL	6	4G	8eL	8ccL
8DJ	.	.	8fJ	8ddJ
4C	6	8GL	4g	4ee
.	.	8AJ	.	.
=2	=2	=2	=2	=2
4G	.	8B	4.g	4dd
.	.	16ALL	.	.
.	.	16BJJ	.	.
4A	6\	8cL	.	2cc
.	.	8dJ	8f#X	.
4G	6 4	4e	4g	.
4G	5 3	4d	4g	4b
=3	=3	=3	=3	=3
2C;	.	2e;	2g;	2cc;
4r	.	4r	4r	4r
4C	.	4c	4g	4ee
=	=	=	=	=
*-	*-	*-	*-	*-
!!!system-decoration: s1,s2,s3,s4

This can be rendered by Verovio Humdrum Viewer like this:

image

As you can see, there are two problems:

  • Figures under a stationary bass (mm.2 and mm.3) are partially missing.
  • The slashed 6 is not translated properly (it should be #6| in **kern, not 6\).

Thank you for the help!

mei2hum: multi-measure rests

Currently multi-measure rests (element multiRest) are not converted. See attached MEI file.
a.mei.zip

In VHV a sequence of whole measure rests is encoded as a sequence of rests. For OMR purposes, I propose something like:
rr<N>
were stands for the number of measures the rest spans (e.g. rr21 would encode the muti-measure rest below). For measures occupied by the rest the null token can be used.
multimeasure_rest

autobeam: beamed rest

The autobeam tool likes to add rests inside of beams:

screen shot 2017-06-15 at 1 34 18 pm

!!!filter: autobeam
**kern
*M6/8
=1
8c
8d
8e
8f
8g
8r
==
*-

This rendering should be an option, but the default rendering should be:

screen shot 2017-06-15 at 1 35 09 pm

musicxml2hum system and page break

Output xml file from Muse score includes <print new-system="yes"> for system breaks and <print new-page="yes"> for page breaks. This information is lost in musicxml2hum converter. It would make sense to keep this information in kern output possibly as !!linebreak:original and !!pagebreak:original or similarly.

Generalize transpose tool

Transposition with the transpose tool is limited to double sharp/flats. Expand to allow more sharp/flats.

Example:

humcat h://mozart/sonatas/sonata06-3h.krn | myank -m 6 | transpose -b 18

Has problem with the F-triple-sharp:

**kern	**kern	**dynam
*clefF4	*clefG2	*
*k[f#c#g#d#a#]	*k[f#c#g#d#a#]	*
*g#:	*g#:	*
*M2/2	*M2/2	*
*met(c|)	*met(c|)	*
*MM110	*MM110	*
=6	=6	=6
8r	4gg##)	.
8B 8d# 8f#L	.	.
8B 8d# 8f#	4r	.
8B 8d# 8f#J	.	.
8r	(4.gg##tt	f
8B 8d# 8f#L	.	.
8B 8d# 8f#	.	.
8B 8d# 8f#J	16aa########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################LL	.
.	16gg##JJ	.
=	=	=
*-	*-	*-

autobeam: vocal beaming

Add an option to autobeam for vocal beaming (beam notes only if they are sung to the same syllable.

Going from one to three layers in MusicXML-to-Humdrum converter

When the voice count goes from one to three in a spine, there needs to be an additional *^ manipulator added onto the next line to split two spines into three.

Test output:

*part1	*part1
*staff2	*staff1
*clefF4	*clefG2
*k[f#c#]	*k[f#c#]
*M4/4	*M4/4
=1-	=1-
*^	*
2A	1D	4a
.	.	4b
2E	.	4g
.	.	4b
=2	=2	=2
*	*	*^
2B	1BB	4gg	4B	1e
.	.	4ff#	4f#	.
2E	.	4dd	4f#	.
.	.	4ee	4c#	.
*	*	*	*v	*v
=3	=3	=3	=3
2A	1BB	4ff#	4d
.	.	4ee	4d
2F#	.	4dd	4c#
.	.	4ff#	4c#
*	*	*v	*v
*v	*v	*
==	==
*-	*-

The correct output:

**kern	**kern
*part1	*part1
*staff2	*staff1
*clefF4	*clefG2
*k[f#c#]	*k[f#c#]
*M4/4	*M4/4
=1-	=1-
*^	*
2A	1D	4a
.	.	4b
2E	.	4g
.	.	4b
=2	=2	=2
*	*	*^
*	*	*	*^
2B	1BB	4gg	4B	1e
.	.	4ff#	4f#	.
2E	.	4dd	4f#	.
.	.	4ee	4c#	.
*	*	*	*v	*v
=3	=3	=3	=3
2A	1BB	4ff#	4d
.	.	4ee	4d
2F#	.	4dd	4c#
.	.	4ff#	4c#
*	*	*v	*v
*v	*v	*
==	==
*-	*-

MusicXML input data:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <identification>
    <encoding>
      <software>MuseScore 2.0.3</software>
      <encoding-date>2017-06-22</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</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>
  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
      <part-abbreviation>Pno.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Piano</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="398.52">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>0.00</right-margin>
            </system-margins>
          <top-system-distance>170.00</top-system-distance>
          </system-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>1</divisions>
        <key>
          <fifths>2</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="101.69" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="175.50" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="249.30" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="323.11" default-y="-20.00">
        <pitch>
          <step>B</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="101.33" default-y="-105.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="248.94" default-y="-120.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="98.37" default-y="-125.00">
        <pitch>
          <step>D</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="2" width="322.15">
      <note default-x="18.64" default-y="5.00">
        <pitch>
          <step>G</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="91.63" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="167.93" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="244.24" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="15.32" default-y="-55.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="91.63" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="167.93" default-y="-35.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="244.24" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>3</voice>
        <type>whole</type>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="14.96" default-y="-100.00">
        <pitch>
          <step>B</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="167.57" default-y="-120.00">
        <pitch>
          <step>E</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="3" width="335.83">
      <note default-x="15.32" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="92.80" default-y="-5.00">
        <pitch>
          <step>E</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="170.27" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <note default-x="247.75" default-y="0.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="15.32" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="92.80" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="170.27" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <note default-x="247.75" default-y="-50.00">
        <pitch>
          <step>C</step>
          <alter>1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="14.96" default-y="-105.00">
        <pitch>
          <step>A</step>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <note default-x="169.91" default-y="-115.00">
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>3</octave>
          </pitch>
        <duration>2</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-135.00">
        <pitch>
          <step>B</step>
          <octave>2</octave>
          </pitch>
        <duration>4</duration>
        <voice>6</voice>
        <type>whole</type>
        <staff>2</staff>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

Remove sudo in Makefile.programs

Is sudo really needed here? This throws an error creating humlib in an alpine Docker image. I could of course just run apk add sudo, but since it is not recommended to add this into a Docker container maybe it's worth checking if sudo is really necessary here:

@(cd bin && strip * ; sudo cp $(PROGS) /usr/local/bin)

Here is the Dockerfile im using: https://github.com/WolfgangDrescher/humdrum-docker-image/blob/master/Dockerfile

Error log:

 => [20/21] RUN make
 => ERROR [21/21] RUN make install
------
 > [21/21] RUN make install:
#25 0.619 make[1]: Entering directory '/usr/local/humlib'
#25 1.836 strip: makehumlib: file format not recognized
#25 2.640 /bin/sh: sudo: not found
#25 2.641 make[1]: Leaving directory '/usr/local/humlib'
#25 2.641 make[1]: *** [Makefile.programs:103: install] Error 127
#25 2.642 make: *** [Makefile:176: install] Error 2
------
executor failed running [/bin/sh -c make install]: exit code: 2

mei2hum: partial mensural conversion to **kern (not **mens)

When converting from PAEC, Verovio can export mensural notation into files such as:

<?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 />
            </titleStmt>
            <pubStmt>
                <date>2020-03-12 21:01:00</date>
            </pubStmt>
        </fileDesc>
        <encodingDesc>
            <projectDesc>
                <p>Encoded with Verovio version 2.7.0-dev-57a617f</p>
            </projectDesc>
        </encodingDesc>
    </meiHead>
    <music>
        <body>
            <mdiv xml:id="mdiv-0000001810695481">
                <score xml:id="score-0000000368187530">
                    <scoreDef xml:id="scoredef-0000000660298961" key.sig="1f" mensur.sign="C">
                        <staffGrp xml:id="staffgrp-0000000683105239">
                            <staffDef xml:id="staffdef-0000000502175011" n="1" notationtype="mensural" lines="5" clef.shape="C" clef.line="1" />
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-0000001227429703">
                        <measure xml:id="measure-0000000157327193" right="invis">
                            <staff xml:id="staff-0000001419185946" n="1">
                                <layer xml:id="layer-0000001600440127" n="1">
                                    <note xml:id="note-0000001364535814" dur="brevis" oct="4" pname="f" />
                                    <note xml:id="note-0000000775559585" dur="semibrevis" oct="4" pname="g" />
                                    <note xml:id="note-0000001751691452" dur="brevis" oct="4" pname="f" />
                                    <note xml:id="note-0000000824917041" dur="semibrevis" oct="4" pname="g" />
                                    <note xml:id="note-0000000226283055" dur="minima" oct="4" pname="a" />
                                    <note xml:id="note-0000002093250195" dur="minima" oct="4" pname="a" />
                                    <note xml:id="note-0000001178922211" dur="minima" oct="4" pname="b">
                                        <accid xml:id="accid-0000001461473055" accid.ges="f" />
                                    </note>
                                    <note xml:id="note-0000000059680999" dur="minima" oct="4" pname="a" />
                                    <note xml:id="note-0000000183687044" dur="semibrevis" oct="5" pname="c" />
                                    <note xml:id="note-0000001294147769" dur="minima" oct="4" pname="a" />
                                    <note xml:id="note-0000001027176767" dur="minima" oct="5" pname="d" />
                                    <dot xml:id="dot-0000000138884736" />
                                    <note xml:id="note-0000002068517310" dur="semiminima" oct="5" pname="c" />
                                    <note xml:id="note-0000002105151534" dur="semiminima" oct="4" pname="a" />
                                    <note xml:id="note-0000001488747613" dur="semiminima" oct="4" pname="b">
                                        <accid xml:id="accid-0000001049160494" accid.ges="f" />
                                    </note>
                                    <note xml:id="note-0000000252197141" dur="semibrevis" oct="5" pname="c" />
                                    <dot xml:id="dot-0000001692113256" />
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

If for any reason we want to translate into a modern notation **kern file (considering all notes as imperfect), unless you want to avoid this conversion and prepare a mei2mens conversion, the code below be used that converts the mensural figures and processed individual dots located just after the note or rests.

End of method Tool_mei2hum::parseLayer:

HumNum  starting = starttime;
	string dummy;

	// drizo - before processing convert mensural dots that appear after a note or rest as attributes
	// e.g. <note> .... </note> <dot...> 
	// is converted into
	// <note dots="1">	
	// end drizo

	int nchildren = (int)children.size(); // drizo
	bool skipNextDot = false; // drizo
	for (int i=0; i<nchildren; i++) {
		string nodename = children[i].name();

		if (nodename == "note" ||nodename == "rest") { // drizo
			skipNextDot = false;// drizo
			if (i<nchildren-1 &&  strcmp(children[i+1].name(), "dot")==0) {// drizo
				xml_attribute dotattr = children[i].append_attribute("dots");// drizo
				dotattr.set_value("1");// drizo
				skipNextDot = true;// drizo
			}// drizo
		} // drizo

		if (nodename == "note") {
			starttime = parseNote(children[i], xml_node(NULL), dummy, starttime, 0);
		} else if (nodename == "chord") {
			starttime = parseChord(children[i], starttime, 0);
		} else if (nodename == "rest") {
			starttime = parseRest(children[i], starttime);
		} else if (nodename == "space") {
			starttime = parseRest(children[i], starttime);
		} else if (nodename == "mRest") {
			starttime = parseMRest(children[i], starttime);
		//} else if (nodename == "multiRest") { // drizo
		//	parseMultiRest(children[i], starttime); // drizo
		} else if (nodename == "beam") {
			starttime = parseBeam(children[i], starttime);
		} else if (nodename == "tuplet") {
			starttime = parseTuplet(children[i], starttime);
		} else if (nodename == "clef") {
			parseClef(children[i], starttime);
		} else if (nodename == "meterSig") { // drizo
			parseMeterSig(children[i], starttime); // drizo
		} else if (nodename == "dot") { // drizo
			if (!skipNextDot) {// drizo
				cerr << "Dot found after an element other than note or rest" <<
					layer.name() << "/" << nodename << CURRLOC << endl;// drizo
			}// drizo
			skipNextDot = false;// drizo
		} else {
			cerr << DKHTP << layer.name() << "/" << nodename << CURRLOC << endl;
		}
	}

And in HumNum Tool_mei2hum::getDuration:

HumNum output;
	if (dur == "breve") {
		output = 2;
	} else if (dur == "long") {
		output = 4;
	} else if (dur == "maxima") {
		output = 8;
	} 
	/* drizo from here - mensural figures */ 
	else if (dur == "longa") {
		output = 4;
	} else if (dur == "brevis") {
		output = 2;
	} else if (dur == "semibrevis") { 
		output = 1;
	} else if (dur == "minima") {
		output = 1;
		output /= 2;
	} else if (dur == "semiminima") {
		output = 1;
		output /= 4;
	} else if (dur == "fusa") {
		output = 1;
		output /= 8;
	} /* drizo - to here */
	else if (isdigit(dur[0])) {
		output = 1;
		output /= stoi(dur);
	} else {
		cerr << "Unknown " << element.name() << "@dur: " << dur << endl;
		return 0;
	}

I've added // drizo comments just to show the changed lines

musicxml2hum: newline character

Newline character in text note saved in XML file causes problem with the conversion:
XML:

<?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 2.3.2</software>
      <encoding-date>2019-12-12</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</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>
  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
      <part-abbreviation>Pno.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Piano</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="185.20">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>21.00</left-margin>
            <right-margin>609.23</right-margin>
            </system-margins>
          <top-system-distance>70.00</top-system-distance>
          </system-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>1</divisions>
        <key>
          <fifths>0</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="77.35" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <direction placement="above">
        <direction-type>
          <words default-y="40.00">note
with newline</words>
        </direction-type>
      <staff>2</staff>
      </direction>
    <note default-x="77.35" default-y="-130.00">
      <pitch>
        <step>C</step>
        <octave>3</octave>
        </pitch>
      <duration>4</duration>
      <voice>5</voice>
      <type>whole</type>
      <staff>2</staff>
      </note>
    </measure>
  <measure number="2" width="126.53">
    <note default-x="12.00" default-y="-20.00">
      <pitch>
        <step>B</step>
        <octave>4</octave>
        </pitch>
      <duration>4</duration>
      <voice>1</voice>
      <type>whole</type>
      <staff>1</staff>
      </note>
    <backup>
      <duration>4</duration>
      </backup>
    <note default-x="12.00" default-y="-125.00">
      <pitch>
        <step>D</step>
        <octave>3</octave>
        </pitch>
      <duration>4</duration>
      <voice>5</voice>
      <type>whole</type>
      <staff>2</staff>
      </note>
    </measure>
  <measure number="3" width="135.53">
    <note default-x="12.00" default-y="-25.00">
      <pitch>
        <step>A</step>
        <octave>4</octave>
        </pitch>
      <duration>4</duration>
      <voice>1</voice>
      <type>whole</type>
      <staff>1</staff>
      </note>
    <backup>
      <duration>4</duration>
      </backup>
    <note default-x="12.00" default-y="-120.00">
      <pitch>
        <step>E</step>
        <octave>3</octave>
        </pitch>
      <duration>4</duration>
      <voice>5</voice>
      <type>whole</type>
      <staff>2</staff>
      </note>
    <barline location="right">
      <bar-style>light-heavy</bar-style>
      </barline>
    </measure>
  </part>
</score-partwise>

and conversion output with error:

musicxml2hum valid-test.musicxml 
Previous line is: !	!LO:TX:a:t=note
Error on line 11:
   Expected 2 fields,    but found 1
Line is: with newline

**kern	**kern
*part1	*part1
*staff2	*staff1
*I"Piano	*
*I'Pno.	*
*clefF4	*clefG2
*k[]	*k[]
*M4/4	*M4/4
=	=
!	!LO:TX:a:t=note
with newline
1C	1cc
=3	=3
1D	1b
=4	=4
1E	1a
==	==
*-	*-
!!!system-decoration: {(s1,s2)}

Would it be possible to ignore newline characters or to substitute them to space in conversion?

Embed local comment in MusicXML data

When a text expression starts with an exclamation (!) (but not followed by a second (!!)), the text will be treated as a local comment to insert just before the note/slur in the conversion to Humdrum data from MusicXML with musicxml2hum:

Screen Shot 2020-01-30 at 6 11 54 PM

MusicXML 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">
  <work>
    <work-title>Title</work-title>
    </work>
  <identification>
    <creator type="composer">Composer</creator>
    <encoding>
      <software>MuseScore 3.3.4</software>
      <encoding-date>2020-01-30</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>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1584</page-height>
      <page-width>1224</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="612" default-y="1527.31" justify="center" valign="top" font-size="24">Title</credit-words>
    </credit>
  <credit page="1">
    <credit-words default-x="1167.31" default-y="1427.31" justify="right" valign="bottom" font-size="12">Composer</credit-words>
    </credit>
  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
      <part-abbreviation>Pno.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Piano</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="193.80">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>0.00</left-margin>
            <right-margin>519.88</right-margin>
            </system-margins>
          <top-system-distance>170.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="79.27" default-y="-25.00">
        <pitch>
          <step>A</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        </note>
      </measure>
    <measure number="2" width="129.80">
      <direction placement="above">
        <direction-type>
          <words relative-y="20.00">!LO:TX:a:t=S:sic</words>
          </direction-type>
        </direction>
      <note default-x="10.00" default-y="-30.00">
        <pitch>
          <step>G</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        </note>
      </measure>
    <measure number="3" width="129.80">
      <note default-x="10.00" default-y="-35.00">
        <pitch>
          <step>F</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        </note>
      </measure>
    <measure number="4" width="137.33">
      <direction placement="above">
        <direction-type>
          <words relative-y="20.00">!LO:TX:a:t=P:problem</words>
          </direction-type>
        </direction>
      <note default-x="13.80" default-y="-50.00">
        <pitch>
          <step>C</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

Conversion to humdrum with musicxml2hum:

**kern
*clefG2
*k[]
*M4/4
=1
1a
=2
!LO:TX:a:t=S:sic
1g
=3
1f
=4
!LO:TX:a:t=P:problem
1c
==
*-

mei2hum: clefs inside beams

When there is a clef inside a beam, the mei2hum tool does not handle it:

000105580-1_1_1

MEI file:
000105580-1_1_1.mei.zip

I've solved (but I don't know if it is correct) just by adding this case in tool-mei2hum.cpp, Tool_mei2hum::parseBeam():

...

		} else if (nodename == "tuplet") {

			starttime = parseTuplet(children[i], starttime);

		} else if (nodename == "clef") { // drizo

			parseClef(children[i], starttime);			
...

[fb] Include spine splits for calculating the base pitch

Spine splits should be included when calculating the base pitch of the base track. Currently it can handle chords and always takes the lowest pitch found of a slice.

http://verovio.humdrum.org/?file=beethoven/sonatas/sonata05-2.krn

Bildschirm­foto 2023-01-16 um 10 57 01

=60	=60	=60	=60
*^	*	*^	*
24r	4E-	.	(8ccL	4a-X	p
(<24e-LL	.	6 4	.	.	.
24dnJJ)	.	7 5	.	.	.
24re	.	.	8ee-	.	.
(<24d-LL	.	2 5	.	.	.
24cJJ)	.	3 6	.	.	.
24r	4E-	.	8dd-	4g	.
(24B-LL	.	3 6	.	.	.
24cJJ)	.	2 5	.	.	.
24rc	.	.	8b-J)	.	.
(<24d-LL	.	6 4	.	.	.
24GJJ)	.	3 8	.	.	.

clef change problem in musicxml2hum

The following example MusicXML data generates an error when converting with musicxml2hum. Here is what the music looks like in MuseScore:

clefchange

The reported error is:

terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Aborted

Here is the MusicXML export from MuseScore:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <work>
    <work-title>Piast. Śpiew historyczny</work-title>
    </work>
  <identification>
    <creator type="composer">F. Lessel</creator>
    <encoding>
      <software>MuseScore 2.0.3</software>
      <encoding-date>2017-06-06</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>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>
  <part-list>
    <score-part id="P1">
      <part-name>Soprano</part-name>
      <part-abbreviation>S.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Soprano</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>53</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    <score-part id="P2">
      <part-name>Piano</part-name>
      <part-abbreviation>P-no</part-abbreviation>
      <score-instrument id="P2-I1">
        <instrument-name>Piano</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="248.52">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>76.28</left-margin>
            <right-margin>571.39</right-margin>
            </system-margins>
          <top-system-distance>320.00</top-system-distance>
          </system-layout>
        </print>
      <attributes>
        <divisions>2</divisions>
        <key>
          <fifths>0</fifths>
          </key>
        <time>
          <beats>2</beats>
          <beat-type>4</beat-type>
          </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="77.14" default-y="-20.00">
        <pitch>
          <step>B</step>
          <alter>-1</alter>
          <octave>4</octave>
          </pitch>
        <duration>3</duration>
        <voice>1</voice>
        <type>quarter</type>
        <dot/>
        <accidental>flat</accidental>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>wy</text>
          </lyric>
        </note>
      <note default-x="189.39" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>brać</text>
          </lyric>
        </note>
      </measure>
    <measure number="2" width="180.97">
      <note default-x="12.36" default-y="-10.00">
        <pitch>
          <step>D</step>
          <alter>-1</alter>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>flat</accidental>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>begin</syllabic>
          <text>na</text>
          </lyric>
        </note>
      <note default-x="51.86" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>middle</syllabic>
          <text>stę</text>
          </lyric>
        </note>
      <note default-x="91.37" default-y="-20.00">
        <pitch>
          <step>B</step>
          <alter>-1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>flat</accidental>
        <stem>down</stem>
        <lyric number="1">
          <syllabic>end</syllabic>
          <text>pcę</text>
          </lyric>
        </note>
      <note default-x="130.87" default-y="-25.00">
        <pitch>
          <step>A</step>
          <alter>-1</alter>
          <octave>4</octave>
          </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>eighth</type>
        <accidental>flat</accidental>
        <stem>up</stem>
        <lyric number="1">
          <syllabic>single</syllabic>
          <text>do</text>
          </lyric>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  <part id="P2">
    <measure number="1" width="248.52">
      <print>
        <staff-layout number="1">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        <staff-layout number="2">
          <staff-distance>65.00</staff-distance>
          </staff-layout>
        </print>
      <attributes>
        <divisions>2</divisions>
        <key>
          <fifths>0</fifths>
          </key>
        <time>
          <beats>2</beats>
          <beat-type>4</beat-type>
          </time>
        <staves>2</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
          </clef>
        <clef number="2">
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="76.78" default-y="-10.00">
        <pitch>
          <step>D</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="76.78" default-y="-120.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>down</stem>
        <staff>2</staff>
        </note>
      </measure>
    <measure number="2" width="180.97">
      <attributes>
        <clef number="2">
          <sign>F</sign>
          <line>4</line>
          </clef>
        </attributes>
      <note default-x="12.00" default-y="-15.00">
        <pitch>
          <step>C</step>
          <octave>5</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>down</stem>
        <staff>1</staff>
        </note>
      <backup>
        <duration>4</duration>
        </backup>
      <note default-x="12.00" default-y="-130.00">
        <pitch>
          <step>C</step>
          <octave>3</octave>
          </pitch>
        <duration>4</duration>
        <voice>5</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>2</staff>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        </barline>
      </measure>
    </part>
  </score-partwise>

[fb] Control stack placeholders

It would be nice if there was an option to control the position of the numbers with stack placeholders.

http://verovio.humdrum.org/?file=bach-wtc-fugues/wtc2f24.krn

fb -c -a -3

Bildschirm­foto 2023-01-16 um 11 24 08

With this option the numbers in measure 97 should be vertical aligned to the bottom. Basically each track should get its own stack placeholder.

Of course you could simply use fb -c -a -3 -i instead:

Bildschirm­foto 2023-01-16 um 11 24 48

When introducing stack placeholders numbers could also pushed to the bottom when using --above:

fb -c -a -3 -r --above

Bildschirm­foto 2023-01-16 um 11 29 26

But this needs to work a bit differently since when using -n or -r the max number of displayed numbers per chord needs to get calculated. Without these option the max number of tracks can be used. Unfortunately we cannot do this per line as the kern encoding does not know about the dynamic line width when rendered with verovio. So we can only do this per file (or per measure).

Error in the README example (and others in documentation)

I am pretty new to C++, but I think there are a few errors in the README example and the other examples in the humlib page. I had to make a few changes to make the example work. Here is the final, corrected code:

#include "humlib.h"

using namespace std;
using namespace hum;

void printNoteInformation(HumdrumFile& infile, int line, int field, int tpq) {
   int starttime = infile[line].getDurationFromStart(tpq).getInteger();
   int duration  = infile.token(line, field)->getDuration(tpq).getInteger();
   cout << Convert::kernToSciPitch(*infile.token(line, field))
        << '\t' << infile.token(line, field)->getTrackString()
        << '\t' << starttime << '\t' << duration << endl;
}

int main(int argc, char** argv) {
   if (argc != 2) {
      return 1;
   }
   HumdrumFile infile;
   if (!infile.read(argv[1])) {
      return 1;
   }
   int tpq = infile.tpq();
   cout << "TPQ: " << tpq << endl;
   cout << "PITCH\tTRACK\tSTART\tDURATION" << endl;

   for (int i=0; i<infile.getLineCount(); i++) {
      if (!infile[i].isData()) {
         continue;
      }
      for (int j=0; j<infile[i].getTokenCount(); j++) {
         if (infile.token(i, j)->isNull()) {
            continue;
         }
         if (infile.token(i, j)->isDataType("kern")) {
            printNoteInformation(infile, i, j, tpq);
         }
      }
   }
   return 0;
}

The changes compared to the original can be seen in the following screenshot (original is in the left side, corrected version is in the right side):
Screen Shot 2021-01-16 at 4 19 10 PM

myank does not close multiple subspines

When an excerpt from myank ends with multiple subspines, they are not closed:

**kern
*M4/4
=1
*^
1cc	1gg
=2	=2
1dd	1ff
=3	=3
1b	1gg
=4	=4
1cc	1ff
*v	*v
==
*-

myank -m 2 produces:

**kern
*^
*M4/4	*M4/4
=2	=2
1dd	1ff
=	=
*-

It should be :

**kern
*^
*M4/4	*M4/4
=2	=2
1dd	1ff
=	=
*v	*v
*-

Also, the time signature should ideally not be duplicated into subspines:

**kern
*M4/4
*^
=2	=2
1dd	1ff
=	=
*v	*v
*-

or

**kern
*M4/4
=2
*^
1dd	1ff
=	=
*v	*v
*-

bar numbers in musicxml2hum

In the musicxml2hum converter the barnumbers are not (usually?) correct. The first measure is not numbered, and there are problems at medial double barlines (and/or before a mensuration change).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.