verovio icon indicating copy to clipboard operation
verovio copied to clipboard

layer + chord offset case

Open craigsapp opened this issue 2 years ago • 1 comments

In the following example, the chord in the second layer on the top staff is moved too far to the left (pink notes):

Screen Shot 2022-04-22 at 8 08 34 PM

Probably the width of the chord is used to offset the chord two noteheads to the left, but one notehead to the left is desired.

Click to view MEI data for above example
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/dev/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.0-dev">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title>Piano Sonata no. 3 in C major</title>
   </titleStmt>
   <pubStmt />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2022-04-22T20:08:36" version="3.10.0-dev-c34d1d5-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title xml:id="title-L3" analog="humdrum:OTL" type="main">Piano Sonata no. 3 in C major</title>
    <composer analog="humdrum:COM" xml:id="person-L1">Beethoven, Ludwig van</composer>
    <creation>
     <date analog="humdrum:ODT">1794///-1795///</date>
    </creation>
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="me6jo4a">
    <score xml:id="s2jcbad">
     <scoreDef xml:id="svhwivg" midi.bpm="128.000000">
      <pgHead xml:id="paycz7">
       <rend xml:id="rri14bv" halign="center" valign="middle">
        <rend xml:id="r6zfxjj" fontsize="large">Piano Sonata no. 3 in C major</rend>
        <lb xml:id="lgifvc" /> 
<lb xml:id="liljhd5" /> </rend>
       <rend xml:id="rq9mjrk" halign="right" valign="bottom" fontsize="small">Ludwig van Beethoven</rend>
       <rend xml:id="rvjof0r" halign="right" valign="bottom" fontsize="small">1770–1827</rend>
      </pgHead>
      <staffGrp xml:id="sz7m304" bar.thru="true" symbol="brace">
       <staffDef xml:id="sdy7ade" n="1" lines="5">
        <clef xml:id="clef-L12F2" shape="G" line="2" />
       </staffDef>
       <staffDef xml:id="sl1xu2b" n="2" lines="5">
        <clef xml:id="clef-L12F1" shape="F" line="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L11F1">
      <measure xml:id="measure-L1">
       <staff xml:id="s1rbioc" n="1">
        <layer xml:id="layer-L11F2N1" n="1">
         <note xml:id="note-L16F3" dur="4" oct="4" pname="g" accid.ges="n" />
         <note xml:id="note-L17F3" type="placed" dur="4" oct="5" pname="c" stem.dir="up" accid.ges="n" />
         <note xml:id="note-L18F3" dur="4" oct="4" pname="d" accid.ges="n" />
         <note xml:id="note-L19F3" dur="4" oct="4" pname="a" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L12F2N2" n="2">
         <space xml:id="space-L16F4" dur="2" />
         <chord xml:id="chord-L18F4" dur="2">
          <note xml:id="note-L18F4S1" type="marked" oct="4" pname="c" color="hotpink" accid.ges="n" />
          <note xml:id="note-L18F4S2" type="marked" oct="4" pname="d" color="hotpink" accid.ges="n" />
         </chord>
        </layer>
       </staff>
       <staff xml:id="sdp8kr6" n="2">
        <layer xml:id="layer-L11F1N1" n="1">
         <note xml:id="note-L16F1" dur="2" oct="3" pname="g" accid.ges="n" />
         <note xml:id="note-L18F1" dur="2" oct="3" pname="a" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L12F1N2" n="2">
         <note xml:id="note-L16F2" dur="4" oct="3" pname="e" accid.ges="n" />
         <note xml:id="note-L17F2" dur="4" oct="3" pname="c" accid.ges="n" />
         <note xml:id="note-L18F2" dur="4" oct="3" pname="f" accid.ges="n" />
         <note xml:id="note-L19F2" dur="4" oct="3" pname="d" accid.ges="n" />
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Here is the target rendering:

Screen Shot 2022-04-22 at 8 13 54 PM

craigsapp avatar Apr 23 '22 03:04 craigsapp

Here is a similar and probably related case:

Screen Shot 2022-05-01 at 2 52 13 AM
Click to view MEI data for above example
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/dev/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.0-dev">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title>Piano Sonata no. 7 in D major</title>
   </titleStmt>
   <pubStmt>
    <respStmt>
     <persName xml:id="persname-L42" analog="humdrum:EED" role="editor">Craig Stuart Sapp</persName>
    </respStmt>
   </pubStmt>
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2022-05-01T02:52:15" version="3.10.0-dev-36a3430-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
   <projectDesc>
    <p>Encoded by: Craig Stuart Sapp</p>
    <p>Version: 2022/04/01</p>
   </projectDesc>
  </encodingDesc>
  <workList>
   <work>
    <title xml:id="title-L3" analog="humdrum:OTL" type="main">Piano Sonata no. 7 in D major</title>
    <composer analog="humdrum:COM" xml:id="person-L1">Beethoven, Ludwig van</composer>
   </work>
  </workList>
  <extMeta>
   <frames xmlns="http://www.humdrum.org/ns/humxml">
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mvv301g">
    <score xml:id="sf18sun">
     <scoreDef xml:id="skn3797" midi.bpm="240.000000">
      <pgHead xml:id="pzgldtj">
       <rend xml:id="rzfwfu5" halign="center" valign="middle">
        <rend xml:id="rhod5ys" fontsize="large">Piano Sonata no. 7 in D major</rend>
        <lb xml:id="la9iqnu" /> 
<lb xml:id="lgk87hm" /> </rend>
       <rend xml:id="r6mt34x" halign="right" valign="bottom" fontsize="small">Ludwig van Beethoven</rend>
       <rend xml:id="rr9ame6" halign="right" valign="bottom" fontsize="small">1770–1827</rend>
      </pgHead>
      <staffGrp xml:id="sde66om" bar.thru="true" symbol="brace">
       <staffDef xml:id="ss23hzo" n="1" lines="5">
        <clef xml:id="clef-L10F3" shape="F" line="4" />
        <keySig xml:id="keysig-L11F3" pname="d" mode="major" sig="2s" />
        <meterSig xml:id="metersig-L13F3" count="4" unit="4" />
       </staffDef>
       <staffDef xml:id="slhextb" n="2" lines="5">
        <clef xml:id="clef-L10F1" shape="F" line="4" />
        <keySig xml:id="keysig-L11F1" pname="d" mode="major" sig="2s" />
        <meterSig xml:id="metersig-L13F1" count="4" unit="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L8F1">
      <pb xml:id="pptqbi1" />
      <measure xml:id="measure-L1" n="294">
       <staff xml:id="schgqab" n="1">
        <layer xml:id="layer-L8F2N1" n="1">
         <note xml:id="note-L17F3" dur="2" oct="4" pname="f" accid.ges="s" />
         <note xml:id="note-L18F3" dur="2" oct="3" pname="b" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L10F3N2" n="2">
         <chord xml:id="chord-L17F4" dur="1">
          <note xml:id="note-L17F4S1" oct="3" pname="f" accid.ges="s" />
          <note xml:id="note-L17F4S2" oct="4" pname="f" accid.ges="s" />
         </chord>
        </layer>
       </staff>
       <staff xml:id="srmd5br" n="2">
        <layer xml:id="layer-L8F1N1" n="1">
         <note xml:id="note-L17F1" dur="1" oct="3" pname="d" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L10F2N2" n="2">
         <note xml:id="note-L17F2" dur="2" oct="2" pname="d" accid.ges="n" />
         <note xml:id="note-L18F2" dur="2" oct="2" pname="g" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L17F5" staff="1" tstamp="1.000000">cresc.</dir>
      </measure>
      <measure xml:id="measure-L19" n="295">
       <staff xml:id="staff-L19F3N1" n="1">
        <layer xml:id="layer-L19F3N1" n="1">
         <note xml:id="note-L20F3" dur="2" oct="4" pname="e" accid.ges="n" />
         <note xml:id="note-L21F3" dur="2" oct="3" pname="a" accid="s" />
        </layer>
        <layer xml:id="layer-L19F4N2" n="2">
         <chord xml:id="chord-L20F4" dur="1">
          <note xml:id="note-L20F4S1" oct="3" pname="e" accid.ges="n" />
          <note xml:id="note-L20F4S2" oct="4" pname="e" accid.ges="n" />
         </chord>
        </layer>
       </staff>
       <staff xml:id="staff-L19F1N1" n="2">
        <layer xml:id="layer-L19F1N1" n="1">
         <note xml:id="note-L20F1" dur="1" oct="3" pname="c" accid.ges="s" />
        </layer>
        <layer xml:id="layer-L19F2N2" n="2">
         <note xml:id="note-L20F2" dur="2" oct="2" pname="c" accid.ges="s" />
         <note xml:id="note-L21F2" dur="2" oct="2" pname="f" accid.ges="s" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L22" n="296">
       <staff xml:id="staff-L22F3N1" n="1">
        <layer xml:id="layer-L22F3N1" n="1">
         <note xml:id="note-L23F3" dur="2" oct="4" pname="d" accid.ges="n" />
         <note xml:id="note-L24F3" dur="2" oct="3" pname="g" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L22F4N2" n="2">
         <chord xml:id="chord-L23F4" dur="1">
          <note xml:id="note-L23F4S1" oct="3" pname="d" accid.ges="n" />
          <note xml:id="note-L23F4S2" oct="4" pname="d" accid.ges="n" />
         </chord>
        </layer>
       </staff>
       <staff xml:id="staff-L22F1N1" n="2">
        <layer xml:id="layer-L22F1N1" n="1">
         <note xml:id="note-L23F1" dur="1" oct="2" pname="b" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L22F2N2" n="2">
         <note xml:id="note-L23F2" dur="2" oct="1" pname="b" accid.ges="n" />
         <note xml:id="note-L24F2" dur="2" oct="2" pname="e" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L25" n="297">
       <staff xml:id="staff-L25F3N1" n="1">
        <layer xml:id="layer-L25F3N1" n="1">
         <note xml:id="note-L26F3" dur="2" oct="4" pname="c" accid="n" />
         <note xml:id="note-L27F3" dur="2" oct="3" pname="f" accid.ges="s" />
        </layer>
        <layer xml:id="layer-L25F4N2" n="2">
         <chord xml:id="chord-L26F4" dur="1">
          <note xml:id="note-L26F4S1" oct="3" pname="c" accid="n" />
          <note xml:id="note-L26F4S2" oct="4" pname="c">
           <accid xml:id="accid-L26F4S2" accid="n" func="caution" />
          </note>
         </chord>
        </layer>
       </staff>
       <staff xml:id="staff-L25F1N1" n="2">
        <layer xml:id="layer-L25F1N1" n="1">
         <note xml:id="note-L26F1" dur="1" oct="2" pname="a" accid.ges="n" />
        </layer>
        <layer xml:id="layer-L25F2N2" n="2">
         <note xml:id="note-L26F2" dur="2" oct="1" pname="a" accid.ges="n" />
         <note xml:id="note-L27F2" dur="2" oct="2" pname="d" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <sb xml:id="sb-L30F1" type="original" />
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Expected rendering (without extra space after green notes on top staff):

Screen Shot 2022-05-01 at 2 51 50 AM

craigsapp avatar May 01 '22 09:05 craigsapp