humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Implemented altered qualifier in **mens #529

Open craigsapp opened 3 years ago

craigsapp commented 3 years ago

In **mens data, implement altered notes, which doubles the base duration of a mensural note (i.e., minim (half note), becomes equivalent in duration to a semi-breve (whole note) when it is altered.

@martha-thomae suggest using + on a note to indicate that it should be altered. This will in turn be converted to @dur.quality="altera" in the conversion to MEI data.

Also at the same time, convert i to note@dur.quality="imperfecta" and p to note@dur.quality="perfecta", which are both used to determine the performance (and alignment) duration of a note.

Currently in veorvio there are a few things that need to be done for perfect and imperfect notes (until modification in verovio):

@dur.quality is not in MEI 4. https://music-encoding.org/guidelines/v4/elements/note.html

But is in the development of MEI 5: https://music-encoding.org/guidelines/dev/elements/note.html#attributes_full

See: https://github.com/music-encoding/mensural-ig/issues/2

craigsapp commented 3 years ago

Implemented in commit https://github.com/humdrum-tools/verovio-humdrum-viewer/issues/529

Example:

**mens
*clefC3
*met(C)
Lc
Sd:p
sei
Sf+
*-

Converts to:

<?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-01-18T00:00:16" version="3.2.0-dev-219f1ca-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mdiv-0000002138818247">
    <score xml:id="score-0000000389510196">
     <scoreDef xml:id="scoredef-0000002024868783" midi.bpm="400">
      <staffGrp xml:id="staffgrp-0000000385504136">
       <staffDef xml:id="staffdef-0000001376646881" n="1" notationtype="mensural.white" lines="5">
        <clef xml:id="clef-L2F1" shape="C" line="3" />
        <mensur xml:id="mensur-L3F1" modusmaior="2" modusminor="2" prolatio="2" tempus="2" sign="C" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <staff xml:id="staff-0000000590572305" n="1">
       <layer xml:id="layer-L1F1N1" n="1">
        <note xml:id="note-L4F1" dur="longa" oct="4" pname="c" />
        <note xml:id="note-L5F1" type="appoggiatura-stop" dots="1" dur="brevis" dur.quality="perfecta" oct="4" pname="d" />
        <dot xml:id="dot-0000001285452635" />
        <note xml:id="note-L6F1" dur="semibrevis" dur.quality="imperfecta" oct="4" pname="e" />
        <note xml:id="note-L7F1" dur="brevis" dur.quality="altera" oct="4" pname="f" />
       </layer>
      </staff>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

The MEI version in the conversion is currently 4, but should be changed to 5.

Also to do: add documentation about altered note on the page http://doc.verovio.humdrum.org/humdrum/mens