humdrum-tools / verovio-humdrum-viewer

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

triplets encoded as tremolo #426

Open jacekiwaszko1 opened 4 years ago

jacekiwaszko1 commented 4 years ago

In the example below dotted quarters with tremolo abbreviations should probably be interpreted as triplets:

tremolo-triplets1

In encoding each dotted tremolo quarter note should be encoded as triplet I guess:

**kern  **kern
*clefF4 *clefG2
*k[b-e-a-]  *k[b-e-a-]
*M3/4   *M3/4
=-  =-
*tremolo    *
4G 4GG  4g 4d 4B
*Xtuplet    *
12E- 12EE-L 4r
12E- 12EE-  .
12E- 12EE-J .
12E- 12EE-L 4r
12E- 12EE-  .
12E- 12EE-J .
=   =
12E- 12EE-L 4r
12E- 12EE-  .
12E- 12EE-J .
12E- 12EE-L 4b- 4g
12E- 12EE-  .
12E- 12EE-J .
8E- 8EE-L   4b- 4g
8E- 8EE-J   .
=   =
*-  *-

The problem is there's no way to render dotted quarter in Verovio:

tremolo-triplets2

Current MEI conversion:

<?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-09-24T13:49:54" version="3.0.0-dev-e92ab03-dirty">
               <name>Verovio</name>
               <p>Transcoded from Humdrum</p>
            </application>
         </appInfo>
      </encodingDesc>
      <workList>
         <work>
            <title />
         </work>
      </workList>
   </meiHead>
   <music>
      <body>
         <mdiv xml:id="mdiv-0000000662002813">
            <score xml:id="score-0000000164499710">
               <scoreDef xml:id="scoredef-0000001645313985">
                  <staffGrp xml:id="staffgrp-0000000302011162" symbol="brace" bar.thru="true">
                     <staffDef xml:id="staffdef-0000001702679542" n="1" lines="5">
                        <clef xml:id="clef-L2F2" shape="G" line="2" />
                        <keySig xml:id="keysig-L3F2" sig="3f" />
                        <meterSig xml:id="metersig-L4F2" count="3" unit="4" />
                     </staffDef>
                     <staffDef xml:id="staffdef-0000000720862486" n="2" lines="5">
                        <clef xml:id="clef-L2F1" shape="F" line="4" />
                        <keySig xml:id="keysig-L3F1" sig="3f" />
                        <meterSig xml:id="metersig-L4F1" count="3" unit="4" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section xml:id="section-L1F1">
                  <measure xml:id="measure-L1">
                     <staff xml:id="staff-0000001295756599" n="1">
                        <layer xml:id="layer-L1F2N1" n="1">
                           <chord xml:id="chord-L7F2" dur="4">
                              <note xml:id="note-L7F2S1" oct="4" pname="g" accid.ges="n" />
                              <note xml:id="note-L7F2S2" oct="4" pname="d" accid.ges="n" />
                              <note xml:id="note-L7F2S3" oct="3" pname="b" accid="n" />
                           </chord>
                           <rest xml:id="rest-L9F2" dur="4" />
                           <rest xml:id="rest-L12F2" dur="4" />
                        </layer>
                     </staff>
                     <staff xml:id="staff-0000000250517451" n="2">
                        <layer xml:id="layer-L1F1N1" n="1">
                           <chord xml:id="chord-L7F1" dur="4">
                              <note xml:id="note-L7F1S1" oct="3" pname="g" accid.ges="n" />
                              <note xml:id="note-L7F1S2" oct="2" pname="g" accid.ges="n" />
                           </chord>
                           <bTrem xml:id="btrem-L9F1-L11F1" unitdur="8">
                              <chord xml:id="chord-L9F1" dur="4">
                                 <note xml:id="note-L9F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L9F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                           <bTrem xml:id="btrem-L12F1-L14F1" unitdur="8">
                              <chord xml:id="chord-L12F1" dur="4">
                                 <note xml:id="note-L12F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L12F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="measure-L15">
                     <staff xml:id="staff-L15F2N1" n="1">
                        <layer xml:id="layer-L15F2N1" n="1">
                           <rest xml:id="rest-L16F2" dur="4" />
                           <chord xml:id="chord-L19F2" dur="4">
                              <note xml:id="note-L19F2S1" oct="4" pname="b" accid.ges="f" />
                              <note xml:id="note-L19F2S2" oct="4" pname="g" accid.ges="n" />
                           </chord>
                           <chord xml:id="chord-L22F2" dur="4">
                              <note xml:id="note-L22F2S1" oct="4" pname="b" accid.ges="f" />
                              <note xml:id="note-L22F2S2" oct="4" pname="g" accid.ges="n" />
                           </chord>
                        </layer>
                     </staff>
                     <staff xml:id="staff-L15F1N1" n="2">
                        <layer xml:id="layer-L15F1N1" n="1">
                           <bTrem xml:id="btrem-L16F1-L18F1" unitdur="8">
                              <chord xml:id="chord-L16F1" dur="4">
                                 <note xml:id="note-L16F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L16F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                           <bTrem xml:id="btrem-L19F1-L21F1" unitdur="8">
                              <chord xml:id="chord-L19F1" dur="4">
                                 <note xml:id="note-L19F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L19F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                           <bTrem xml:id="btrem-L22F1-L23F1" unitdur="8">
                              <chord xml:id="chord-L22F1" dur="4">
                                 <note xml:id="note-L22F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L22F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

I've tried !LO:N:vis=4., but it doesn't work...

I guess a good solution would be to add @dots="1" and @dots.ges="0" in MEI encoding to each tremolo note in this case:

<?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-09-24T13:51:47" version="3.0.0-dev-e92ab03-dirty">
               <name>Verovio</name>
               <p>Transcoded from Humdrum</p>
            </application>
         </appInfo>
      </encodingDesc>
      <workList>
         <work>
            <title />
         </work>
      </workList>
   </meiHead>
   <music>
      <body>
         <mdiv xml:id="mdiv-0000002045570609">
            <score xml:id="score-0000001638658974">
               <scoreDef xml:id="scoredef-0000000509687354">
                  <staffGrp xml:id="staffgrp-0000002117420459" symbol="brace" bar.thru="true">
                     <staffDef xml:id="staffdef-0000001380124027" n="1" lines="5">
                        <clef xml:id="clef-L2F2" shape="G" line="2" />
                        <keySig xml:id="keysig-L3F2" sig="3f" />
                        <meterSig xml:id="metersig-L4F2" count="3" unit="4" />
                     </staffDef>
                     <staffDef xml:id="staffdef-0000002145286624" n="2" lines="5">
                        <clef xml:id="clef-L2F1" shape="F" line="4" />
                        <keySig xml:id="keysig-L3F1" sig="3f" />
                        <meterSig xml:id="metersig-L4F1" count="3" unit="4" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section xml:id="section-L1F1">
                  <measure xml:id="measure-L1">
                     <staff xml:id="staff-0000000258136542" n="1">
                        <layer xml:id="layer-L1F2N1" n="1">
                           <chord xml:id="chord-L7F2" dur="4">
                              <note xml:id="note-L7F2S1" oct="4" pname="g" accid.ges="n" />
                              <note xml:id="note-L7F2S2" oct="4" pname="d" accid.ges="n" />
                              <note xml:id="note-L7F2S3" oct="3" pname="b" accid="n" />
                           </chord>
                           <rest xml:id="rest-L9F2" dur="4" />
                           <rest xml:id="rest-L12F2" dur="4" />
                        </layer>
                     </staff>
                     <staff xml:id="staff-0000000573650779" n="2">
                        <layer xml:id="layer-L1F1N1" n="1">
                           <chord xml:id="chord-L7F1" dur="4">
                              <note xml:id="note-L7F1S1" oct="3" pname="g" accid.ges="n" />
                              <note xml:id="note-L7F1S2" oct="2" pname="g" accid.ges="n" />
                           </chord>
                           <bTrem xml:id="btrem-L9F1-L11F1" unitdur="8">
                              <chord xml:id="chord-L9F1" dur="4" dots="1" dots.ges="0">
                                 <note xml:id="note-L9F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L9F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                           <bTrem xml:id="btrem-L12F1-L14F1" unitdur="8">
                              <chord xml:id="chord-L12F1" dur="4" dots="1" dots.ges="0">
                                 <note xml:id="note-L12F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L12F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                        </layer>
                     </staff>
                  </measure>
                  <measure xml:id="measure-L15">
                     <staff xml:id="staff-L15F2N1" n="1">
                        <layer xml:id="layer-L15F2N1" n="1">
                           <rest xml:id="rest-L16F2" dur="4" />
                           <chord xml:id="chord-L19F2" dur="4">
                              <note xml:id="note-L19F2S1" oct="4" pname="b" accid.ges="f" />
                              <note xml:id="note-L19F2S2" oct="4" pname="g" accid.ges="n" />
                           </chord>
                           <chord xml:id="chord-L22F2" dur="4">
                              <note xml:id="note-L22F2S1" oct="4" pname="b" accid.ges="f" />
                              <note xml:id="note-L22F2S2" oct="4" pname="g" accid.ges="n" />
                           </chord>
                        </layer>
                     </staff>
                     <staff xml:id="staff-L15F1N1" n="2">
                        <layer xml:id="layer-L15F1N1" n="1">
                           <bTrem xml:id="btrem-L16F1-L18F1" unitdur="8">
                              <chord xml:id="chord-L16F1" dur="4" dots="1" dots.ges="0">
                                 <note xml:id="note-L16F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L16F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                           <bTrem xml:id="btrem-L19F1-L21F1" unitdur="8">
                              <chord xml:id="chord-L19F1" dur="4" dots="1" dots.ges="0">
                                 <note xml:id="note-L19F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L19F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                           <bTrem xml:id="btrem-L22F1-L23F1" unitdur="8">
                              <chord xml:id="chord-L22F1" dur="4">
                                 <note xml:id="note-L22F1S1" oct="3" pname="e" accid.ges="f" />
                                 <note xml:id="note-L22F1S2" oct="2" pname="e" accid.ges="f" />
                              </chord>
                           </bTrem>
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

tremolo-triplets3

The question is how to encode that in Humdrum - I don't think this is the most common style of notating tremolo triplets - I saw three tremolo dots above the note and I think there would be more examples of this encoding, so making it a default behavior might not be the best idea.

(BTW, tremolo dots mentioned here: #285(comment))

I can think of one possible encoding, mentioned in #306 - a visual change of tremolo note. Maybe !LO:N:TREM:vis=4. would be a good solution after all? What do you think?

craigsapp commented 4 years ago

I can think of one possible encoding, mentioned in #306 - a visual change of tremolo note. Maybe !LO:N:TREM:vis=4. would be a good solution after all? What do you think?

That would be good, but I think even better is to have triplet eighth-note tremolos add a dot automatically in such cases, so I will work on that.

craigsapp commented 4 years ago

See pull request https://github.com/rism-ch/verovio/pull/1712 for triplet tremolos (which is related to this issue, although no tuplet numbers are included in this example).