verovio icon indicating copy to clipboard operation
verovio copied to clipboard

Editorial accidental refinements

Open craigsapp opened this issue 2 years ago • 4 comments

Related to issue https://github.com/rism-digital/verovio/issues/2322 which allowed small editorial accidentals to be enclosed in parentheses and brackets, there could be some enhancement in the visual placements of parentheses/brackets around small editorial accidentals. The current tight spacing makes it difficult to see the difference between editorial accidentals in an enclosure and not in an enclosure (particularly for parentheses).

Screen Shot 2021-08-09 at 11 51 16 AM
Click to view MEI data for above example.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title />
   </titleStmt>
   <pubStmt />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2021-08-09T11:52:56" version="3.6.0-dev-0abf482-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000000222374883">
    <score xml:id="score-0000002091737657">
     <scoreDef xml:id="scoredef-0000000210598957">
      <staffGrp xml:id="staffgrp-0000000978835965">
       <staffDef xml:id="staffdef-0000000169064387" n="1" lines="5">
        <clef xml:id="clef-0000002110967572" shape="G" line="2" />
        <meterSig xml:id="metersig-L2F1" count="4" unit="4" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="1">
       <staff xml:id="staff-0000001191213448" n="1">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L4F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L4F1" accid="s" func="edit" enclose="paren" />
         </note>
         <note xml:id="note-L5F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L5F1" accid="n" func="edit" enclose="paren" />
         </note>
         <note xml:id="note-L6F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L6F1" accid="f" func="edit" enclose="paren" />
         </note>
         <note xml:id="note-L7F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L7F1" accid="ff" func="edit" enclose="paren" />
         </note>
         <note xml:id="note-L8F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L8F1" accid="x" func="edit" enclose="paren" />
         </note>
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L9">
       <staff xml:id="staff-L9F1N1" n="1">
        <layer xml:id="layer-L9F1N1" n="1">
         <note xml:id="note-L10F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L10F1" accid="s" func="edit" enclose="brack" />
         </note>
         <note xml:id="note-L11F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L11F1" accid="n" func="edit" enclose="brack" />
         </note>
         <note xml:id="note-L12F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L12F1" accid="f" func="edit" enclose="brack" />
         </note>
         <note xml:id="note-L13F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L13F1" accid="ff" func="edit" enclose="brack" />
         </note>
         <note xml:id="note-L14F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L14F1" accid="x" func="edit" enclose="brack" />
         </note>
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L15">
       <staff xml:id="staff-L15F1N1" n="1">
        <layer xml:id="layer-L15F1N1" n="1">
         <note xml:id="note-L16F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L16F1" accid="s" enclose="paren" />
         </note>
         <note xml:id="note-L17F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L17F1" accid="n" enclose="paren" />
         </note>
         <note xml:id="note-L18F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L18F1" accid="f" enclose="paren" />
         </note>
         <note xml:id="note-L19F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L19F1" accid="ff" enclose="paren" />
         </note>
         <note xml:id="note-L20F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L20F1" accid="x" enclose="paren" />
         </note>
        </layer>
       </staff>
      </measure>
      <measure xml:id="measure-L21">
       <staff xml:id="staff-L21F1N1" n="1">
        <layer xml:id="layer-L21F1N1" n="1">
         <note xml:id="note-L22F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L22F1" accid="s" enclose="brack" />
         </note>
         <note xml:id="note-L23F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L23F1" accid="n" enclose="brack" />
         </note>
         <note xml:id="note-L24F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L24F1" accid="f" enclose="brack" />
         </note>
         <note xml:id="note-L25F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L25F1" accid="ff" enclose="brack" />
         </note>
         <note xml:id="note-L26F1" dur="4" oct="5" pname="c">
          <accid xml:id="accid-L26F1" accid="x" enclose="brack" />
         </note>
        </layer>
       </staff>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

Parentheses/brackets around regular-sized accidentals look fine (last two measures), but in many cases the parentheses/brackets are too close to the accidental when it is small and above the note. When the parentheses/brackets are on regular accidentals, the tight spacing is good because (1) the accidentals are larger, and (2) it is usually desirable to minimize the width of the accidentals to reduce stretching out the music.

For smaller accidentals above the notes, keeping the enclosures compact is not as necessary, so it would be useful to add padding space between the enclosure and accidental:

  • The worst case are small naturals and flats above the notes enclosed in parentheses. It would good to add enough space so that the parentheses endpoints do not visually touch the accidentals. For flats, only the left side needs some padding, since the right side does not have problems with the parenthese endpoints. The double flat has the same property. The sharp is not too bad, but a tiny bit of space on both sides might be better. The double sharp looks good as it is.
  • When a bracket is used, there is less problem since there is a 90 degree angle at the junction between the parenthese endpoints and the accidental which it touches. But like with parentheses, a little more space between the enclosure and the accidental would increase readability.

craigsapp avatar Aug 09 '21 10:08 craigsapp

This might be tricky, because these are actually SMuFL ligatures (see https://w3c.github.io/smufl/latest/tables/standard-accidentals-12-edo.html). Have you tried with other fonts?

rettinghaus avatar Aug 23 '21 18:08 rettinghaus

The size of the parenthesis and of the bracket seems to be essentially a font issue - Leland in your example. It looks acceptable with Leipzig

image

With Bravura, parenthesis look good but brackets are a bit small in my opinion.

image

I agree that improving spacing would be good because all the fonts have flats and naturals being touched.

lpugin avatar Aug 24 '21 06:08 lpugin

Another refinement to issue #2322 concerns the position of small editorial accidentials. In the Neue Mozart-Ausgabe, small editorial accidentials in brackets are sometimes placed below the corresponding note, for example in KV 284/2, m. 19: Accidentials_Position_Below_NMA_KV_284_02_m19 In MEI it is possible to encode the position of the editorial accidentials below the corresponding note through @place="below" in <accid>, but this features is not yet rendered in Verovio (editorial accidentials are always positioned above the notes, even if @place="below" has been encoded in accid): Accidentials_Position_Below_Verovio_KV_284_02_m19

Click here to view the MEI data for the above example.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.1/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/4.0.1/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei meiversion="4.0.1" xmlns="http://www.music-encoding.org/ns/mei">
  <meiHead>
    <fileDesc>
      <titleStmt>
        <title label="NMA digital" type="unit">place="below" in accidentials with func="edit", s. NMA KV 284/2, m. 19</title>
        <respStmt>
          <persName role="composer">W. A. Mozart</persName>
        </respStmt>
      </titleStmt>
      <pubStmt/>
    </fileDesc>
  </meiHead>
  <music>
    <body>
      <mdiv>
        <score>
          <scoreDef key.mode="major" key.pname="a" key.sig="3s" xml:id="scoreDef_01">
            <staffGrp bar.thru="true" xml:id="staffGrp_01">
              <staffDef clef.line="4" clef.shape="F" key.sig="3s" lines="5" n="2" xml:id="staffDef_P2"/>
            </staffGrp>
          </scoreDef>
          <section>
            <measure xml:id="m19_k284_002">
              <staff n="2" xml:id="staff_6570">
                <layer n="1" xml:id="layer_6576">
                  <beam xml:id="beam_6582">
                    <note dur="16" oct="3" pname="e" tstamp="1" xml:id="note_6588"/>
                    <note dur="16" oct="4" pname="e" tstamp="1.25" xml:id="note_6594"/>
                    <note accid.ges="s" dur="16" oct="3" pname="f" tstamp="1.5" xml:id="note_6600"/>
                    <note dur="16" oct="4" pname="e" tstamp="1.75" xml:id="note_6606"/>
                  </beam>
                  <beam xml:id="beam_6612">
                    <note accid.ges="s" dur="16" oct="3" pname="g" tstamp="2" xml:id="note_6618"/>
                    <note dur="16" oct="4" pname="e" tstamp="2.25" xml:id="note_6624"/>
                    <note dur="16" oct="3" pname="f" tstamp="2.5" xml:id="note_6630">
                      <accid accid="x" color="red" enclose="brack" func="edit" place="below" xml:id="accid_6636"/>
                    </note>
                    <note dur="16" oct="4" pname="e" tstamp="2.75" xml:id="note_6642"/>
                  </beam>
                  <beam xml:id="beam_6648">
                    <note accid.ges="s" dur="16" oct="3" pname="g" tstamp="3" xml:id="note_6654"/>
                    <note dur="16" oct="4" pname="e" tstamp="3.25" xml:id="note_6660"/>
                    <note dur="16" oct="3" pname="f" tstamp="3.5" xml:id="note_6666">
                      <accid accid="x" color="red" enclose="brack" func="edit" place="below" xml:id="accid_6672"/>
                    </note>
                    <note dur="16" oct="4" pname="e" tstamp="3.75" xml:id="note_6678"/>
                  </beam>
                </layer>
              </staff>
              <slur endid="#note_6678" staff="2" startid="#note_6588" xml:id="slur_6744"/>
            </measure>
          </section>
        </score>
      </mdiv>
    </body>
  </music>
</mei>

Can Verovio render also these feature (editorial accidential position)?

cividini avatar May 17 '22 09:05 cividini

I have a repertory with accid@enclose on small editorial accidentals above notes, so a full implementation of permutations of @enclose/@place with @func would be nice.

The reason why the editorial accidentals have to be placed below the notes in this case is because otherwise the editorial accidentals look like they are related to the E4 pitch of the following notes (and not to the F3 notes).

This subissue is also slightly related to issue https://github.com/rism-digital/verovio/issues/2861

craigsapp avatar May 17 '22 09:05 craigsapp