humdrum-tools / vhv-documentation

Documentation for the Verovio Humdrum Viewer
http://doc.verovio.humdrum.org
2 stars 6 forks source link

Turn ornament documentation #11

Open davidrizo opened 4 years ago

davidrizo commented 4 years ago

From the humdrum documentation, turns are encoded using the S signifier. It could be added to the documentation.

Besides, turns have different meanings depending on their placement Turn

However, there is not any documentation on how the second measure turn is to be encoded. The following code generates the first measure:

4.ccS
8dd
2ee
davidrizo commented 4 years ago

In order to encode in MEI, the turn must be linked to the xml:id value of the linked note, e.g.

<measure>
    <staff n="1">
        <layer n="1">
            <note dur="4" oct="5" pname="c" />
            <note xml:id="n19" dur="4" oct="5" pname="d" />
            <note dur="2" oct="5" pname="e" />
        </layer>
    </staff>
    <turn staff="1" startid="#n19" form="lower" />
</measure>
craigsapp commented 4 years ago

Yes, the original Humdrum documentation underspecifies turns. I have enhanced them for rendering in VHV (and I should document them :-). I probably implemented turns after I wrote the vhv documentation about **kern encoding.

Turns consist of a string of s, S and $ characters:

expression meaning
S([Ss][Ss])? delayed turn
sS([Ss][Ss])? undelayed turn
$([Ss][Ss])? delayed inverted turn
s$([Ss][Ss])? undelayed inverted turn

So S means a delayed turn, sS is an undelayed turn, $ is a delayed inverted turn and s$ is an undelayed inverted turn.

After the above turn markers, there should be two interval description letters, with s meaning a minor secnd and S meaning a major second.

So SSs is a delayed turn that starts with a rising major second, then a falling minor second. If on C, then the notes of the turn are C--D-C-B-C.

If there are no interval letters after the turn marker, then it would be presumed that the turn notes are in the key (but preferably the turn intervals are always given).

Example of all possibilities on the note C:

Screen Shot 2020-05-01 at 1 03 08 PM

Humdrum data for example:

**kern
=1
!LO:TX:a:t=without interval descriptions
2ccS
2dd
=2
2ccsS
2dd
=3
2cc$
2dd
=3
2ccs$
2dd
=4||
!LO:TX:a:t=with interval descriptions
2ccSSS
2dd
=5
2ccSSs
2dd
=6
2ccSsS
2dd
=7
2ccSss
2dd
=8
2ccsSSS
2dd
=9
2ccsSSs
2dd
=10
2ccsSsS
2dd
=11
2ccsSss
2dd
=12||
!LO:TX:a:t=inverted with intervals
2cc$SS
2dd
=13
2cc$Ss
2dd
=14
2cc$sS
2dd
=15
2cc$ss
2dd
=16
2ccs$SS
2dd
=17
2ccs$Ss
2dd
=18
2ccs$sS
2dd
=19
2ccs$ss
2dd
==
*-

MEI conversion:

I am using turn@tstamp to place the turns. I think that this is necessary for delayed turns? For non-delayed turns they could be linked to the desired note, and it makes more sense to link to notes rather than timestamps (but how would delayed turns be attached directly to notes?).

<?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="2020-05-01T13:06:54" version="2.7.0-dev-9bf1e9f">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000001168440396">
    <score xml:id="score-0000000997216720">
     <scoreDef xml:id="scoredef-0000000475101364">
      <staffGrp xml:id="staffgrp-0000000195871373">
       <staffDef xml:id="staffdef-0000002127243091" n="1" lines="5">
        <clef xml:id="clef-0000000835351803" shape="G" line="2" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" n="1">
       <staff xml:id="staff-0000000607427612" n="1">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L4F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L5F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L4F1" staff="1" tstamp="2.000000" form="lower" />
       <dir xml:id="dir-L4F1" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="rend-0000000319437038" fontstyle="normal">without interval descriptions</rend>
       </dir>
      </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="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L8F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L7F1" staff="1" startid="#note-L7F1" form="lower" />
      </measure>
      <measure xml:id="measure-L9" n="3">
       <staff xml:id="staff-L9F1N1" n="1">
        <layer xml:id="layer-L9F1N1" n="1">
         <note xml:id="note-L10F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L11F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L10F1" staff="1" tstamp="2.000000" form="upper" />
      </measure>
      <measure xml:id="measure-L12" right="dbl" n="3">
       <staff xml:id="staff-L12F1N1" n="1">
        <layer xml:id="layer-L12F1N1" n="1">
         <note xml:id="note-L13F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L14F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L13F1" staff="1" startid="#note-L13F1" form="upper" />
      </measure>
      <measure xml:id="measure-L15" n="4">
       <staff xml:id="staff-L15F1N1" n="1">
        <layer xml:id="layer-L15F1N1" n="1">
         <note xml:id="note-L17F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L18F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L17F1" staff="1" tstamp="2.000000" accidlower="f" form="lower" />
       <dir xml:id="dir-L17F1" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="rend-0000001450305940" fontstyle="normal">with interval descriptions</rend>
       </dir>
      </measure>
      <measure xml:id="measure-L19" n="5">
       <staff xml:id="staff-L19F1N1" n="1">
        <layer xml:id="layer-L19F1N1" n="1">
         <note xml:id="note-L20F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L21F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L20F1" staff="1" tstamp="2.000000" form="lower" />
      </measure>
      <measure xml:id="measure-L22" n="6">
       <staff xml:id="staff-L22F1N1" n="1">
        <layer xml:id="layer-L22F1N1" n="1">
         <note xml:id="note-L23F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L24F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L24F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L23F1" staff="1" tstamp="2.000000" accidupper="f" accidlower="f" form="lower" />
      </measure>
      <measure xml:id="measure-L25" n="7">
       <staff xml:id="staff-L25F1N1" n="1">
        <layer xml:id="layer-L25F1N1" n="1">
         <note xml:id="note-L26F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L27F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L27F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L26F1" staff="1" tstamp="2.000000" accidupper="f" form="lower" />
      </measure>
      <measure xml:id="measure-L28" n="8">
       <staff xml:id="staff-L28F1N1" n="1">
        <layer xml:id="layer-L28F1N1" n="1">
         <note xml:id="note-L29F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L30F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L29F1" staff="1" startid="#note-L29F1" accidlower="f" form="lower" />
      </measure>
      <measure xml:id="measure-L31" n="9">
       <staff xml:id="staff-L31F1N1" n="1">
        <layer xml:id="layer-L31F1N1" n="1">
         <note xml:id="note-L32F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L33F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L32F1" staff="1" startid="#note-L32F1" form="lower" />
      </measure>
      <measure xml:id="measure-L34" n="10">
       <staff xml:id="staff-L34F1N1" n="1">
        <layer xml:id="layer-L34F1N1" n="1">
         <note xml:id="note-L35F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L36F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L36F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L35F1" staff="1" startid="#note-L35F1" accidupper="f" accidlower="f" form="lower" />
      </measure>
      <measure xml:id="measure-L37" right="dbl" n="11">
       <staff xml:id="staff-L37F1N1" n="1">
        <layer xml:id="layer-L37F1N1" n="1">
         <note xml:id="note-L38F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L39F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L39F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L38F1" staff="1" startid="#note-L38F1" accidupper="f" form="lower" />
      </measure>
      <measure xml:id="measure-L40" n="12">
       <staff xml:id="staff-L40F1N1" n="1">
        <layer xml:id="layer-L40F1N1" n="1">
         <note xml:id="note-L42F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L43F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L42F1" staff="1" tstamp="2.000000" accidlower="f" form="upper" />
       <dir xml:id="dir-L42F1" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="rend-0000001477345251" fontstyle="normal">inverted with intervals</rend>
       </dir>
      </measure>
      <measure xml:id="measure-L44" n="13">
       <staff xml:id="staff-L44F1N1" n="1">
        <layer xml:id="layer-L44F1N1" n="1">
         <note xml:id="note-L45F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L46F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L46F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L45F1" staff="1" tstamp="2.000000" accidupper="f" accidlower="f" form="upper" />
      </measure>
      <measure xml:id="measure-L47" n="14">
       <staff xml:id="staff-L47F1N1" n="1">
        <layer xml:id="layer-L47F1N1" n="1">
         <note xml:id="note-L48F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L49F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L48F1" staff="1" tstamp="2.000000" form="upper" />
      </measure>
      <measure xml:id="measure-L50" n="15">
       <staff xml:id="staff-L50F1N1" n="1">
        <layer xml:id="layer-L50F1N1" n="1">
         <note xml:id="note-L51F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L52F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L52F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L51F1" staff="1" tstamp="2.000000" accidupper="f" form="upper" />
      </measure>
      <measure xml:id="measure-L53" n="16">
       <staff xml:id="staff-L53F1N1" n="1">
        <layer xml:id="layer-L53F1N1" n="1">
         <note xml:id="note-L54F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L55F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L54F1" staff="1" startid="#note-L54F1" accidlower="f" form="upper" />
      </measure>
      <measure xml:id="measure-L56" n="17">
       <staff xml:id="staff-L56F1N1" n="1">
        <layer xml:id="layer-L56F1N1" n="1">
         <note xml:id="note-L57F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L58F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L58F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L57F1" staff="1" startid="#note-L57F1" accidupper="f" accidlower="f" form="upper" />
      </measure>
      <measure xml:id="measure-L59" n="18">
       <staff xml:id="staff-L59F1N1" n="1">
        <layer xml:id="layer-L59F1N1" n="1">
         <note xml:id="note-L60F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L61F1" dur="2" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <turn xml:id="turn-L60F1" staff="1" startid="#note-L60F1" form="upper" />
      </measure>
      <measure xml:id="measure-L62" right="end" n="19">
       <staff xml:id="staff-L62F1N1" n="1">
        <layer xml:id="layer-L62F1N1" n="1">
         <note xml:id="note-L63F1" dur="2" oct="5" pname="c" accid.ges="n" />
         <note xml:id="note-L64F1" dur="2" oct="5" pname="d">
          <accid xml:id="accid-L64F1" accid="n" func="caution" />
         </note>
        </layer>
       </staff>
       <turn xml:id="turn-L63F1" staff="1" startid="#note-L63F1" accidupper="f" form="upper" />
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>
craigsapp commented 4 years ago

Turn

Is therefore encoded as:

Screen Shot 2020-05-01 at 1 18 00 PM

Humdrum data:

**kern
4.ccS
8dd
2ee
=
4cc
4ddsS
2ee
=
*-

But preferably the turn intervals are also explicitly encoded. This will still have the same visual appearance in this case (but will otherwise cause accidentals above/below the turn if necessary):

Screen Shot 2020-05-01 at 1 19 24 PM
**kern
4.ccSSs
8dd
2ee
=
4cc
4ddsSSS
2ee
=
*-
davidrizo commented 4 years ago

Thanks !!

I think that delayed turns should also be encoded linked directly to notes rather than using turn@tstamp that's currently the only way to do it.

Do I add a request issue to MEI repository?