craigsapp / humlib

Humdrum data parsing library in C++
http://humlib.humdrum.org
BSD 2-Clause "Simplified" License
31 stars 8 forks source link

Melisma #36

Closed mkonik closed 4 years ago

mkonik commented 4 years ago

When in a vocal piece there are two verses on first section and only one in second, melisma marks everything in second section.

Zrzut ekranu z 2020-03-15 19-04-44

!!!Xfilter: extract -s 10-12 | melisma
!!!COM: Anonymous
!!!OTL@@POL: Wszyscy mieszkańcy domu niebieskiego
**kern  **text  **text
*staff1 *staff1 *staff1
*I"Canto I  *   *
=1- =1- =1-
*clefG2 *   *
*k[]    *   *
*met(c|)    *   *
*M2/2   *   *
1ee Wszy-   Lej-
=2  =2  =2
2gg\    -scy    -cie
2ee\    miesz-  łzy
=3  =3  =3
4ff\@@  -kań-   gorz-
4ee\@@  .   .
2dd\@@  .   .
=4  =4  =4
1cc -cy -kie
=5  =5  =5
1gg do- płacz-
=6  =6  =6
1ee -mu -cie
=7  =7  =7
2ff#\   nie-    Kró-
2gg\    -bie-   -la
=8  =8  =8
1aa -skie-  swe-
.   .   .
.   .   .
.   .   .
=9  =9  =9
1gg#@   -go.    -go.
=10:|!  =10:|!  =10:|!
1aa@    Dziś    .
=11 =11 =11
2ff#\@  na  .
2ff#\@  po- .
=12 =12 =12
1gg@    -wie-   .
=13 =13 =13
1gg@    -trzu   .
=14 =14 =14
2gg\@   wi- .
2gg\@   -si .
=15 =15 =15
2ff\@   pod-    .
2ff\@   -nie-   .
.   .   .
=16 =16 =16
2.ee\@@ -sio-   .
4dd\@@  .   .
=17 =17 =17
1cc@    -ny .
=18 =18 =18
1ee@    Jam .
=19 =19 =19
4ff\@@  Bóg  .
4gg\@@  .   .
2aa\@   wcie-   .
=20 =20 =20
1gg#i@  -lo-    .
=21 =21 =21
1aa@    -ny.    .
==  ==  ==
*-  *-  *-
!!!RDF**kern: @ = marked note (melisma)
craigsapp commented 4 years ago

It is complicated to figure out how to identify the difference between a very long melisma and the case where the text terminates. I have an undocumented system for terminating underscores in text for JRP that I have also implemented for the melisma tool: Add a & at the end of the syllable at the end of a verse (or place the & at then end of the melisma at the end of the last syllable of a verse).

Here is an example with an update to melisma (line 35):

Screen Shot 2020-03-15 at 16 54 20

Also note that underscores to indicate melismas on the last notes of words currently needs to be explicitly encoded, but should be made automatic and/or add a style option to allow for automatic underscores or automatic no underscores:

Notice line 60 underscore in this example:

Screen Shot 2020-03-15 at 16 58 58

An alternative method is to merge the **text spines after the repeat:

Screen Shot 2020-03-15 at 17 03 48

But this would probably mean that the data has to be edited to be like this after import from MusicXML.