humdrum-tools / verovio-humdrum-viewer

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

Improve support for unicode markers in `cint` command #782

Open WolfgangDrescher opened 1 year ago

WolfgangDrescher commented 1 year ago

Related to a discussion in https://github.com/rism-digital/verovio/issues/2690.

It seems that currently it is only possible to use one unicode marker with the cint filter. It would be nice to get support for multiple unicode markers since following the docs there are not so many options to bind normal chars as markers: i, j, l, N, V, Z, @, @, +, |, <, and >.

In this example, all notes are colorized correctly:

Bildschirm­foto 2022-12-20 um 21 22 01

In this example, --search "6 2 6" and --search "3 -2 3" are both colorized with a new turquoise color:

Bildschirm­foto 2022-12-20 um 21 21 49

In this example, all cint filters are combined with a barely visible color.

Bildschirm­foto 2022-12-20 um 21 21 27
craigsapp commented 1 year ago

Can you post test data for the above images? Sometimes the highlighting of cint search results seems incorrect, so I should double check those. The turquoise color is probably cyan, which is caused by highlighting by green and blue (#00FFFF).

Readability of many colors is not great in any case. There are other possibilities to highlight notes.

Here is the CSS code for highlighting or editing notes in the VHV interface (outside of the verovio coloring of notes):

g[id^="clef-"]:hover,
g[id^="ksig-"]:hover,
g[id^="msig-"]:hover,
g[id^="note-"]:hover,
g[id^="hairpin-"]:hover,
g[id^="accid-"]:hover,
g[id^="trill-"]:hover,
g[id^="artic-"]:hover,
g[id^="slur-"]:hover,
g[id^="tie-"]:hover,
g[id^="slur-"]:hover,
g[id^="fermata-"]:hover,
g[id^="rest-"]:hover {
        fill: orange;
        stroke: orange;
        filter: url(#hover-shadow);
}

/* Highlight barlines:
g[id^="bline-"] path:hover
*/
g[id^="slur-"] path:hover
{
        stroke: orange;
}

The filter: url(#hover-shadow); is used to enhance the visibility of the highlighting (but is only used in the interface highlighting, not in the verovio-colord notes).

Here are the definitions of the hover (and highlight) shadows used in VHV:

https://github.com/humdrum-tools/verovio-humdrum-viewer/blob/gh-pages/_includes/svgdefs.html

<!-- filters used in styles/styles.css to control highlighting in SVG images -->

<svg height="0" style="position: absolute; top: -999999px" xmlns="http://www.w3.org/2000/svg">

 <filter id="highlight-shadow">
    <feGaussianBlur in="SourceAlpha" stdDeviation="10"/>
    <feOffset dx="0" dy="0" result="offsetblur"/>
    <feFlood flood-color="black"/>
    <feComposite in2="offsetblur" operator="in"/>
    <feMerge>
      <feMergeNode/>
      <feMergeNode in="SourceGraphic"/>
    </feMerge>
  </filter>

 <filter id="hover-shadow">
    <feGaussianBlur in="SourceAlpha" stdDeviation="10"/>
    <feOffset dx="0" dy="0" result="offsetblur"/>
    <feFlood flood-color="#D30"/>
    <feComposite in2="offsetblur" operator="in"/>
    <feMerge>
      <feMergeNode/>
      <feMergeNode in="SourceGraphic"/>
    </feMerge>
  </filter>

</svg>

Another possibility for making highlighting more visible would be to place boxes around the notes instead or in addition to highlighting them.

I have a demo system for doing this:

https://verovio.humdrum.org/?file=beethoven/sonatas/sonata08-3.krn#mh18

#mh18 means to open the score at measure 18 and highlight it.

Screen Shot 2022-12-26 at 10 53 57 PM

I insert a <g> element before content in the SVG image:

Screen Shot 2022-12-26 at 10 55 34 PM

into which user-generated highlighting boxes/lines/circles can be inserted.

Here is the Javascript class that handles this:

https://github.com/humdrum-tools/verovio-humdrum-viewer/blob/gh-pages/_includes/vhv-scripts/highlight.js

(I will eventually move it to Humdrum Notation Plugin so that it can be used there).

There is a variable in the VHV code called MARKUP: https://github.com/humdrum-tools/verovio-humdrum-viewer/blob/gh-pages/_includes/vhv-scripts/markup.js

That uses this class, and it processes the output from verovio whenever it is (re)generated on the webpage.

One idea is to link the color markings done in verovio SVGs into boxes (via javascript and this interface). The color could be remove from the note and moved to the box instead. The boxes could have opacity added to them so that overlapping boxes could both be seen.

The current interface can only highlight single measures, but could be expanded to highlighting ranges of notes in various ways (as well as adding lines to connect notes and draw circles/boxes around notes, etc.).

Here is an example of using the interface to manually highlight measures in VHV from the console:

Screen Shot 2022-12-26 at 11 16 33 PM
MARKUP.highlightMeasure({measure: 6, color: "limegreen", opacity: 0.5, padding: 0});
MARKUP.highlightMeasure({measure: 5, color: "hotpink", opacity: 0.5, padding: 1});
MARKUP.highlightMeasure({measure: 5, color: "blue", opacity: 0.5, padding: 0});

Notice that the purple color is caused by the opacity of the two boxes of pink and blue. The blue box could be made opaque to obscure the pink box:

Screen Shot 2022-12-26 at 11 19 49 PM
MARKUP.highlightMeasure({measure: 5, color: "hotpink", opacity: 0.5, padding: 1});
MARKUP.highlightMeasure({measure: 5, color: "skyblue", opacity: 1, padding: 0});
WolfgangDrescher commented 1 year ago

In this example, all notes are colorized correctly:

Collapse kern score ```tsv !!!COM: Lassus, Orlandus !!!CDT: 1532-1594/06/14 !!!OPR: Geistliche Psalmen mit dreyen Stimmen !!!ONM: 1 !!!OTL@@LA: Beatus vir !!!OTL-incipit@@DE: Selig zu preisen ist der mann !!!ONB: Starting notes of the Cantus part have been filled in by hand with an ink pen. !!!filter: cint -O --search "3 2 3" -N @ --color #FF0000 !!!filter: cint -O --search "6 2 6" -N N --color #00FF00 !!!filter: cint -O --search "3 -2 3" -N 😀 --color #0000FF **kern **text **kern **text **kern **text *staff3 *staff3 *staff2 *staff2 *staff1 *staff1 *Ivox * *Ivox * *Ivox * *I"Bassus * *I"Tenor * *I"Cantus * *I'B * *I'T * *I'C * *clefC3 * *clefC2 * *clefG2 * *k[] * *k[] * *k[] * *C:ion * *C:ion * *C:ion * *M2/1 * *M2/1 * *M2/1 * *met(C|) * *met(C|) * *met(C|) * *MM180 * *MM180 * *MM180 * =1 =1 =1 =1 =1 =1 *xywh-#127:141,59,2713,538 * *xywh-#71:112,89,2701,526 * *xywh-#11:125,74,2760,518 * 1r . 00r . 1dd Se- 1g Se- . . 2dd -lig . . . . 2dd zu =2 =2 =2 =2 =2 =2 2g -lig . . 1b prei- 2g zu . . . . 2e prei- . . 2cc -sen 2f -sen . . 2a ist =3 =3 =3 =3 =3 =3 !! cadence start 1e ist 0r . 2g der . . . . 2a . 1d der . . 4b . . . . . 4cc . . . . . 8b . . . . . 8a . . . . . 4b . =4 =4 =4 =4 =4 =4 ! ! !LO:TX:a:i:t=c.f. ! ! ! 1c mann/ 1g Se- 2ee mann/ !! cadence end; ultima=c * * * * * *ij . . . . 2ee se- 2r . 2g -lig 2dd -lig 1c ist 2g zu 2ee zu =5 =5 =5 =5 =5 =5 . . 2e prei- 2gg prei- 2.A der 2f -sen 2cc -sen * * * * *xywh-#11:117,579,2766,432 * . . 1e ist 2cc ist 4B . . . . . !! cadence start 2c . . . 4g der . . . . 4a . =6 =6 =6 =6 =6 =6 1G mann/ 1d der 4b . . . . . 4cc . . . . . 2b . 2r . 1c mann/ 2cc mann/ !! cadence end; ultima=c * * * * * *Xij 2e der . . 2g der =7 =7 =7 =7 =7 =7 *xywh-#127:136,516,2707,491 * * * * * 2e sich 0r . 2b sich 2a ent- . . 2cc ent- 4g -helt . . 2dd -helt 4f# . . . . . 1g . . . 2dd von =8 =8 =8 =8 =8 =8 . . 1c der 2ee den 2e von . . 2gg gott- 2.A den 2e sich 1cc -lo- . . 2f ent- . . 4A gott- . . . . =9 =9 =9 =9 =9 =9 2e -lo- 2g -helt 2b -sen 2c -sen/ 2g von 2ee von 2r . 2a den 2cc den 2G und 2g gott- 2b gott- =10 =10 =10 =10 =10 =10 * * *xywh-#71:102,593,2695,438 * * * !! cadence start 2A wan- 1f -lo- 2cc -lo- 2B -delt . . 2dd sen/ 1.c nicht 1e -sen/ 2r . !! cadence end; ultima=c . . . . 2g und =11 =11 =11 =11 =11 =11 * * * * *xywh-#11:117,988,2760,429 * . . 2r . 2a wan- 2B im 2d und 2b -delt 2A rath 2e wan- 1cc nicht 2a der 2f -delt . . =12 =12 =12 =12 =12 =12 2e bö- 2g nicht 2b im 2A -sen/ 2e im 1cc rath 2r . 2f rath . . 2c trit 2g der 2ee der =13 =13 =13 =13 =13 =13 *xywh-#127:119,949,2704,465 * * * * * 1f auch 1a bö- 2dd bö- . . . . 2cc -sen/ 1e nicht 1g -sen/ 2r . . . . . 2b trit =14 =14 =14 =14 =14 =14 2.c auf 2r . 1.ee auch . . 2g trit . . 4B . . . . . 4A . 1cc auch . . 4B . . . . . 4c . . . 2ee nit 4d . . . . . =15 =15 =15 =15 =15 =15 2e . 1b nicht 2gg auff 2g der . . 1dd der 2f sün- 2a auf . . !! cadence start 2e -der 2g der 2cc sün- =16 =16 =16 =16 =16 =16 1d ban/ 2g sün- 2b -der . . 2f# -der 2a ban/ 2r . 1g ban/ 2r . !! cadence end; ultima=g 2B noch . . 2dd noch =17 =17 =17 =17 =17 =17 * * *xywh-#71:108,1003,2678,435 * * * 1c sitzt 2r . 1ee sitzt . . 2g noch . . 2r . 2a sitzt 2cc bey 2f noch 2a bey 2.cc giff- =18 =18 =18 =18 =18 =18 2g sitzt 2e güff- . . . . . . 4b . 2f bey 2a -tig 4cc . . . . . 4dd . * * * * *xywh-#11:111,1388,2762,433 * 2.c güff- 2g bö- 4ee . . . . . 4ff . . . 2e -sen 2gg . 4c -tig . . . . =19 =19 =19 =19 =19 =19 !! cadence start 2A bö- 1f rot- 2cc -tig 2B -sen . . 2dd bö- *xywh-#127:119,1357,2739,474 * * * * * 2c rot- 0e -ten/ 4.g -sen !! cadence end; ultima=c . . . . 16a . . . . . 16b . 2A -ten/ . . 2cc . =20 =20 =20 =20 =20 =20 2r . . . 0b rot- 2g da . . . . 2e man 1r . . . 2d hon- . . . . =21 =21 =21 =21 =21 =21 1.c -schimpf- 2r . 1ee -ten/ . . 2g da . . . . 2e man 1gg da 2B -lich 2d hon- . . =22 =22 =22 =22 =22 =22 2.g weiß 2c -schimpf- 2ee man . . 2e -lich 2cc hon- 4g zu . . . . 2a spot- 2f weiß 1cc -schimpf- 2A -ten/ 2e zu . . =23 =23 =23 =23 =23 =23 2r . 1d spot- 2ff -lich 2f zu . . 2dd weiß/ 2g spot- 0c ten/ 2r . 2e -ten/ . . 2gg da =24 =24 =24 =24 =24 =24 2r . . . 2.ee man 2g da . . . . . . . . 4dd hon- 2.e man 2r . 2cc -schimpf- * * * *ij * * . . 2g da 2b -lich 4d hon- . . . . =25 =25 =25 =25 =25 =25 * * *xywh-#71:108,1403,2691,458 * *xywh-#11:121,1796,2746,459 * 2c -schimpf- 2e man 2.gg weiß 2B -lich 2d hon- . . . . . . 4ff . *xywh-#127:95,1773,2756,459 * * * * * 1g weiß 2c -schimpf- 4ee . . . . . 4dd . . . 2e -lich 4cc . . . . . 4b . =26 =26 =26 =26 =26 =26 !! cadence start a 1r . 2f weiß 4a . . . . . 4b . . . 2e zu 1cc . 1G zu 1d spot- . . . . . . 2b zu =27 =27 =27 =27 =27 =27 !! cadence start b 2.A spot- 2c ten/ 2.cc spot- !! cadence end a; ultima=c * * * *Xij * * . . 2e zu . . 4G . . . 4b . 1F . 4f spot- 1a . . . 4c . . . . . 2f . . . =28 =28 =28 =28 =28 =28 0cll ten. 0ell ten. 0gll ten. !! cadence end b; ultima=c == == == == == == *- *- *- *- *- *- !!!RDF**kern: l = terminal long !!!RDF**kern: i = editorial accidental !!!AGN: Psalm; Tricinium !!!LIB: Ulenberg, Caspar !!!LIB-CDT: 1548/12/24-1617/02/16 !!!YOR: https://mdz-nbn-resolving.de/details:bsb00075346 !!!YOR-alternative: https://mdz-nbn-resolving.de/details:bsb00072990 !!!YOO: München, Bayerische Staatsbibliothek !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=11 Cantus !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00072990?page=11 Cantus (without filled notes) !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=71 Tenor !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=127 Bassus !!!IIIF: https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00075346/manifest !!!EED: Wolfgang Drescher !!!END: 2022/02/17 !!!ENC: Wolfgang Drescher !!!EEV: 2022/12/19 !!!title: @{ONM}. @{OTL} / @{OTL-incipit@@DE} ```
Bildschirm­foto 2022-12-29 um 18 34 32

In this example, --search "6 2 6" and --search "3 -2 3" are both colorized with a new turquoise color:

Collapse kern score ```tsv !!!COM: Lassus, Orlandus !!!CDT: 1532-1594/06/14 !!!OPR: Geistliche Psalmen mit dreyen Stimmen !!!ONM: 1 !!!OTL@@LA: Beatus vir !!!OTL-incipit@@DE: Selig zu preisen ist der mann !!!ONB: Starting notes of the Cantus part have been filled in by hand with an ink pen. !!!filter: cint -O --search "3 2 3" -N @ --color #FF0000 !!!filter: cint -O --search "6 2 6" -N 😁 --color #00FF00 !!!filter: cint -O --search "3 -2 3" -N 😀 --color #0000FF **kern **text **kern **text **kern **text *staff3 *staff3 *staff2 *staff2 *staff1 *staff1 *Ivox * *Ivox * *Ivox * *I"Bassus * *I"Tenor * *I"Cantus * *I'B * *I'T * *I'C * *clefC3 * *clefC2 * *clefG2 * *k[] * *k[] * *k[] * *C:ion * *C:ion * *C:ion * *M2/1 * *M2/1 * *M2/1 * *met(C|) * *met(C|) * *met(C|) * *MM180 * *MM180 * *MM180 * =1 =1 =1 =1 =1 =1 *xywh-#127:141,59,2713,538 * *xywh-#71:112,89,2701,526 * *xywh-#11:125,74,2760,518 * 1r . 00r . 1dd Se- 1g Se- . . 2dd -lig . . . . 2dd zu =2 =2 =2 =2 =2 =2 2g -lig . . 1b prei- 2g zu . . . . 2e prei- . . 2cc -sen 2f -sen . . 2a ist =3 =3 =3 =3 =3 =3 !! cadence start 1e ist 0r . 2g der . . . . 2a . 1d der . . 4b . . . . . 4cc . . . . . 8b . . . . . 8a . . . . . 4b . =4 =4 =4 =4 =4 =4 ! ! !LO:TX:a:i:t=c.f. ! ! ! 1c mann/ 1g Se- 2ee mann/ !! cadence end; ultima=c * * * * * *ij . . . . 2ee se- 2r . 2g -lig 2dd -lig 1c ist 2g zu 2ee zu =5 =5 =5 =5 =5 =5 . . 2e prei- 2gg prei- 2.A der 2f -sen 2cc -sen * * * * *xywh-#11:117,579,2766,432 * . . 1e ist 2cc ist 4B . . . . . !! cadence start 2c . . . 4g der . . . . 4a . =6 =6 =6 =6 =6 =6 1G mann/ 1d der 4b . . . . . 4cc . . . . . 2b . 2r . 1c mann/ 2cc mann/ !! cadence end; ultima=c * * * * * *Xij 2e der . . 2g der =7 =7 =7 =7 =7 =7 *xywh-#127:136,516,2707,491 * * * * * 2e sich 0r . 2b sich 2a ent- . . 2cc ent- 4g -helt . . 2dd -helt 4f# . . . . . 1g . . . 2dd von =8 =8 =8 =8 =8 =8 . . 1c der 2ee den 2e von . . 2gg gott- 2.A den 2e sich 1cc -lo- . . 2f ent- . . 4A gott- . . . . =9 =9 =9 =9 =9 =9 2e -lo- 2g -helt 2b -sen 2c -sen/ 2g von 2ee von 2r . 2a den 2cc den 2G und 2g gott- 2b gott- =10 =10 =10 =10 =10 =10 * * *xywh-#71:102,593,2695,438 * * * !! cadence start 2A wan- 1f -lo- 2cc -lo- 2B -delt . . 2dd sen/ 1.c nicht 1e -sen/ 2r . !! cadence end; ultima=c . . . . 2g und =11 =11 =11 =11 =11 =11 * * * * *xywh-#11:117,988,2760,429 * . . 2r . 2a wan- 2B im 2d und 2b -delt 2A rath 2e wan- 1cc nicht 2a der 2f -delt . . =12 =12 =12 =12 =12 =12 2e bö- 2g nicht 2b im 2A -sen/ 2e im 1cc rath 2r . 2f rath . . 2c trit 2g der 2ee der =13 =13 =13 =13 =13 =13 *xywh-#127:119,949,2704,465 * * * * * 1f auch 1a bö- 2dd bö- . . . . 2cc -sen/ 1e nicht 1g -sen/ 2r . . . . . 2b trit =14 =14 =14 =14 =14 =14 2.c auf 2r . 1.ee auch . . 2g trit . . 4B . . . . . 4A . 1cc auch . . 4B . . . . . 4c . . . 2ee nit 4d . . . . . =15 =15 =15 =15 =15 =15 2e . 1b nicht 2gg auff 2g der . . 1dd der 2f sün- 2a auf . . !! cadence start 2e -der 2g der 2cc sün- =16 =16 =16 =16 =16 =16 1d ban/ 2g sün- 2b -der . . 2f# -der 2a ban/ 2r . 1g ban/ 2r . !! cadence end; ultima=g 2B noch . . 2dd noch =17 =17 =17 =17 =17 =17 * * *xywh-#71:108,1003,2678,435 * * * 1c sitzt 2r . 1ee sitzt . . 2g noch . . 2r . 2a sitzt 2cc bey 2f noch 2a bey 2.cc giff- =18 =18 =18 =18 =18 =18 2g sitzt 2e güff- . . . . . . 4b . 2f bey 2a -tig 4cc . . . . . 4dd . * * * * *xywh-#11:111,1388,2762,433 * 2.c güff- 2g bö- 4ee . . . . . 4ff . . . 2e -sen 2gg . 4c -tig . . . . =19 =19 =19 =19 =19 =19 !! cadence start 2A bö- 1f rot- 2cc -tig 2B -sen . . 2dd bö- *xywh-#127:119,1357,2739,474 * * * * * 2c rot- 0e -ten/ 4.g -sen !! cadence end; ultima=c . . . . 16a . . . . . 16b . 2A -ten/ . . 2cc . =20 =20 =20 =20 =20 =20 2r . . . 0b rot- 2g da . . . . 2e man 1r . . . 2d hon- . . . . =21 =21 =21 =21 =21 =21 1.c -schimpf- 2r . 1ee -ten/ . . 2g da . . . . 2e man 1gg da 2B -lich 2d hon- . . =22 =22 =22 =22 =22 =22 2.g weiß 2c -schimpf- 2ee man . . 2e -lich 2cc hon- 4g zu . . . . 2a spot- 2f weiß 1cc -schimpf- 2A -ten/ 2e zu . . =23 =23 =23 =23 =23 =23 2r . 1d spot- 2ff -lich 2f zu . . 2dd weiß/ 2g spot- 0c ten/ 2r . 2e -ten/ . . 2gg da =24 =24 =24 =24 =24 =24 2r . . . 2.ee man 2g da . . . . . . . . 4dd hon- 2.e man 2r . 2cc -schimpf- * * * *ij * * . . 2g da 2b -lich 4d hon- . . . . =25 =25 =25 =25 =25 =25 * * *xywh-#71:108,1403,2691,458 * *xywh-#11:121,1796,2746,459 * 2c -schimpf- 2e man 2.gg weiß 2B -lich 2d hon- . . . . . . 4ff . *xywh-#127:95,1773,2756,459 * * * * * 1g weiß 2c -schimpf- 4ee . . . . . 4dd . . . 2e -lich 4cc . . . . . 4b . =26 =26 =26 =26 =26 =26 !! cadence start a 1r . 2f weiß 4a . . . . . 4b . . . 2e zu 1cc . 1G zu 1d spot- . . . . . . 2b zu =27 =27 =27 =27 =27 =27 !! cadence start b 2.A spot- 2c ten/ 2.cc spot- !! cadence end a; ultima=c * * * *Xij * * . . 2e zu . . 4G . . . 4b . 1F . 4f spot- 1a . . . 4c . . . . . 2f . . . =28 =28 =28 =28 =28 =28 0cll ten. 0ell ten. 0gll ten. !! cadence end b; ultima=c == == == == == == *- *- *- *- *- *- !!!RDF**kern: l = terminal long !!!RDF**kern: i = editorial accidental !!!AGN: Psalm; Tricinium !!!LIB: Ulenberg, Caspar !!!LIB-CDT: 1548/12/24-1617/02/16 !!!YOR: https://mdz-nbn-resolving.de/details:bsb00075346 !!!YOR-alternative: https://mdz-nbn-resolving.de/details:bsb00072990 !!!YOO: München, Bayerische Staatsbibliothek !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=11 Cantus !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00072990?page=11 Cantus (without filled notes) !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=71 Tenor !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=127 Bassus !!!IIIF: https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00075346/manifest !!!EED: Wolfgang Drescher !!!END: 2022/02/17 !!!ENC: Wolfgang Drescher !!!EEV: 2022/12/19 !!!title: @{ONM}. @{OTL} / @{OTL-incipit@@DE} ```
Bildschirm­foto 2022-12-29 um 18 35 37

In this example, all cint filters are combined with a barely visible color.

Collapse kern score ```tsv !!!COM: Lassus, Orlandus !!!CDT: 1532-1594/06/14 !!!OPR: Geistliche Psalmen mit dreyen Stimmen !!!ONM: 1 !!!OTL@@LA: Beatus vir !!!OTL-incipit@@DE: Selig zu preisen ist der mann !!!ONB: Starting notes of the Cantus part have been filled in by hand with an ink pen. !!!filter: cint -O --search "3 2 3" -N 😂 --color #FF0000 !!!filter: cint -O --search "6 2 6" -N 😁 --color #00FF00 !!!filter: cint -O --search "3 -2 3" -N 😀 --color #0000FF **kern **text **kern **text **kern **text *staff3 *staff3 *staff2 *staff2 *staff1 *staff1 *Ivox * *Ivox * *Ivox * *I"Bassus * *I"Tenor * *I"Cantus * *I'B * *I'T * *I'C * *clefC3 * *clefC2 * *clefG2 * *k[] * *k[] * *k[] * *C:ion * *C:ion * *C:ion * *M2/1 * *M2/1 * *M2/1 * *met(C|) * *met(C|) * *met(C|) * *MM180 * *MM180 * *MM180 * =1 =1 =1 =1 =1 =1 *xywh-#127:141,59,2713,538 * *xywh-#71:112,89,2701,526 * *xywh-#11:125,74,2760,518 * 1r . 00r . 1dd Se- 1g Se- . . 2dd -lig . . . . 2dd zu =2 =2 =2 =2 =2 =2 2g -lig . . 1b prei- 2g zu . . . . 2e prei- . . 2cc -sen 2f -sen . . 2a ist =3 =3 =3 =3 =3 =3 !! cadence start 1e ist 0r . 2g der . . . . 2a . 1d der . . 4b . . . . . 4cc . . . . . 8b . . . . . 8a . . . . . 4b . =4 =4 =4 =4 =4 =4 ! ! !LO:TX:a:i:t=c.f. ! ! ! 1c mann/ 1g Se- 2ee mann/ !! cadence end; ultima=c * * * * * *ij . . . . 2ee se- 2r . 2g -lig 2dd -lig 1c ist 2g zu 2ee zu =5 =5 =5 =5 =5 =5 . . 2e prei- 2gg prei- 2.A der 2f -sen 2cc -sen * * * * *xywh-#11:117,579,2766,432 * . . 1e ist 2cc ist 4B . . . . . !! cadence start 2c . . . 4g der . . . . 4a . =6 =6 =6 =6 =6 =6 1G mann/ 1d der 4b . . . . . 4cc . . . . . 2b . 2r . 1c mann/ 2cc mann/ !! cadence end; ultima=c * * * * * *Xij 2e der . . 2g der =7 =7 =7 =7 =7 =7 *xywh-#127:136,516,2707,491 * * * * * 2e sich 0r . 2b sich 2a ent- . . 2cc ent- 4g -helt . . 2dd -helt 4f# . . . . . 1g . . . 2dd von =8 =8 =8 =8 =8 =8 . . 1c der 2ee den 2e von . . 2gg gott- 2.A den 2e sich 1cc -lo- . . 2f ent- . . 4A gott- . . . . =9 =9 =9 =9 =9 =9 2e -lo- 2g -helt 2b -sen 2c -sen/ 2g von 2ee von 2r . 2a den 2cc den 2G und 2g gott- 2b gott- =10 =10 =10 =10 =10 =10 * * *xywh-#71:102,593,2695,438 * * * !! cadence start 2A wan- 1f -lo- 2cc -lo- 2B -delt . . 2dd sen/ 1.c nicht 1e -sen/ 2r . !! cadence end; ultima=c . . . . 2g und =11 =11 =11 =11 =11 =11 * * * * *xywh-#11:117,988,2760,429 * . . 2r . 2a wan- 2B im 2d und 2b -delt 2A rath 2e wan- 1cc nicht 2a der 2f -delt . . =12 =12 =12 =12 =12 =12 2e bö- 2g nicht 2b im 2A -sen/ 2e im 1cc rath 2r . 2f rath . . 2c trit 2g der 2ee der =13 =13 =13 =13 =13 =13 *xywh-#127:119,949,2704,465 * * * * * 1f auch 1a bö- 2dd bö- . . . . 2cc -sen/ 1e nicht 1g -sen/ 2r . . . . . 2b trit =14 =14 =14 =14 =14 =14 2.c auf 2r . 1.ee auch . . 2g trit . . 4B . . . . . 4A . 1cc auch . . 4B . . . . . 4c . . . 2ee nit 4d . . . . . =15 =15 =15 =15 =15 =15 2e . 1b nicht 2gg auff 2g der . . 1dd der 2f sün- 2a auf . . !! cadence start 2e -der 2g der 2cc sün- =16 =16 =16 =16 =16 =16 1d ban/ 2g sün- 2b -der . . 2f# -der 2a ban/ 2r . 1g ban/ 2r . !! cadence end; ultima=g 2B noch . . 2dd noch =17 =17 =17 =17 =17 =17 * * *xywh-#71:108,1003,2678,435 * * * 1c sitzt 2r . 1ee sitzt . . 2g noch . . 2r . 2a sitzt 2cc bey 2f noch 2a bey 2.cc giff- =18 =18 =18 =18 =18 =18 2g sitzt 2e güff- . . . . . . 4b . 2f bey 2a -tig 4cc . . . . . 4dd . * * * * *xywh-#11:111,1388,2762,433 * 2.c güff- 2g bö- 4ee . . . . . 4ff . . . 2e -sen 2gg . 4c -tig . . . . =19 =19 =19 =19 =19 =19 !! cadence start 2A bö- 1f rot- 2cc -tig 2B -sen . . 2dd bö- *xywh-#127:119,1357,2739,474 * * * * * 2c rot- 0e -ten/ 4.g -sen !! cadence end; ultima=c . . . . 16a . . . . . 16b . 2A -ten/ . . 2cc . =20 =20 =20 =20 =20 =20 2r . . . 0b rot- 2g da . . . . 2e man 1r . . . 2d hon- . . . . =21 =21 =21 =21 =21 =21 1.c -schimpf- 2r . 1ee -ten/ . . 2g da . . . . 2e man 1gg da 2B -lich 2d hon- . . =22 =22 =22 =22 =22 =22 2.g weiß 2c -schimpf- 2ee man . . 2e -lich 2cc hon- 4g zu . . . . 2a spot- 2f weiß 1cc -schimpf- 2A -ten/ 2e zu . . =23 =23 =23 =23 =23 =23 2r . 1d spot- 2ff -lich 2f zu . . 2dd weiß/ 2g spot- 0c ten/ 2r . 2e -ten/ . . 2gg da =24 =24 =24 =24 =24 =24 2r . . . 2.ee man 2g da . . . . . . . . 4dd hon- 2.e man 2r . 2cc -schimpf- * * * *ij * * . . 2g da 2b -lich 4d hon- . . . . =25 =25 =25 =25 =25 =25 * * *xywh-#71:108,1403,2691,458 * *xywh-#11:121,1796,2746,459 * 2c -schimpf- 2e man 2.gg weiß 2B -lich 2d hon- . . . . . . 4ff . *xywh-#127:95,1773,2756,459 * * * * * 1g weiß 2c -schimpf- 4ee . . . . . 4dd . . . 2e -lich 4cc . . . . . 4b . =26 =26 =26 =26 =26 =26 !! cadence start a 1r . 2f weiß 4a . . . . . 4b . . . 2e zu 1cc . 1G zu 1d spot- . . . . . . 2b zu =27 =27 =27 =27 =27 =27 !! cadence start b 2.A spot- 2c ten/ 2.cc spot- !! cadence end a; ultima=c * * * *Xij * * . . 2e zu . . 4G . . . 4b . 1F . 4f spot- 1a . . . 4c . . . . . 2f . . . =28 =28 =28 =28 =28 =28 0cll ten. 0ell ten. 0gll ten. !! cadence end b; ultima=c == == == == == == *- *- *- *- *- *- !!!RDF**kern: l = terminal long !!!RDF**kern: i = editorial accidental !!!AGN: Psalm; Tricinium !!!LIB: Ulenberg, Caspar !!!LIB-CDT: 1548/12/24-1617/02/16 !!!YOR: https://mdz-nbn-resolving.de/details:bsb00075346 !!!YOR-alternative: https://mdz-nbn-resolving.de/details:bsb00072990 !!!YOO: München, Bayerische Staatsbibliothek !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=11 Cantus !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00072990?page=11 Cantus (without filled notes) !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=71 Tenor !!!URL-scan: https://www.digitale-sammlungen.de/de/view/bsb00075346?page=127 Bassus !!!IIIF: https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00075346/manifest !!!EED: Wolfgang Drescher !!!END: 2022/02/17 !!!ENC: Wolfgang Drescher !!!EEV: 2022/12/19 !!!title: @{ONM}. @{OTL} / @{OTL-incipit@@DE} ```
Bildschirm­foto 2022-12-29 um 18 36 24

Did you already commit something for this? It seems to be different now than one week ago. Now note head and stem have different colors. Compare the new screenshots with the ones from last week.

WolfgangDrescher commented 1 year ago

https://verovio.humdrum.org/?file=beethoven/sonatas/sonata08-3.krn#mh18

mh18 means to open the score at measure 18 and highlight it.

It is interesting doing this within the SVG itself. In another project I had an overlaying HTML element on top of the SVG with CSS class pointer-events: none and I just added <div>'s with absolute position and calculated width and height.

I will play around with this and see which methods works best for me.


Would it be possible to pass the mark symbol of a cint command as CSS class to the SVG output?

Currently <g> element of the note will only get marked as class name:

Bildschirm­foto 2022-12-29 um 19 01 59

It would be useful to have something like this:

<g id="note-L34F5" class="note marked mark-😂 qon-16 qoff-18 pname-g acc-n oct-4 b40c-25 b12c-7 " color="#3F3F7F" fill="#3F3F7F">

With this we could manually handle the note highlight with (in the case of VHV)

MARKUP.highlightMarkedNotes({symbol: '😂', color: "hotpink", opacity: 0.5, padding: 1});

Note that unicode chars will actually be valid CSS class names. I'm not sure about the at symbol though.

WolfgangDrescher commented 1 year ago

Ah, I missed https://github.com/humdrum-tools/verovio-humdrum-viewer/issues/783 before. Probably it is a similar issue that note heads of marked notes with cint are no longer highlighted in the same color as the stems.