Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--breaks encoded not working without sb elements in Verovio 3.6 #2358

Closed
wergo opened this issue Aug 25, 2021 · 4 comments
Closed

--breaks encoded not working without sb elements in Verovio 3.6 #2358

wergo opened this issue Aug 25, 2021 · 4 comments

Comments

@wergo
Copy link
Contributor

wergo commented Aug 25, 2021

With the current release 3.6, the --breaks option seems to have changed its behavior.

This dummy encoding containing three <pb> elements, but no <sb> elements appears incorrectly on one page, when called on the command line verovio --breaks encoded -a pagebreaks.mei. It should (and it has in previous versions) appear on three pages. (Similarly, --breaks line results in the same single-page output.)

grafik

pagebreaks.mei with three page break elements
<?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>Three page breaks</title>
            <respStmt />
         </titleStmt>
         <pubStmt />
      </fileDesc>
   </meiHead>
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef key.sig="0" meter.count="3" meter.unit="4">
                  <staffGrp bar.thru="true" symbol="brace">
                     <staffDef n="1" lines="5" clef.shape="G" clef.line="2" />
                     <staffDef n="2" lines="5" clef.shape="F" clef.line="4" />
                  </staffGrp>
               </scoreDef>
               <section>
                  <pb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="a" />
                           <note dur="4" oct="4" pname="b" />
                           <note dur="4" oct="5" pname="c" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="5" pname="d" />
                           <note dur="4" oct="5" pname="c" />
                           <note dur="4" oct="4" pname="b" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <pb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="a" />
                           <note dur="4" oct="4" pname="g" />
                           <note dur="4" oct="4" pname="f" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="e" />
                           <note dur="4" oct="4" pname="d" />
                           <note dur="4" oct="4" pname="c" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <pb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="3" pname="b" />
                           <note dur="4" oct="4" pname="c" />
                           <note dur="4" oct="4" pname="d" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="e" />
                           <note dur="4" oct="4" pname="f" />
                           <note dur="4" oct="4" pname="g" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

It works as expected on three pages when also <sb> elements are present in the encoding:

grafikgrafikgrafik

pagesystembreaks.mei with three page breaks and three system breaks
<?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>Three page and three system breaks</title>
            <respStmt />
         </titleStmt>
         <pubStmt />
      </fileDesc>
   </meiHead>
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef key.sig="0" meter.count="3" meter.unit="4">
                  <staffGrp bar.thru="true" symbol="brace">
                     <staffDef n="1" lines="5" clef.shape="G" clef.line="2" />
                     <staffDef n="2" lines="5" clef.shape="F" clef.line="4" />
                  </staffGrp>
               </scoreDef>
               <section>
                  <pb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="a" />
                           <note dur="4" oct="4" pname="b" />
                           <note dur="4" oct="5" pname="c" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <sb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="5" pname="d" />
                           <note dur="4" oct="5" pname="c" />
                           <note dur="4" oct="4" pname="b" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <pb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="a" />
                           <note dur="4" oct="4" pname="g" />
                           <note dur="4" oct="4" pname="f" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <sb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="e" />
                           <note dur="4" oct="4" pname="d" />
                           <note dur="4" oct="4" pname="c" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <pb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="3" pname="b" />
                           <note dur="4" oct="4" pname="c" />
                           <note dur="4" oct="4" pname="d" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
                  <sb />
                  <measure>
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="e" />
                           <note dur="4" oct="4" pname="f" />
                           <note dur="4" oct="4" pname="g" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                           <note dur="4" oct="3" pname="a" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

I have not tracked down the commit where the behavior changed. Help highly appreciated.

@craigsapp
Copy link
Contributor

Yes, it is a problem and I had to disable page-view mode for now in VHV because of it.

Some related issues and discussion:

#2034
#1987

The problem was generated when --breaks smart were implemented:

#1931

@wergo
Copy link
Contributor Author

wergo commented Aug 25, 2021

The page break option is essential for the speedmode of mei-friend and it used to work fine with Verovio release 3.4.1, works with unreliable error messages in the tk.render2svg in 3.5.0, but stopped working properly in 3.6. So, the problems are related, but this specific problem was introduced very recently.

@lpugin
Copy link
Contributor

lpugin commented Aug 25, 2021

Yes, I suspect I introduced the problem when implementing the multiple mdiv/score feature. I'll have a look.

@lpugin
Copy link
Contributor

lpugin commented Oct 1, 2021

Should be fixed with 50819d8

@lpugin lpugin closed this as completed Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants