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
687 stars 185 forks source link

Double spacing for two-lined staves #1742

Open craigsapp opened 4 years ago

craigsapp commented 4 years ago

Behind Bars, p. 6 gives only one example of a two-lined percussion staff, which appears like a three-lined staff with the middle line removed:

Screen Shot 2020-10-12 at 9 20 43 PM

She also gives two alternate forms for a three-lined staff, with either single- or double-spaced staff lines.

It would be useful for for the two-lined staff in verovio to match this example. Having MEI allow for the two alternate 3-lined staves might also be useful (and could also be applied to the two-lined staff to allow for alternate spacing styles).

craigsapp commented 4 years ago

Also note these examples from Behind Bars, p. 285:

Screen Shot 2020-10-12 at 9 49 44 PM

Irregular spaced staff lines (these could be simulated as separate staves, although spacing them properly might be a problems). The second example is a case of a double-spaced 8-lined staff. Perhaps adding staffDef@lines.spacing="2" (or @lines.space="2") for such cases. For a two-line staff this would be the default value and for all other staff-line counts, @lines.spacing="1" would be the default.

craigsapp commented 4 years ago

Test data:

Screen Shot 2020-10-12 at 10 17 00 PM
<?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-10-12T22:17:02" version="3.1.0-dev-887e034">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000001595873697">
    <score xml:id="score-0000001630314323">
     <scoreDef xml:id="scoredef-0000000146171379">
      <staffGrp xml:id="staffgrp-0000001678275000">
       <staffDef xml:id="staffdef-0000000440245912" n="1" lines="2">
        <clef xml:id="clef-L3F1" shape="perc" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="1">
       <staff xml:id="staff-0000000000525842" n="1">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L5F1" dur="4" loc="0" stem.dir="down" />
         <note xml:id="note-L6F1" dur="4" loc="2" stem.dir="up" />
         <note xml:id="note-L7F1" dur="4" loc="0" stem.dir="down" />
         <note xml:id="note-L8F1" dur="4" loc="2" stem.dir="up" />
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>
rettinghaus commented 4 years ago

@craigsapp This should be addressed in MEI first.

craigsapp commented 4 years ago

That is what the MEI label is for.

rettinghaus commented 4 years ago

Yeah, but Verovio is not MEI.

craigsapp commented 4 years ago

Yes, but I added that issue at 10pm my time, and contrary to common belief, I do not work 24-hours a day...