humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Implement C2/C3/O2/O3 mensuration signs #635

Closed craigsapp closed 2 years ago

craigsapp commented 2 years ago

Currently numbers are not displayed after mensuration signs:

Screen Shot 2021-12-03 at 1 40 53 PM

Add them by adding mensur@num parameter

Screen Shot 2021-12-03 at 1 44 03 PM

Test data:

**kern
*M2/1
*met(C2)
=1
0cyy
=2
*M2/1
*met(C3)
0dyy
=3
*M2/1
*met(O2)
0cyy
=4
*M2/1
*met(O3)
0cyy
==
*-

Target conversion to MEI:

<?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 />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2021-12-03T13:42:50" version="3.8.0-dev-b3abbd0-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="m2gc7pk">
    <score xml:id="s2syw84">
     <scoreDef xml:id="splkfi0" midi.bpm="400.000000">
      <staffGrp xml:id="sm4cu37">
       <staffDef xml:id="sl6bbcv" n="1" lines="5">
        <clef xml:id="ca14269" shape="G" line="2" />
        <meterSig xml:id="metersig-L2F1" count="2" unit="1" form="invis" />
        <mensur xml:id="mensur-L3F1" sign="C" num="2" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="1">
       <staff xml:id="syy2hu5" n="1">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L5F1" dur="breve" oct="4" pname="c" visible="false" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <scoreDef xml:id="sk7jqff">
       <meterSig xml:id="mxwf8sj" count="-1" unit="1" form="invis" />
       <mensur xml:id="mensur-L8F1" sign="C" num="3" />
      </scoreDef>
      <measure xml:id="measure-L6" n="2">
       <staff xml:id="staff-L6F1N1" n="1">
        <layer xml:id="layer-L6F1N1" n="1">
         <note xml:id="note-L9F1" dur="breve" oct="4" pname="d" visible="false" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <scoreDef xml:id="svvccbm">
       <meterSig xml:id="mh99obs" count="-1" unit="1" form="invis" />
       <mensur xml:id="mensur-L12F1" sign="O" num="2" />
      </scoreDef>
      <measure xml:id="measure-L10" n="3">
       <staff xml:id="staff-L10F1N1" n="1">
        <layer xml:id="layer-L10F1N1" n="1">
         <note xml:id="note-L13F1" dur="breve" oct="4" pname="c" visible="false" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <scoreDef xml:id="se4ki18">
       <meterSig xml:id="mihasy4" count="-1" unit="1" form="invis" />
       <mensur xml:id="mensur-L16F1" sign="O" num="3" />
      </scoreDef>
      <measure xml:id="measure-L14" right="end" n="4">
       <staff xml:id="staff-L14F1N1" n="1">
        <layer xml:id="layer-L14F1N1" n="1">
         <note xml:id="note-L17F1" dur="breve" oct="4" pname="c" visible="false" accid.ges="n" />
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>
craigsapp commented 2 years ago

Implemented with commit https://github.com/rism-digital/verovio/commit/7abcef1c9e0ac1dab342cd0a5fe6fb9ee3917b32

Example now renders as:

Screen Shot 2021-12-03 at 4 08 59 PM

Some other possibilities with two numbers:

Screen Shot 2021-12-03 at 4 38 45 PM
**kern
*M2/1
*met(C3/2)
=1
0cyy
=2
*M2/1
*met(O3/2)
0dyy
=3
*M2/1
*met(O.3/2)
0dyy
=4
*M2/1
*met(O|3/2)
0dyy
=
*-