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

Percussion clef vertical placement for cases where there are an even number of staff lines #600

Open
craigsapp opened this issue Jun 12, 2019 · 0 comments

Comments

@craigsapp
Copy link
Member

Clefs can be positioned vertically with the staffDef@clef.line option. This allows vertical placement with respect to lines on the staff which is good for pitched clefs; however, for percussion clefs where there are an even number of lines on the staff, the clef cannot be positioned in the middle of the clef as is desired.

Perhaps it is necessary to implement an option staffDef@clef.loc or to allow fractional values for staffDef@clef.line.

Alternatively, I don't know of a case where the percussion clef is not centered on the staff, so I can instead submit an issue for verovio to always center percussion clefs by default (which would be more convenient), in which case it could set the line position to the unrepresentable 1.5 line for the two-line staff and 2.5 line for the four-line staff.

Example:

Screen Shot 2019-06-12 at 4 53 44 PM

For the two-line and four-line cases, the clef cannot be placed properly.

MEI test data:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://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="2019-06-12T13:51:21" version="2.2.0-dev-7ac2fe9">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000001999946870">
    <score xml:id="score-0000000693001246">
     <scoreDef xml:id="scoredef-0000001559334973" midi.bpm="400">
      <staffGrp xml:id="staffgrp-0000001359204152" symbol="bracket">
       <staffDef xml:id="staffdef-0000000170291657" clef.shape="perc" clef.line="1" meter.count="4" meter.unit="4" n="1" lines="1">
        <label xml:id="label-0000001404949705" />
       </staffDef>
       <staffDef xml:id="staffdef-0000001391771073" clef.shape="perc" clef.line="1" meter.count="4" meter.unit="4" n="2" lines="2" />
       <staffDef xml:id="staffdef-0000001443926127" clef.shape="perc" clef.line="2" meter.count="4" meter.unit="4" n="3" lines="3" />
       <staffDef xml:id="staffdef-0000001522658259" clef.shape="perc" clef.line="2" meter.count="4" meter.unit="4" n="4" lines="4" />
       <staffDef xml:id="staffdef-0000000365616072" clef.shape="perc" clef.line="3" meter.count="4" meter.unit="4" n="5" lines="5" />
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L3" right="invis" n="1">
       <staff xml:id="staff-L3F5N1" n="1">
        <layer xml:id="layer-L3F5N1" n="1">
         <note xml:id="note-L4F5" dur="1" loc="0"  accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L3F4N1" n="2">
        <layer xml:id="layer-L3F4N1" n="1">
         <note xml:id="note-L4F4" dur="1" loc="0" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L3F3N1" n="3">
        <layer xml:id="layer-L3F3N1" n="1">
         <note xml:id="note-L4F3" dur="1" loc="0"  accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L3F2N1" n="4">
        <layer xml:id="layer-L3F2N1" n="1">
         <note xml:id="note-L4F2" dur="1" loc="0"  accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L3F1N1" n="5">
        <layer xml:id="layer-L3F1N1" n="1">
         <note xml:id="note-L4F1" dur="1" loc="0"  accid.ges="n" />
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>
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

1 participant