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

Initial refactoring for making the use of facsimile more generic #3565

Merged
merged 31 commits into from
Jan 10, 2024

Conversation

lpugin
Copy link
Contributor

@lpugin lpugin commented Dec 29, 2023

This PR refactors the handling of facsimile handling following modelling discussions for the @BeethovensWerkstatt with @kepper.

For producing a rendering where the position of the elements in provided in the encoding, we use now <facsimile> instead of using Verovio' internal page-based model with coordinates. This is the same as in @DDMAL's neon.js and the PR should not break anything for neon. @yinanazhou, please double check.

The PR is a fist step for making the handling of facsimile in neon.js more generic. I will follow up with a dedicated issue (tagging @fujinaga). One problem is that neon changes the music data or the facsimile data in various places. This needs to be cleaned up.

With the current PR, if facsimile has a @type="transcription" and --breaks encoded is set, the facsimile layout is applied. This is happening with a call to Doc::SyncFromFacsimileDoc that sets the zone@ulx as m_drawingFacsX values instead of calculating the layout. Eventually, we do not want to rely on the @type attribute but instead on the --use-facsimile option. However, this will be changed only when code used by neon will have been made generic.

The PR also makes it possible to generate a facsimile from a calculated layout with the -t mei-facs output option together with --pages-all and --breaks encoded. This is happening in Doc::SyncToFacsimileDoc. At this stage, this is very basic and only implements what is currently possible with the coordinates in the page-based output. That is, possitioning systems, measures, staves, and notes.

Example with the following standard score-based MEI file:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
   <meiHead>
      <fileDesc>
         <titleStmt>
            <title>Simple example</title>
         </titleStmt>
         <pubStmt>
            <date isodate="2021-07-31">2021-07-31</date>
         </pubStmt>
      </fileDesc>
   </meiHead>
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef>
                  <staffGrp>
                     <staffGrp bar.thru="true" symbol="brace">
                        <label>Thema</label>
                        <staffDef n="1" lines="5">
                           <clef shape="G" line="2" />
                        </staffDef>
                        <staffDef n="2" lines="5">
                           <clef shape="F" line="4" />
                        </staffDef>
                     </staffGrp>
                  </staffGrp>
               </scoreDef>
               <section>
                  <pb />
                  <sb />
                  <measure n="1">
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="f" stem.dir="up" />
                           <note dur="4" oct="4" pname="g" stem.dir="up" />
                           <note dur="4" oct="4" pname="a" stem.dir="up" />
                           <note dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="f" stem.dir="down" />
                           <note dur="4" oct="3" pname="e" stem.dir="down" />
                           <note dur="4" oct="3" pname="f" stem.dir="down" />
                           <note dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure n="2">
                     <staff n="1">
                        <layer n="1">
                           <note dur="2" oct="5" pname="c" stem.dir="down" />
                           <note dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="2" oct="3" pname="c" stem.dir="up" />
                           <note dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
                  <sb/>
                  <measure n="3">
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="f" stem.dir="up" />
                           <note dur="4" oct="4" pname="g" stem.dir="up" />
                           <note dur="4" oct="4" pname="a" stem.dir="up" />
                           <note dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="f" stem.dir="down" />
                           <note dur="4" oct="3" pname="e" stem.dir="down" />
                           <note dur="4" oct="3" pname="f" stem.dir="down" />
                           <note dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure n="4">
                     <staff n="1">
                        <layer n="1">
                           <note dur="2" oct="5" pname="c" stem.dir="down" />
                           <note dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="2" oct="3" pname="c" stem.dir="up" />
                           <note dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
                  <sb/>
                  <measure n="5">
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="4" pname="f" stem.dir="up" />
                           <note dur="4" oct="4" pname="g" stem.dir="up" />
                           <note dur="4" oct="4" pname="a" stem.dir="up" />
                           <note dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="4" oct="3" pname="f" stem.dir="down" />
                           <note dur="4" oct="3" pname="e" stem.dir="down" />
                           <note dur="4" oct="3" pname="f" stem.dir="down" />
                           <note dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure n="6">
                     <staff n="1">
                        <layer n="1">
                           <note dur="2" oct="5" pname="c" stem.dir="down" />
                           <note dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff n="2">
                        <layer n="1">
                           <note dur="2" oct="3" pname="c" stem.dir="up" />
                           <note dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>
image

Output with a facsimile generated with -t mei-facs:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
   <meiHead>
      <fileDesc>
         <titleStmt>
            <title>Simple example</title>
         </titleStmt>
         <pubStmt>
            <date isodate="2021-07-31">2021-07-31</date>
         </pubStmt>
      </fileDesc>
   </meiHead>
   <music>
      <facsimile xml:id="f1hlr1z9" type="transcription">
         <surface xml:id="s1fq244s" lrx="2100" lry="2970">
            <zone xml:id="z1cs3em6" lrx="2050" lry="2920" ulx="50" uly="50" type="pb" />
            <zone xml:id="z1s0yteh" ulx="221" uly="50" type="sb" />
            <zone xml:id="z1gnn6og" lrx="1282" ulx="221" type="measure" />
            <zone xml:id="z7b4pki" uly="104" type="staff" />
            <zone xml:id="z1oiht7e" ulx="352" type="note" />
            <zone xml:id="zjuezgf" ulx="584" type="note" />
            <zone xml:id="z1p7iznd" ulx="816" type="note" />
            <zone xml:id="z1gpasnm" ulx="1048" type="note" />
            <zone xml:id="z1bmmpdb" uly="284" type="staff" />
            <zone xml:id="zaf4ymn" ulx="352" type="note" />
            <zone xml:id="zf2o8a2" ulx="584" type="note" />
            <zone xml:id="z1jwuzl1" ulx="816" type="note" />
            <zone xml:id="z1c0qpcg" ulx="1048" type="note" />
            <zone xml:id="zn45p4s" lrx="2050" ulx="1282" type="measure" />
            <zone xml:id="zubuz4r" uly="104" type="staff" />
            <zone xml:id="z1pihe9q" ulx="1342" type="note" />
            <zone xml:id="z1ky4jus" ulx="1695" type="note" />
            <zone xml:id="z1e2s8l5" uly="284" type="staff" />
            <zone xml:id="z10rplk0" ulx="1342" type="note" />
            <zone xml:id="z1l6oqqy" ulx="1695" type="note" />
            <zone xml:id="z1dakb58" ulx="50" uly="446" type="sb" />
            <zone xml:id="z17c1w6q" lrx="1207" ulx="50" type="measure" />
            <zone xml:id="z1dn0imc" uly="500" type="staff" />
            <zone xml:id="zy1qnnb" ulx="187" type="note" />
            <zone xml:id="z1pe2ts0" ulx="441" type="note" />
            <zone xml:id="z2nz2d4" ulx="696" type="note" />
            <zone xml:id="zcapqxa" ulx="951" type="note" />
            <zone xml:id="z1ico1yf" uly="680" type="staff" />
            <zone xml:id="z1n1dh9w" ulx="187" type="note" />
            <zone xml:id="z1qy2q9k" ulx="441" type="note" />
            <zone xml:id="zgox38q" ulx="696" type="note" />
            <zone xml:id="z12y7dlm" ulx="951" type="note" />
            <zone xml:id="z1wknrvt" lrx="2050" ulx="1207" type="measure" />
            <zone xml:id="zfu84g2" uly="500" type="staff" />
            <zone xml:id="z1mnjumv" ulx="1273" type="note" />
            <zone xml:id="z12vl3z0" ulx="1661" type="note" />
            <zone xml:id="z196p0vw" uly="680" type="staff" />
            <zone xml:id="z1wwxogx" ulx="1273" type="note" />
            <zone xml:id="z1xzrlz7" ulx="1661" type="note" />
            <zone xml:id="zxrbjho" ulx="50" uly="842" type="sb" />
            <zone xml:id="z1ynl7pi" lrx="416" ulx="50" type="measure" />
            <zone xml:id="zqba9ew" uly="896" type="staff" />
            <zone xml:id="z1i3v9yz" ulx="138" type="note" />
            <zone xml:id="zu72c7q" ulx="207" type="note" />
            <zone xml:id="zo8tukk" ulx="276" type="note" />
            <zone xml:id="z1jr17jt" ulx="345" type="note" />
            <zone xml:id="zs9ldhj" uly="1076" type="staff" />
            <zone xml:id="za0zy7m" ulx="138" type="note" />
            <zone xml:id="z9fr4l1" ulx="207" type="note" />
            <zone xml:id="z1hiorzw" ulx="276" type="note" />
            <zone xml:id="z1dhpk8e" ulx="345" type="note" />
            <zone xml:id="zwdcq45" lrx="645" ulx="416" type="measure" />
            <zone xml:id="z1xmm6zm" uly="896" type="staff" />
            <zone xml:id="zt4g9fq" ulx="434" type="note" />
            <zone xml:id="zyv68f" ulx="539" type="note" />
            <zone xml:id="zeegsnx" uly="1076" type="staff" />
            <zone xml:id="z1itm0u0" ulx="434" type="note" />
            <zone xml:id="zn9c2zg" ulx="539" type="note" />
         </surface>
      </facsimile>
      <body>
         <mdiv xml:id="m48hqw3">
            <score xml:id="s1m48sj8">
               <scoreDef xml:id="s10l8n86">
                  <staffGrp xml:id="s9pmppz">
                     <staffGrp xml:id="s1w2dvts" bar.thru="true" symbol="brace">
                        <label xml:id="lqo2mo2">Thema</label>
                        <staffDef xml:id="smd9zbo" n="1" lines="5">
                           <clef xml:id="c1qo1lth" shape="G" line="2" />
                        </staffDef>
                        <staffDef xml:id="skc2ung" n="2" lines="5">
                           <clef xml:id="c18vlnxg" shape="F" line="4" />
                        </staffDef>
                     </staffGrp>
                  </staffGrp>
               </scoreDef>
               <section xml:id="ses9fpw">
                  <pb xml:id="pcsk2u0" facs="#z1cs3em6" />
                  <sb xml:id="s105khr5" facs="#z1s0yteh" />
                  <measure xml:id="m1o0fwfh" facs="#z1gnn6og" n="1">
                     <staff xml:id="sqhqbk4" facs="#z7b4pki" n="1">
                        <layer xml:id="l1cc2w0p" n="1">
                           <note xml:id="nt3iipn" facs="#z1oiht7e" dur="4" oct="4" pname="f" stem.dir="up" />
                           <note xml:id="n1e1sf4" facs="#zjuezgf" dur="4" oct="4" pname="g" stem.dir="up" />
                           <note xml:id="nf2c0vn" facs="#z1p7iznd" dur="4" oct="4" pname="a" stem.dir="up" />
                           <note xml:id="n5d94ns" facs="#z1gpasnm" dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="s1lu5x6k" facs="#z1bmmpdb" n="2">
                        <layer xml:id="l336wa0" n="1">
                           <note xml:id="n69j4jm" facs="#zaf4ymn" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="ni3ig13" facs="#zf2o8a2" dur="4" oct="3" pname="e" stem.dir="down" />
                           <note xml:id="nuyw3rp" facs="#z1jwuzl1" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n10fxojg" facs="#z1c0qpcg" dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="m4tx6ny" facs="#zn45p4s" n="2">
                     <staff xml:id="s1ib6web" facs="#zubuz4r" n="1">
                        <layer xml:id="l16pls6e" n="1">
                           <note xml:id="n1mopfmx" facs="#z1pihe9q" dur="2" oct="5" pname="c" stem.dir="down" />
                           <note xml:id="nhw7aga" facs="#z1ky4jus" dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="s1yw28xu" facs="#z1e2s8l5" n="2">
                        <layer xml:id="l1mf5x7b" n="1">
                           <note xml:id="n1u5lh80" facs="#z10rplk0" dur="2" oct="3" pname="c" stem.dir="up" />
                           <note xml:id="nchzpex" facs="#z1l6oqqy" dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
                  <sb xml:id="sk7scyv" facs="#z1dakb58" />
                  <measure xml:id="m1w9wwj9" facs="#z17c1w6q" n="3">
                     <staff xml:id="sk22mi4" facs="#z1dn0imc" n="1">
                        <layer xml:id="l1h7j647" n="1">
                           <note xml:id="n1lxj5eb" facs="#zy1qnnb" dur="4" oct="4" pname="f" stem.dir="up" />
                           <note xml:id="n1a5q12o" facs="#z1pe2ts0" dur="4" oct="4" pname="g" stem.dir="up" />
                           <note xml:id="nr842a8" facs="#z2nz2d4" dur="4" oct="4" pname="a" stem.dir="up" />
                           <note xml:id="n10ot7k1" facs="#zcapqxa" dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="s15gjj5x" facs="#z1ico1yf" n="2">
                        <layer xml:id="lihpdaz" n="1">
                           <note xml:id="n1bk216o" facs="#z1n1dh9w" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n9g36v9" facs="#z1qy2q9k" dur="4" oct="3" pname="e" stem.dir="down" />
                           <note xml:id="nm5tzm0" facs="#zgox38q" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="ndiyyq8" facs="#z12y7dlm" dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="mk5gcjs" facs="#z1wknrvt" n="4">
                     <staff xml:id="sx514bd" facs="#zfu84g2" n="1">
                        <layer xml:id="l3glxhi" n="1">
                           <note xml:id="nkegcvb" facs="#z1mnjumv" dur="2" oct="5" pname="c" stem.dir="down" />
                           <note xml:id="nn2bmi0" facs="#z12vl3z0" dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="s1ouzmhm" facs="#z196p0vw" n="2">
                        <layer xml:id="lxj0s4j" n="1">
                           <note xml:id="nbwfk3t" facs="#z1wwxogx" dur="2" oct="3" pname="c" stem.dir="up" />
                           <note xml:id="n12f5y46" facs="#z1xzrlz7" dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
                  <sb xml:id="s155nk2t" facs="#zxrbjho" />
                  <measure xml:id="m1818nyj" facs="#z1ynl7pi" n="5">
                     <staff xml:id="s1x59ace" facs="#zqba9ew" n="1">
                        <layer xml:id="lt4114" n="1">
                           <note xml:id="n5e1c64" facs="#z1i3v9yz" dur="4" oct="4" pname="f" stem.dir="up" />
                           <note xml:id="ngfp5dr" facs="#zu72c7q" dur="4" oct="4" pname="g" stem.dir="up" />
                           <note xml:id="nkqzs07" facs="#zo8tukk" dur="4" oct="4" pname="a" stem.dir="up" />
                           <note xml:id="n12csslp" facs="#z1jr17jt" dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="sw3ypw4" facs="#zs9ldhj" n="2">
                        <layer xml:id="lc8ba02" n="1">
                           <note xml:id="n1q1chtz" facs="#za0zy7m" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n141g0f1" facs="#z9fr4l1" dur="4" oct="3" pname="e" stem.dir="down" />
                           <note xml:id="n12bwc4i" facs="#z1hiorzw" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n1ohbwni" facs="#z1dhpk8e" dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="m14svdz" facs="#zwdcq45" n="6">
                     <staff xml:id="s7bksnk" facs="#z1xmm6zm" n="1">
                        <layer xml:id="lkmhg1t" n="1">
                           <note xml:id="n1onjkth" facs="#zt4g9fq" dur="2" oct="5" pname="c" stem.dir="down" />
                           <note xml:id="nxr8x4q" facs="#zyv68f" dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="sobsd4w" facs="#zeegsnx" n="2">
                        <layer xml:id="lm2xrr3" n="1">
                           <note xml:id="nlwouxz" facs="#z1itm0u0" dur="2" oct="3" pname="c" stem.dir="up" />
                           <note xml:id="n1xfcntf" facs="#zn9c2zg" dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

Rendering using the facsimile (detected throught facsimile@type="transcription")

image

For reference, the page-based MEI generated with -t mei-pb:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://www.verovio.org/schema/5.0/mei-verovio.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
   <meiHead>
      <fileDesc>
         <titleStmt>
            <title>Simple example</title>
         </titleStmt>
         <pubStmt>
            <date isodate="2021-07-31">2021-07-31</date>
         </pubStmt>
      </fileDesc>
   </meiHead>
   <music>
      <body>
         <pages type="raw" xml:id="pkbvz1q">
            <!--Coordinates in MEI axis direction-->
            <page xml:id="p1rdpgu">
               <mdivb xml:id="m1lxtb15" />
               <score xml:id="sxjjttf">
                  <scoreDef xml:id="sb6br27">
                     <staffGrp xml:id="s1a0zf6a">
                        <staffGrp xml:id="s1sfy21a" bar.thru="true" symbol="brace">
                           <label xml:id="l1ck6c22">Thema</label>
                           <staffDef xml:id="s1k5b2h8" n="1" lines="5">
                              <clef xml:id="cjdznqk" shape="G" line="2" />
                           </staffDef>
                           <staffDef xml:id="sju03zj" n="2" lines="5">
                              <clef xml:id="clwcml" shape="F" line="4" />
                           </staffDef>
                        </staffGrp>
                     </staffGrp>
                  </scoreDef>
               </score>
               <system xml:id="s1a4dcyo" system.leftmar="0" system.rightmar="0">
                  <secb xml:id="s1pbmdzd" />
                  <measure xml:id="m19587p9" n="1">
                     <staff xml:id="s34m1yq" n="1">
                        <layer xml:id="l1eris55" n="1">
                           <note xml:id="n1topnra" dur="4" oct="4" pname="f" stem.dir="up" />
                           <note xml:id="n6zxr2q" dur="4" oct="4" pname="g" stem.dir="up" />
                           <note xml:id="n1e1k3s6" dur="4" oct="4" pname="a" stem.dir="up" />
                           <note xml:id="nbfgm8e" dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="srmm2ix" n="2">
                        <layer xml:id="l1we17hw" n="1">
                           <note xml:id="n1c1kxak" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="nrz7of4" dur="4" oct="3" pname="e" stem.dir="down" />
                           <note xml:id="nn522yc" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n1fxehrl" dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="muqac5s" n="2">
                     <staff xml:id="sjhzl7q" n="1">
                        <layer xml:id="lej0zr9" n="1">
                           <note xml:id="n1o151wm" dur="2" oct="5" pname="c" stem.dir="down" />
                           <note xml:id="n16t4u2k" dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="sbzv6m3" n="2">
                        <layer xml:id="l7fn6ob" n="1">
                           <note xml:id="n6imbew" dur="2" oct="3" pname="c" stem.dir="up" />
                           <note xml:id="n15q6b1d" dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
               </system>
               <system xml:id="s8c2j6j" system.leftmar="0" system.rightmar="0">
                  <measure xml:id="m1thn856" n="3">
                     <staff xml:id="s1ybri91" n="1">
                        <layer xml:id="lhycohe" n="1">
                           <note xml:id="ndz30nw" dur="4" oct="4" pname="f" stem.dir="up" />
                           <note xml:id="n1i92rk" dur="4" oct="4" pname="g" stem.dir="up" />
                           <note xml:id="nxgr45b" dur="4" oct="4" pname="a" stem.dir="up" />
                           <note xml:id="nt790y2" dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="sf87xry" n="2">
                        <layer xml:id="lrjvuqn" n="1">
                           <note xml:id="nkv50ce" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n5sw71f" dur="4" oct="3" pname="e" stem.dir="down" />
                           <note xml:id="n1d5wvg2" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n1wa97n" dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="mgkgsde" n="4">
                     <staff xml:id="s1e0p5k3" n="1">
                        <layer xml:id="lxeghan" n="1">
                           <note xml:id="ni6378a" dur="2" oct="5" pname="c" stem.dir="down" />
                           <note xml:id="npdrqc0" dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="srgw898" n="2">
                        <layer xml:id="l1ciepg2" n="1">
                           <note xml:id="n1wz36yd" dur="2" oct="3" pname="c" stem.dir="up" />
                           <note xml:id="nl6d8eo" dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
               </system>
               <system xml:id="slu6gip" system.leftmar="0" system.rightmar="0">
                  <measure xml:id="m4ai6rk" n="5">
                     <staff xml:id="szj1ux7" n="1">
                        <layer xml:id="l1befnza" n="1">
                           <note xml:id="np50q4c" dur="4" oct="4" pname="f" stem.dir="up" />
                           <note xml:id="n1fnccnx" dur="4" oct="4" pname="g" stem.dir="up" />
                           <note xml:id="n11ro8tb" dur="4" oct="4" pname="a" stem.dir="up" />
                           <note xml:id="n1vn1yd3" dur="4" oct="4" pname="f" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="suwlh1x" n="2">
                        <layer xml:id="l1wtbz8a" n="1">
                           <note xml:id="n1lbgeuq" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="n1xwukel" dur="4" oct="3" pname="e" stem.dir="down" />
                           <note xml:id="n5do3tq" dur="4" oct="3" pname="f" stem.dir="down" />
                           <note xml:id="nu9sgz4" dur="4" oct="3" pname="d" stem.dir="down" />
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="m1c7v8xc" n="6">
                     <staff xml:id="s1570nwm" n="1">
                        <layer xml:id="l1h6i3xv" n="1">
                           <note xml:id="n1x7h1cm" dur="2" oct="5" pname="c" stem.dir="down" />
                           <note xml:id="n1ymjn0m" dur="2" oct="4" pname="g" stem.dir="up" />
                        </layer>
                     </staff>
                     <staff xml:id="sd9svxa" n="2">
                        <layer xml:id="l1x5vj8r" n="1">
                           <note xml:id="n1xw4gz" dur="2" oct="3" pname="c" stem.dir="up" />
                           <note xml:id="ncnndtn" dur="2" oct="2" pname="c" stem.dir="up" />
                        </layer>
                     </staff>
                  </measure>
                  <milestoneEnd xml:id="s1xycmg3" startid="#s1pbmdzd" type="section" />
               </system>
               <milestoneEnd xml:id="p88i6oz" startid="#sxjjttf" type="score" />
               <milestoneEnd xml:id="ppyc27m" startid="#m1lxtb15" type="mdiv" />
            </page>
         </pages>
      </body>
   </music>
</mei>

* Same check is performed in Surface::GetMaxY
* Also remove call to Read/WriteFacsimileInterface in LayerElement child classes
* Placeholder for sb but not tested nor enabled
* Not MEI valid structure
* Also add call to FascimileInterface::ResetDataInterface
* Read page size from the surface attributes
* Convert to logical units
@yinanazhou
Copy link
Contributor

Hi, I confirm that it's working well for Neon :)

image

tools/main.cpp Outdated Show resolved Hide resolved
@lpugin lpugin merged commit 7fc8198 into develop Jan 10, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants