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

Harm @n behavior in vertical placement #3185

Closed
craigsapp opened this issue Dec 29, 2022 · 1 comment
Closed

Harm @n behavior in vertical placement #3185

craigsapp opened this issue Dec 29, 2022 · 1 comment

Comments

@craigsapp
Copy link
Contributor

The @n order of <harm> data gets mixed up if the initial appearances of the data is not at the same timestamp.

Example:

Screen Shot 2022-12-29 at 2 09 45 PM

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 />
   </titleStmt>
   <pubStmt />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2022-12-29T10:08:54" version="3.15.0-dev-3a49fbf">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mzcaiy3">
    <score xml:id="sfndg3i">
     <scoreDef xml:id="si2xbll" midi.bpm="400.000000">
      <staffGrp xml:id="s1w71dzx">
       <staffDef xml:id="staffdef-L1F1" n="1" lines="5">
        <clef xml:id="clef-L2F1" shape="G" line="2" />
        <meterSig xml:id="metersig-L3F1" count="4" unit="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="1">
       <staff xml:id="staff-L1F1" n="1">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L5F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L5F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L5F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L6" n="2">
       <staff xml:id="staff-L6F1N1" n="1">
        <layer xml:id="layer-L6F1N1" n="1">
         <note xml:id="note-L7F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L7F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L7F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L7F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L8" n="2">
       <staff xml:id="staff-L8F1N1" n="1">
        <layer xml:id="layer-L8F1N1" n="1">
         <note xml:id="note-L9F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L9F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L9F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L9F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L10" n="2">
       <staff xml:id="staff-L10F1N1" n="1">
        <layer xml:id="layer-L10F1N1" n="1">
         <note xml:id="note-L11F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L11F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L11F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L11F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L12" n="2">
       <staff xml:id="staff-L12F1N1" n="1">
        <layer xml:id="layer-L12F1N1" n="1">
         <note xml:id="note-L13F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L13F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L13F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L13F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L14" n="2">
       <staff xml:id="staff-L14F1N1" n="1">
        <layer xml:id="layer-L14F1N1" n="1">
         <note xml:id="note-L15F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L15F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L15F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L15F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L16" right="end" n="2">
       <staff xml:id="staff-L16F1N1" n="1">
        <layer xml:id="layer-L16F1N1" n="1">
         <note xml:id="note-L17F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L17F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L17F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L17F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

The text of the <harm> matches the contents of @n. Notice that the vertical order of the harm labels is "2, 3, 1" rather than "1, 2, 3" which would be expected. The problem is caused by there being no harm@n="1" on the first note of the score. If it is added, then the behavior is as expected:

Screen Shot 2022-12-29 at 2 13 30 PM

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 />
   </titleStmt>
   <pubStmt />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2022-12-29T10:08:54" version="3.15.0-dev-3a49fbf">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mzcaiy3">
    <score xml:id="sfndg3i">
     <scoreDef xml:id="si2xbll" midi.bpm="400.000000">
      <staffGrp xml:id="s1w71dzx">
       <staffDef xml:id="staffdef-L1F1" n="1" lines="5">
        <clef xml:id="clef-L2F1" shape="G" line="2" />
        <meterSig xml:id="metersig-L3F1" count="4" unit="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="1">
       <staff xml:id="staff-L1F1" n="1">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L5F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L5F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L5F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L5F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L6" n="2">
       <staff xml:id="staff-L6F1N1" n="1">
        <layer xml:id="layer-L6F1N1" n="1">
         <note xml:id="note-L7F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L7F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L7F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L7F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L8" n="2">
       <staff xml:id="staff-L8F1N1" n="1">
        <layer xml:id="layer-L8F1N1" n="1">
         <note xml:id="note-L9F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L9F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L9F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L9F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L10" n="2">
       <staff xml:id="staff-L10F1N1" n="1">
        <layer xml:id="layer-L10F1N1" n="1">
         <note xml:id="note-L11F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L11F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L11F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L11F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L12" n="2">
       <staff xml:id="staff-L12F1N1" n="1">
        <layer xml:id="layer-L12F1N1" n="1">
         <note xml:id="note-L13F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L13F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L13F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L13F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L14" n="2">
       <staff xml:id="staff-L14F1N1" n="1">
        <layer xml:id="layer-L14F1N1" n="1">
         <note xml:id="note-L15F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L15F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L15F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L15F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
      <measure xml:id="measure-L16" right="end" n="2">
       <staff xml:id="staff-L16F1N1" n="1">
        <layer xml:id="layer-L16F1N1" n="1">
         <note xml:id="note-L17F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <harm xml:id="harm-L17F2" type="deg" place="below" staff="1" tstamp="1.000000" n="1">1</harm>
       <harm xml:id="harm-L17F3" type="deg" place="below" staff="1" tstamp="1.000000" n="2">2</harm>
       <harm xml:id="harm-L17F4" type="deg" place="below" staff="1" tstamp="1.000000" n="3">3</harm>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Notice that the @n="1" line is both in the correct order, and that it is moved into an empty vertical position that should have been used for the @n="1" harm data in the first example.

So there is some variable mixup or omission: The @n="1" information created a space for the @n="1" data, but it was then placed below the @n="3" because the first @n="1" item was found after an @n="3" item.

The system break in the examples demonstrates that the castoff process is not involved, because the order remains mixed on the second system in the first example.

@craigsapp craigsapp changed the title Harm @n behavior Harm @n behavior in vertical placement Dec 29, 2022
@lpugin lpugin closed this as completed in 41138df Jun 1, 2023
@lpugin
Copy link
Contributor

lpugin commented Jun 1, 2023

image

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