rism-digital / verovio

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

3.11: When condense "auto", last system not rendered when pause(s) only #2949

Open cambiata opened 2 years ago

cambiata commented 2 years ago

The problem arises when

If the last system should happen to require an additional extra page, that page is not created.

condense: "none"

condensing-none

condense: "auto"

As seen in the screenshot below, there is a "system break" symbol added, but the system itself is not.

condensing-auto

The problem can be reproduced using 3.10 and 3.11 - both using js toolkit and native - using the following musicXml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.1">
  <work>
    <work-title>satb</work-title>
  </work>
  <identification>
    <encoding>
      <software>MuseScore 3.5.0</software>
      <encoding-date>2022-07-05</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>
  <credit page="1">
    <credit-words default-x="595.44" default-y="1626.67" justify="center" valign="top" font-size="24">satb</credit-words>
  </credit>
  <part-list>
    <part-group type="start" number="1">
      <group-symbol>bracket</group-symbol>
    </part-group>
    <part-group type="start" number="2">
      <group-symbol>bracket</group-symbol>
    </part-group>
    <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>Alto</part-name>
      <part-abbreviation>A.</part-abbreviation>
      <score-instrument id="P2-I1">
        <instrument-name>Alto</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>Tenor</part-name>
      <part-abbreviation>T.</part-abbreviation>
      <score-instrument id="P3-I1">
        <instrument-name>Tenor</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>Bass</part-name>
      <part-abbreviation>B.</part-abbreviation>
      <score-instrument id="P4-I1">
        <instrument-name>Bass</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-group type="stop" number="2"/>
    <part-group type="stop" number="1"/>
  </part-list>
  <part id="P1">
    <measure number="1" width="158.94">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>93.80</left-margin>
            <right-margin>-0.00</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="82.47" 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="2" width="91.75">
      <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="91.75">
      <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="4" width="91.75">
      <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="5" width="91.75">
      <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="6" width="91.75">
      <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="7" width="91.75">
      <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="8" width="91.75">
      <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="9" width="91.75">
      <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="10" width="90.79">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
      </barline>
    </measure>
  </part>
  <part id="P2">
    <measure number="1" width="158.94">
      <print>
        <staff-layout number="1">
          <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>
        <clef>
          <sign>G</sign>
          <line>2</line>
        </clef>
      </attributes>
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="2" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="3" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="4" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="5" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="6" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="7" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="8" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="9" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="10" width="90.79">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
      </barline>
    </measure>
  </part>
  <part id="P3">
    <measure number="1" width="158.94">
      <print>
        <staff-layout number="1">
          <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>
        <clef>
          <sign>G</sign>
          <line>2</line>
          <clef-octave-change>-1</clef-octave-change>
        </clef>
      </attributes>
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="2" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="3" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="4" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="5" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="6" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="7" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="8" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="9" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="10" width="90.79">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
      </barline>
    </measure>
  </part>
  <part id="P4">
    <measure number="1" width="158.94">
      <print>
        <staff-layout number="1">
          <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>
        <clef>
          <sign>F</sign>
          <line>4</line>
        </clef>
      </attributes>
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="2" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="3" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="4" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="5" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="6" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="7" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="8" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="9" width="91.75">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
    </measure>
    <measure number="10" width="90.79">
      <note>
        <rest measure="yes"/>
        <duration>4</duration>
        <voice>1</voice>
      </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
      </barline>
    </measure>
  </part>
</score-partwise>
rettinghaus commented 2 years ago

This works exactly like expected, because you have multiple staff groups with different instruments. You have to remove one of the brackets in your encoding:

    <part-group type="start" number="1">
      <group-symbol>bracket</group-symbol>
    </part-group>
    <part-group type="start" number="2">
      <group-symbol>bracket</group-symbol>
    </part-group>

Then everything is fine.

rettinghaus commented 2 years ago

I'm sorry. I understand now that you expect the last system to be always shown, even if condensed, right?

cambiata commented 2 years ago

Yes!

I can't see any case when I should be expecting all parts in a score to be hidden.

Indeed, I'm got really confused when trying to reproduce the svg example above, when I could not get any condensing at all without adding a second part-group...