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

Printing system-level dir/tempo in condensed scores #3650

Open
craigsapp opened this issue Apr 19, 2024 · 2 comments
Open

Printing system-level dir/tempo in condensed scores #3650

craigsapp opened this issue Apr 19, 2024 · 2 comments

Comments

@craigsapp
Copy link
Contributor

Related to issue music-encoding/music-encoding#1450

It would be useful to implement dir@type="system" and tempo@type="system" to label dirs/tempos as "system level" text that should still be displayed if a staff has been condensed on a particular system that has dir/tempo that should still be displayed in the music.

Example:

Screenshot 2024-04-19 at 10 23 54 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://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>Grave</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-04-19T10:07:09" version="4.2.0-dev-3d89370-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work xml:id="work0_encoded" type="encoded">
    <title type="uniform">
     <titlePart type="movementName" analog="humdrum:OMD">Grave</titlePart>
    </title>
   </work>
  </workList>
  <extMeta>
   <frames xmlns="http://www.humdrum.org/ns/humxml">
    <metaFrame n="0" token="!!!OMD: Grave" xml:id="L1">
     <frameInfo>
      <startTime float="0" />
      <frameType>reference</frameType>
      <referenceKey>OMD</referenceKey>
      <referenceValue>Grave</referenceValue>
     </frameInfo>
    </metaFrame>
    <metaFrame n="23" token="!!!verovio: condense auto" xml:id="L24">
     <frameInfo>
      <startTime float="36" />
      <frameType>reference</frameType>
      <referenceKey>verovio</referenceKey>
      <referenceValue>condense auto</referenceValue>
     </frameInfo>
    </metaFrame>
    <metaFrame n="24" token="!!!system-decoration: [(s1,s2)][(s3,s4)]" xml:id="L25">
     <frameInfo>
      <startTime float="36" />
      <frameType>reference</frameType>
      <referenceKey>system-decoration</referenceKey>
      <referenceValue>[(s1,s2)][(s3,s4)]</referenceValue>
     </frameInfo>
    </metaFrame>
   </frames>
  </extMeta>
 </meiHead>
 <music decls="#work0_encoded">
  <body>
   <mdiv xml:id="m1iwncdw">
    <score xml:id="s1i9sp1d">
     <scoreDef xml:id="s1ohoddf" midi.bpm="40.000000">
      <staffGrp xml:id="s10tqruq" bar.thru="false">
       <staffGrp xml:id="s17z2eo8" bar.thru="true" symbol="bracket">
        <staffDef xml:id="staffdef-L2F4" n="1" lines="5">
         <clef xml:id="c1gi6ole" shape="G" line="2" />
        </staffDef>
        <staffDef xml:id="staffdef-L2F3" n="2" lines="5">
         <clef xml:id="c1ur6af8" shape="G" line="2" />
        </staffDef>
       </staffGrp>
       <staffGrp xml:id="s1alrp7w" bar.thru="true" symbol="bracket">
        <staffDef xml:id="staffdef-L2F2" n="3" lines="5">
         <clef xml:id="cx3p1gj" shape="F" line="4" />
        </staffDef>
        <staffDef xml:id="staffdef-L2F1" n="4" lines="5">
         <clef xml:id="cx9bqg2" shape="F" line="4" />
        </staffDef>
       </staffGrp>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L2F1">
      <measure xml:id="measure-L1">
       <staff xml:id="staff-L2F4" n="1">
        <layer xml:id="layer-L1F4N1" n="1">
         <note xml:id="note-L4F4" dur="1" oct="5" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L2F3" n="2">
        <layer xml:id="layer-L1F3N1" n="1">
         <note xml:id="note-L4F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L2F2" n="3">
        <layer xml:id="layer-L1F2N1" n="1">
         <note xml:id="note-L4F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L2F1" n="4">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L4F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <tempo xml:id="tempo-L1F1" type="system" staff="1 3" tstamp="1.000000">Grave</tempo>
      </measure>
      <measure xml:id="measure-L5">
       <staff xml:id="staff-L5F4N1" n="1">
        <layer xml:id="layer-L5F4N1" n="1">
         <note xml:id="note-L6F4" dur="1" oct="5" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L5F3N1" n="2">
        <layer xml:id="layer-L5F3N1" n="1">
         <note xml:id="note-L6F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L5F2N1" n="3">
        <layer xml:id="layer-L5F2N1" n="1">
         <note xml:id="note-L6F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L5F1N1" n="4">
        <layer xml:id="layer-L5F1N1" n="1">
         <note xml:id="note-L6F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L7">
       <staff xml:id="staff-L7F4N1" n="1">
        <layer xml:id="layer-L7F4N1" n="1">
         <note xml:id="note-L8F4" dur="1" oct="5" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L7F3N1" n="2">
        <layer xml:id="layer-L7F3N1" n="1">
         <note xml:id="note-L8F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L7F2N1" n="3">
        <layer xml:id="layer-L7F2N1" n="1">
         <note xml:id="note-L8F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L7F1N1" n="4">
        <layer xml:id="layer-L7F1N1" n="1">
         <note xml:id="note-L8F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L9" right="dbl">
       <staff xml:id="staff-L9F4N1" n="1">
        <layer xml:id="layer-L9F4N1" n="1">
         <rest xml:id="rest-L10F4" dur="1" />
        </layer>
       </staff>
       <staff xml:id="staff-L9F3N1" n="2">
        <layer xml:id="layer-L9F3N1" n="1">
         <note xml:id="note-L10F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L9F2N1" n="3">
        <layer xml:id="layer-L9F2N1" n="1">
         <note xml:id="note-L10F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L9F1N1" n="4">
        <layer xml:id="layer-L9F1N1" n="1">
         <note xml:id="note-L10F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L11">
       <staff xml:id="staff-L11F4N1" n="1">
        <layer xml:id="layer-L11F4N1" n="1">
         <rest xml:id="rest-L13F4" dur="1" />
        </layer>
       </staff>
       <staff xml:id="staff-L11F3N1" n="2">
        <layer xml:id="layer-L11F3N1" n="1">
         <note xml:id="note-L13F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L11F2N1" n="3">
        <layer xml:id="layer-L11F2N1" n="1">
         <note xml:id="note-L13F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L11F1N1" n="4">
        <layer xml:id="layer-L11F1N1" n="1">
         <note xml:id="note-L13F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <tempo xml:id="dir-L12F1" place="above" type="system" staff="1 3" tstamp="1.000000">
        Allegro
       </tempo>
      </measure>
      <measure xml:id="measure-L14">
       <staff xml:id="staff-L14F4N1" n="1">
        <layer xml:id="layer-L14F4N1" n="1">
         <rest xml:id="rest-L15F4" dur="1" />
        </layer>
       </staff>
       <staff xml:id="staff-L14F3N1" n="2">
        <layer xml:id="layer-L14F3N1" n="1">
         <note xml:id="note-L15F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L14F2N1" n="3">
        <layer xml:id="layer-L14F2N1" n="1">
         <note xml:id="note-L15F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L14F1N1" n="4">
        <layer xml:id="layer-L14F1N1" n="1">
         <note xml:id="note-L15F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L16">
       <staff xml:id="staff-L16F4N1" n="1">
        <layer xml:id="layer-L16F4N1" n="1">
         <rest xml:id="rest-L17F4" dur="1" />
        </layer>
       </staff>
       <staff xml:id="staff-L16F3N1" n="2">
        <layer xml:id="layer-L16F3N1" n="1">
         <note xml:id="note-L17F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L16F2N1" n="3">
        <layer xml:id="layer-L16F2N1" n="1">
         <note xml:id="note-L17F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L16F1N1" n="4">
        <layer xml:id="layer-L16F1N1" n="1">
         <note xml:id="note-L17F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L18">
       <staff xml:id="staff-L18F4N1" n="1">
        <layer xml:id="layer-L18F4N1" n="1">
         <rest xml:id="rest-L19F4" dur="1" />
        </layer>
       </staff>
       <staff xml:id="staff-L18F3N1" n="2">
        <layer xml:id="layer-L18F3N1" n="1">
         <note xml:id="note-L19F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L18F2N1" n="3">
        <layer xml:id="layer-L18F2N1" n="1">
         <note xml:id="note-L19F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L18F1N1" n="4">
        <layer xml:id="layer-L18F1N1" n="1">
         <note xml:id="note-L19F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L20" right="end">
       <staff xml:id="staff-L20F4N1" n="1">
        <layer xml:id="layer-L20F4N1" n="1">
         <rest xml:id="rest-L21F4" dur="1" />
        </layer>
       </staff>
       <staff xml:id="staff-L20F3N1" n="2">
        <layer xml:id="layer-L20F3N1" n="1">
         <note xml:id="note-L21F3" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L20F2N1" n="3">
        <layer xml:id="layer-L20F2N1" n="1">
         <note xml:id="note-L21F2" dur="1" oct="3" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L20F1N1" n="4">
        <layer xml:id="layer-L20F1N1" n="1">
         <note xml:id="note-L21F1" dur="1" oct="2" pname="c" accid.ges="n" />
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

The two tempos would include @type="system":

<tempo xml:id="tempo-L1F1" type="system" staff="1 3" tstamp="1.000000">Grave</tempo>
<tempo xml:id="dir-L12F1" place="above" type="system" staff="1 3" tstamp="1.000000">Allegro</tempo>

When condensing a tempo or dir that contains a @type="system", then the staff assignments for the text would be adjusted automatically:

The basic algorithm for <dir type="system" staff="1 3"> when condensing would be to place the staff 1 text on staff 2 if staff 1 is condensed. If staff 1 and 2 are condensed, then there would be no extra text displayed on staff 3, since the system-level text is already displayed there. If only staff 3 is condensed, then staff 4 would be used for the text instead. If staff 1 and 3 are condensed, then the system-level text would be displayed on staff 2 and 4.

@lpugin
Copy link
Contributor

lpugin commented Apr 19, 2024

The @type attribute is meant to remain free for application-specific uses. We need to find another solution

@craigsapp
Copy link
Contributor Author

My suggestion on music-encoding/music-encoding#1450 is to use @func. There is currently no dir@func, but there is tempo@func.

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