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

Refine stacking order of slurs and articulations #3840

Open
brdvd opened this issue Oct 29, 2024 · 0 comments
Open

Refine stacking order of slurs and articulations #3840

brdvd opened this issue Oct 29, 2024 · 0 comments

Comments

@brdvd
Copy link
Contributor

brdvd commented Oct 29, 2024

Currently, slurs always start above/below articulations corresponding to the starting note. This is problematic if the articulation is always rendered outside the staff (e.g., accents) and thus quite far away from the notehead.

Minimal example
Render the following example:
Issue

Show MEI
<?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://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title />
   </titleStmt>
   <pubStmt>
    <unpub>This MEI file was created by Verovio's Humdrum converter. When published, this unpub element should be removed, and the enclosing pubStmt element should be properly filled out.</unpub>
   </pubStmt>
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2024-09-06T15:48:58" version="4.3.0-dev-e49dce2-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <extMeta>
   <frames xmlns="http://www.humdrum.org/ns/humxml">
    <metaFrame n="22" token="!!!system-decoration: s1[({(s2,s3)})]" xml:id="L23">
     <frameInfo>
      <startTime float="6" />
      <frameType>reference</frameType>
      <referenceKey>system-decoration</referenceKey>
      <referenceValue>s1[({(s2,s3)})]</referenceValue>
     </frameInfo>
    </metaFrame>
    <metaFrame n="23" token="!!!RDF**kern: &lt; = below" xml:id="L24">
     <frameInfo>
      <startTime float="6" />
      <frameType>reference</frameType>
      <referenceKey>RDF**kern</referenceKey>
      <referenceValue>&lt; = below</referenceValue>
     </frameInfo>
    </metaFrame>
    <metaFrame n="24" token="!!!RDF**kern: > = above" xml:id="L25">
     <frameInfo>
      <startTime float="6" />
      <frameType>reference</frameType>
      <referenceKey>RDF**kern</referenceKey>
      <referenceValue>&gt; = above</referenceValue>
     </frameInfo>
    </metaFrame>
    <metaFrame n="25" token="!!!Xfilter: extract -s 1,3" xml:id="L26">
     <frameInfo>
      <startTime float="6" />
      <frameType>reference</frameType>
      <referenceKey>Xfilter</referenceKey>
      <referenceValue>extract -s 1,3</referenceValue>
     </frameInfo>
    </metaFrame>
   </frames>
  </extMeta>
 </meiHead>
 <music decls="#work1_encoded">
  <body>
   <mdiv xml:id="m4c29fz">
    <score xml:id="sytlelf">
     <scoreDef xml:id="shlktde" tempo.dist="3.0000vu">
      <staffGrp xml:id="sb2m3vj" bar.thru="true" symbol="bracket" symbol="brace">
       <staffDef xml:id="staffdef-L1F2" n="1" lines="5">
        <clef xml:id="clef-L4F2" shape="G" line="2" />
        <keySig xml:id="keysig-L5F2" sig="1f" />
        <meterSig xml:id="metersig-L6F2" count="6" unit="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="36">
       <staff xml:id="staff-L1F2" n="1">
        <layer xml:id="layer-L1F2N1" n="1">
         <beam xml:id="beam-L14F2-L19F2">
          <note xml:id="note-L14F2" dur="8" oct="3" pname="a" accid.ges="n">
           <artic xml:id="artic-L14F2" artic="acc" place="above" />
          </note>
          <note xml:id="note-L15F2" dur="8" oct="3" pname="b" accid.ges="f" />
          <note xml:id="note-L16F2" dur="8" oct="4" pname="d" accid="f" />
          <note xml:id="note-L17F2" dur="8" oct="4" pname="c" accid.ges="n">
           <artic xml:id="artic-L17F2" artic="acc" place="above" />
          </note>
          <note xml:id="note-L18F2" dur="8" oct="4" pname="e" accid.ges="n" />
          <note xml:id="note-L19F2" dur="8" oct="4" pname="g" accid.ges="n" />
         </beam>
        </layer>
       </staff>
       <slur xml:id="slur-L14F2-L16F2" startid="#note-L14F2" endid="#note-L16F2" curvedir="above" />
       <slur xml:id="slur-L17F2-L19F2" startid="#note-L17F2" endid="#note-L19F2" curvedir="above" />
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Expected behavior
It is expected that the first slur starts above the beam, since there is enough vertical space between the beam and the articulation.

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

2 participants