humdrum-tools / verovio-humdrum-viewer

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

Visual change of rhythmic value is not working with whole measure rests #386

Open jacekiwaszko1 opened 4 years ago

jacekiwaszko1 commented 4 years ago

Whole measure rests display can't be changed with !LO:N:vis=:

**kern
*M4/4
!LO:N:vis=00
1r
=
*-

wmr-1

<?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="2020-08-27T10:57:01" version="3.0.0-dev-3022956-dirty">
               <name>Verovio</name>
               <p>Transcoded from Humdrum</p>
            </application>
         </appInfo>
      </encodingDesc>
      <workList>
         <work>
            <title />
         </work>
      </workList>
   </meiHead>
   <music>
      <body>
         <mdiv xml:id="mdiv-0000000834633568">
            <score xml:id="score-0000001907580285">
               <scoreDef xml:id="scoredef-0000000273227424" midi.bpm="400">
                  <staffGrp xml:id="staffgrp-0000000719644479">
                     <staffDef xml:id="staffdef-0000001756095823" n="1" lines="5">
                        <clef xml:id="clef-0000001002265590" />
                        <meterSig xml:id="metersig-L2F1" count="4" unit="4" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section xml:id="section-L1F1">
                  <measure xml:id="measure-L1">
                     <staff xml:id="staff-0000001634777113" n="1">
                        <layer xml:id="layer-L1F1N1" n="1">
                           <mRest xml:id="mrest-L4F1" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

If the same rest is not treated by converter as whole measure rest everything works perfectly:

**kern
!LO:N:vis=00
1r
=
*-

wmr-2

<?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="2020-08-27T12:28:55" version="3.0.0-dev-3022956-dirty">
               <name>Verovio</name>
               <p>Transcoded from Humdrum</p>
            </application>
         </appInfo>
      </encodingDesc>
      <workList>
         <work>
            <title />
         </work>
      </workList>
   </meiHead>
   <music>
      <body>
         <mdiv xml:id="mdiv-0000000519435150">
            <score xml:id="score-0000001293209768">
               <scoreDef xml:id="scoredef-0000000777685374" midi.bpm="400">
                  <staffGrp xml:id="staffgrp-0000001855795471">
                     <staffDef xml:id="staffdef-0000002083215448" n="1" lines="5">
                        <clef xml:id="clef-0000000880934013" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section xml:id="section-L1F1">
                  <measure xml:id="measure-L1">
                     <staff xml:id="staff-0000002074387971" n="1">
                        <layer xml:id="layer-L1F1N1" n="1">
                           <rest xml:id="rest-L3F1" dur.ges="1" dur="long" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

According to MEI Documentation it's possible to add @dur and @dur.ges to <mRest>, but I'm afraid Verovio won't render it...

craigsapp commented 4 years ago

One complication is that the symbol that looks like a long rest is actually a European-style multi-bar rest. Displaying those in a score in verovio is complicated (I don't know if possible). So at least for now treating it as a long rest is the only thing that can be done for a diplomatic rendering.

Here are the European-style muti-bar rests from page 29 of the SCORE 3.0 Reference manual:

Screen Shot 2020-09-03 at 11 31 37 PM

Notice that what you actually have in the score is a four-measure multibar rest rather than a long rest.

@lpugin: Is it possible to do "European-style" multibar rests in verovio/MEI? The current system is the American style (and the European style probably moves to the American style after around 9-measure rests).

Musescore discussion about these (called "old style" multibar rests): https://musescore.org/en/node/44846

Lillypond uses the "Kirchenpausen" rests as they call them for multi-bar rests up to 10 measures:

http://lilypond.org/doc/v2.19/Documentation/notation/writing-rests

Screen Shot 2020-09-03 at 11 42 04 PM

https://musescore.org/en/node/278208