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

horizontal beam min distance between staves #1600

Closed craigsapp closed 2 years ago

craigsapp commented 4 years ago

When two horizontal beams are close or colliding between staves, the minimum distance between them should be larger than the space between subbeams in a single beamed group:

Screen Shot 2020-08-11 at 12 24 18 AM

Otherwise, it is confusing to visually separate the beams. In theory this would also be true for parallel non-horizontal beams as well.

MEI test data:

<?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-11T00:26:24" version="3.0.0-dev-38985cb">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000001634112130">
    <score xml:id="score-0000000106887782">
     <scoreDef xml:id="scoredef-0000000923037668">
      <staffGrp xml:id="staffgrp-0000001518367453" symbol="brace" bar.thru="true">
       <staffDef xml:id="staffdef-0000000415113335" n="1" lines="5">
        <clef xml:id="clef-L2F2" shape="G" line="2" />
       </staffDef>
       <staffDef xml:id="staffdef-0000000110203016" n="2" lines="5">
        <clef xml:id="clef-L2F1" shape="F" line="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1">
       <staff xml:id="staff-0000001899908613" n="1">
        <layer xml:id="layer-L1F2N1" n="1">
         <beam xml:id="beam-L4F2-L9F2">
          <note xml:id="note-L4F2" dur="16" oct="5" pname="e" accid.ges="n" />
          <note xml:id="note-L5F2" dur="16" oct="5" pname="g" accid.ges="n" />
          <note xml:id="note-L6F2" dur="16" oct="5" pname="d" accid.ges="n" />
          <note xml:id="note-L7F2" dur="16" oct="5" pname="g" accid.ges="n" />
          <note xml:id="note-L8F2" dur="16" oct="4" pname="a" accid.ges="n" />
          <note xml:id="note-L9F2" dur="16" oct="5" pname="f" accid="s" />
         </beam>
        </layer>
       </staff>
       <staff xml:id="staff-0000001334141883" n="2">
        <layer xml:id="layer-L1F1N1" n="1">
         <beam xml:id="beam-L4F1-L8F1">
          <note xml:id="note-L4F1" dur="8" oct="3" pname="c" accid.ges="n" />
          <note xml:id="note-L6F1" dur="8" oct="3" pname="f" accid.ges="n" />
          <note xml:id="note-L8F1" dur="8" oct="2" pname="d" accid.ges="n" />
         </beam>
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>
Monceber commented 2 years ago

image

craigsapp commented 2 years ago

Looks better, but the space is excessive if it is purely for visually separating the beams (1/2 of that distance would work well).

Ideally the minimum separation added would be about 2 vu (your example has 6-8 vu separation added).

But good enough for now.