craigsapp / humlib

Humdrum data parsing library in C++
http://humlib.humdrum.org
BSD 2-Clause "Simplified" License
31 stars 8 forks source link

Figured bass information partially missing when using musicxml2hum to convert #15

Closed juyaolongpaul closed 4 years ago

juyaolongpaul commented 4 years ago

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:

Thank you for the help!

craigsapp commented 4 years ago

Hi Yaolong,

I have finally fixed the problem(!), which was of course that the converter was only tracking one figure per note. I enabled multiple figures per note with commit https://github.com/craigsapp/humlib/commit/339f1509ac36881cf533de686f1a1c75a380f135

Now the output for the test input data is:

!!!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 .   .
=2  =2  =2  =2  =2
4E  6   8cL 8eL 4g
.   .   8BJ 8dJ .
4F  5 3 4A  8cL 8aL
.   6 4 .   8dJ 8bJ
8EL 6   4G  8eL 8ccL
8DJ .   .   8fJ 8ddJ
4C  5   8GL 4g  4ee
.   6   8AJ .   .
=3  =3  =3  =3  =3
4G  .   8B  4.g 4dd
.   .   16ALL   .   .
.   .   16BJJ   .   .
4A  7   8cL .   2cc
.   #6\ 8dJ 8f#X    .
4G  6 4 4e  4g  .
4G  5 3 4d  4g  4b
=4  =4  =4  =4  =4
2C; .   2e; 2g; 2cc;
4r  .   4r  4r  4r
4C  .   4c  4g  4ee
=   =   =   =   =
*-  *-  *-  *-  *-
!!!system-decoration: s1,s2,s3,s4

which renders with verovio as:

Screen Shot 2019-12-08 at 9 41 43 PM

Comparing to the display in MuseScore, no figures seem to be dropped now. Within an hour or so, you should also be able to drag-and-drop a MusicXML file with the figured bass onto the VHV webpage to convert to Humdrum with the correct figured bass.

juyaolongpaul commented 4 years ago

Hi Craig,

Thank you so much for your help! It worked. :)