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

mixed beam + rest interaction #3660

Open
craigsapp opened this issue Apr 29, 2024 · 1 comment
Open

mixed beam + rest interaction #3660

craigsapp opened this issue Apr 29, 2024 · 1 comment

Comments

@craigsapp
Copy link
Contributor

craigsapp commented Apr 29, 2024

Related to discussion at music-encoding/music-encoding#1461

The following example should have the beams in both measure be similar to the one in the first measure:

Screenshot 2024-04-29 at 10 45 08 AM
Click to view MEI data for above example.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http:https://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http:https://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http:https://www.music-encoding.org/ns/mei" meiversion="5.0">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title />
   </titleStmt>
   <pubStmt>
   </pubStmt>
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2024-04-29T10:42:40" version="4.2.0-dev-764d3d2-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
 </meiHead>
 <music decls="#work1_encoded">
  <body>
   <mdiv xml:id="mid4lan">
    <score xml:id="s1nzk847">
     <scoreDef xml:id="s2r15e0" tempo.dist="3.0000vu">
      <staffGrp xml:id="snvnop0" bar.thru="true" symbol="brace">
       <staffDef xml:id="staffdef-L1F2" n="1" lines="5">
        <clef xml:id="clef-L2F2" shape="G" line="2" />
       </staffDef>
       <staffDef xml:id="staffdef-L1F1" 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-L1F2" n="1">
        <layer xml:id="layer-L1F2N1" n="1">
         <space xml:id="space-L3F2" dur="4" />
        </layer>
       </staff>
       <staff xml:id="staff-L1F1" n="2">
        <layer xml:id="layer-L1F1N1" n="1">
         <beam xml:id="beam-L3F1-L4F1" beam.with="below">
          <note xml:id="note-L3F1" type="placed" dur="8" oct="3" pname="c" stem.dir="up" accid.ges="n" />
          <note xml:id="note-L4F1" type="placed" dur="8" staff="1" oct="5" pname="c" stem.dir="down" accid.ges="n" />
         </beam>
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L5" n="2">
       <staff xml:id="staff-L5F2N1" n="1">
        <layer xml:id="layer-L5F2N1" n="1">
         <space xml:id="space-L6F2" dur="4" />
        </layer>
       </staff>
       <staff xml:id="staff-L5F1N1" n="2">
        <layer xml:id="layer-L5F1N1" n="1">
         <beam xml:id="beam-L6F1-L7F1" beam.with="below">
          <note xml:id="note-L6F1" type="placed" dur="8" oct="3" pname="c" stem.dir="up" accid.ges="n" />
          <rest xml:id="rest-L7F1" dur="8" staff="1" ploc="b" oloc="4" />
         </beam>
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

The proposal is to used beam@placed="mixed" in such situations to clarify a mix-stem beam is wanted:

https://music-encoding.org/guidelines/v5/data-types/data.BEAMPLACE.html

Screenshot 2024-04-29 at 11 52 51 AM

Currently if beam@place="mixed" is used, verovio goes crazy:

Screenshot 2024-04-29 at 11 54 36 AM
Click to view MEI data for above example
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http:https://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http:https://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http:https://www.music-encoding.org/ns/mei" meiversion="5.0">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title />
   </titleStmt>
   <pubStmt>
   </pubStmt>
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2024-04-29T10:42:40" version="4.2.0-dev-764d3d2-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
 </meiHead>
 <music decls="#work1_encoded">
  <body>
   <mdiv xml:id="mid4lan">
    <score xml:id="s1nzk847">
     <scoreDef xml:id="s2r15e0" tempo.dist="3.0000vu">
      <staffGrp xml:id="snvnop0" bar.thru="true" symbol="brace">
       <staffDef xml:id="staffdef-L1F2" n="1" lines="5">
        <clef xml:id="clef-L2F2" shape="G" line="2" />
       </staffDef>
       <staffDef xml:id="staffdef-L1F1" 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-L1F2" n="1">
        <layer xml:id="layer-L1F2N1" n="1">
         <space xml:id="space-L3F2" dur="4" />
        </layer>
       </staff>
       <staff xml:id="staff-L1F1" n="2">
        <layer xml:id="layer-L1F1N1" n="1">
         <beam xml:id="beam-L3F1-L4F1" beam.with="below">
          <note xml:id="note-L3F1" type="placed" dur="8" oct="3" pname="c" stem.dir="up" accid.ges="n" />
          <note xml:id="note-L4F1" type="placed" dur="8" staff="1" oct="5" pname="c" stem.dir="down" accid.ges="n" />
         </beam>
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L5" n="2">
       <staff xml:id="staff-L5F2N1" n="1">
        <layer xml:id="layer-L5F2N1" n="1">
         <space xml:id="space-L6F2" dur="4" />
        </layer>
       </staff>
       <staff xml:id="staff-L5F1N1" n="2">
        <layer xml:id="layer-L5F1N1" n="1">
         <beam xml:id="beam-L6F1-L7F1" beam.with="below" place="mixed" >
          <note xml:id="note-L6F1" type="placed" dur="8" oct="3" pname="c" stem.dir="up" accid.ges="n" />
          <rest xml:id="rest-L7F1" dur="8" staff="1" ploc="b" oloc="4" />
         </beam>
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Some infinities are probably generated, and the second staff rendering is aborted. I only added @place="mixed" for the second measure beam, when adding `@place="mixed" to the first beam there is no problem, so it is related to getting the non-stem direction of the rest most likely.

@craigsapp
Copy link
Contributor Author

See also older discussion about mixed-stem beams: music-encoding/music-encoding#690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant