Closed bel28kent closed 1 year ago
I am not aware of MEI allowing key signature changes in the middle of measures (is that right @rettinghaus and/or @lpugin)? There is a current fix which is to insert an invisible barline just before the key signature:
View in VHV
There is a keyboard shortcut in VHV to view the spine/layer/voice information: alt-l (lowercase L) will show the first subspine as black, the second as green, the third as purple, and so on:
View in VHV
Preferably the first subspine will be left-most (black) and the second one will be to the right after that. This is opposite of the preferred order for spines. To switch to the preferred order, you can use the flipper flilter:
Specifically, now the tie directions are correct (otherwise you need to manually specify the direction of every tie). If the entire score has reversed subspines, then flipper -a
can be used; otherwise, you can mark in the score the subspines to flip before running the filter.
Here is the data after the flipper filter:
The stem directions remain correct because you add to every note. This is good, particularly if you want to encode a diplomatic score. In my encodings of piano music I typically remove all stem directions and allow them to be inferred by their subspine positions. Verovio will render the first subspine/layer with stems up, the second with stems down, the third with stems up, the fourth with stems down and so on. Then I only encode the exceptions. Here is the data without stem directions which is less cluttered and easier to read (using autostem -r
to remove stems):
In the future I will implement a system where a double stem marker such as //
and \\
mark an exception to the default layout direction so that when stems are removed from a score, the double stemmed ones will not be removed (that should be easy to implement, so I should do it sooner rather than later).
Here is what the data looks like after removing the stems before and after running flipper
:
Before:
After:
The Chopin Institute encodes diplomatic scores will all stem directions: https://github.com/pl-wnifc/humdrum-polish-scores
I encode with only the exceptions in stem directions: https://github.com/craigsapp/mozart-piano-sonatas/tree/master/kern
It does not make sense to me for subspines to be ordered this way. I raised this issue in a post to the humlib repo; this sentence is a link to that issue. Putting the upper voice in the leftmost column seems to contradict the kern logic as I learned it. My understanding of the kern encoding is that it corresponds to the notated score turned 90 degrees to the right. So if the lowest staves are to the left of the file in spine order, then lower voices (i.e., down-stemmed voices) should be to the left in subspine order. Can you explain the motivation or reasoning for putting subspines in the opposite order of spines?
@craigsapp MEI allows mid-measure key changes, but support in Verovio is limited.
<staff n="1">
<layer n="1">
<note />
<note />
<note />
<keySig />
<note />
<note />
<note />
</layer>
</staff>
Thanks @rettinghaus, I see that it is basically working, but refinements in spacing and dealing with key changes to C major/A minor needs implementing (as well as keySig@cancelaccid
for in-layer keySig).
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0.0-dev">
<meiHead>
<fileDesc>
<titleStmt>
<title />
</titleStmt>
<pubStmt />
</fileDesc>
<encodingDesc>
<appInfo>
<application isodate="2023-08-16T12:35:52" version="3.17.0-dev-ffd96fd">
<name>Verovio</name>
<p>Transcoded from Humdrum</p>
</application>
</appInfo>
</encodingDesc>
<workList>
<work>
<title />
</work>
</workList>
</meiHead>
<music>
<body>
<mdiv xml:id="m1lukk1m">
<score xml:id="s1w0w01t">
<scoreDef xml:id="s99xtmz">
<staffGrp xml:id="s1jfj3ny">
<staffDef xml:id="staffdef-L1F1" n="1" lines="5">
<clef xml:id="cwcsq9" shape="G" line="2" />
<keySig xml:id="keysig-L3F1" sig="2s" />
<meterSig xml:id="metersig-L2F1" count="4" unit="4" />
</staffDef>
</staffGrp>
</scoreDef>
<section xml:id="section-L1F1">
<measure xml:id="measure-L1" n="1">
<staff xml:id="staff-L1F1" n="1">
<layer xml:id="layer-L1F1N1" n="1">
<note xml:id="note-L6F1" dur="2" oct="4" pname="e" accid.ges="n" />
<keySig xml:id="keysig-L8F1" sig="3f" cancelaccid="before" />
<note xml:id="note-L9F1" dur="2" oct="4" pname="f" accid="n" />
</layer>
</staff>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>
Mid measure key signatures are implemented in commit https://github.com/rism-digital/verovio/commit/fdf041393f016d6d2430e3b20f0076df559ea041
Example:
**kern
*M4/4
*k[f#]
=1
1c
=2
2d
*k[b-]
2e
=
*-
Rendering:
Transcoded from Humdrum
Note that when the mid-measure key signature changes to C major/A minor, the cancellation naturals are not shown yet:
**kern
*M4/4
*k[f#]
=1
1c
=2
2d
*k[]
2e
=
*-
Rendering:
Transcoded from Humdrum
This is related to issue https://github.com/rism-digital/verovio/issues/3497#issue-1853010843
To make visible in the meantime, add an invisible barline as mentioned above.
This mid-measure key signature does not render in VHV. I cannot find documentation or a previous issue addressing this.
VHV Link
Here is the reference score: