Closed craigsapp closed 2 months ago
Implemented in issue https://github.com/rism-digital/verovio/commit/89fd4579c6308d10323052735d383ca1e168a593
Both @func
and @type
are given, with @func
being a more formalized attribute, and @type
being a user-specific element, which gets mapped to @class
in the SVG output from verovio.
Transcoded from Humdrum
Last accidental is not convered to this:
<note xml:id="note-L7F1" dur="1" oct="4" pname="c">
<accid xml:id="accid-L7F1" type="caution" accid="n" func="caution" />
</note>
Next implement CSS styling of cautionary accidentals in VHV.
Commit https://github.com/humdrum-tools/verovio-humdrum-viewer/commit/e5e5433bc0e893ad9a2bd28559ecfb5c635cc4a7 implements a keyboard shortcut for toggling cautionary accidental highlighting:
Cautionary accidentals are highlighted in hot pink.
Press alt-shift-X to toggle view of cautionary accidentals. (or option-shift-X on Macs).
Add X
as a URL styling option (for k
CGI parameter).
And of course add documentation on https://doc.verovio.humdrum.org
Add
X
as a URL styling option (fork
CGI parameter).
Done:
https://verovio.humdrum.org/?file=vivaldi/op01/vivaldi-op01n01m01.krn&k=X
(see pink flat in second measure)
When converting from Humdrum-to-MEI in verovio, accidentals are automatically identified as cautionary. They are labeled with
accid@func="caution"
. However this is not transferred to the final SVG image, so they cannot be highlighted in VHV in a manner similar to the option/alt-l (lowercase "L") for layer numbers.Add
@type="caution"
in addition to@func="caution"
when converting to MEI, which allows further pass-through to SVG as@class="caution"
which can then be contrlled with CSS styling to highlight cautionary accidentals.Related to issue https://github.com/bel28kent/Mysterium/issues/27
Example:
The first accidental is required to be visible, but the other two are identified as cautionary.
Click to view MEI conversion of above Humdrum data.
```Transcoded from Humdrum
First accidental is not special, so encoded simply:
Second accidental:
Third accidental (natural):
Change to add
@type
:@func
is not used for anything, so possibly remove it (and add back again if there is a use for it in MEI/verovio):