Open axgeertinger opened 1 month ago
"The lower dot should be omitted." Do you mean according to certain guidelines?
In Behind Bars by Elaine Gould, page 58-59, unisons in different layers are preferred to have a single augmentation dot (in modern styles):
However if there are no stems on the notes, the double dots are required:
@axgeertinger which version are you using? Looking at the test suite this is already working for some time.
@rettinghaus That is peculiar. I didn't see the test suite example as I was looking for it in the "dot" section, not "unison"... I am using version 4.1.0 and testing in 4.2.0 as well, but I am having the same issue in the online verovio editor. So, is it something in my encoding? Here is a screenshot:
And here my MEI file (bar 11 only):
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
<meiHead xml:id="moakt96">
<fileDesc xml:id="f12ouey2">
<titleStmt xml:id="t160d0ks">
<title>Aftensang</title>
</titleStmt>
</fileDesc>
</meiHead>
<music>
<body>
<mdiv xml:id="m49j6zm">
<score xml:id="s13iq279">
<scoreDef xml:id="s1lzepi8">
<staffGrp xml:id="su2mfk9">
<staffGrp xml:id="s1ufjl2c">
<grpSym xml:id="glqhrx4" symbol="bracket"/>
<staffDef xml:id="P1" n="1" lines="5" ppq="2">
<clef xml:id="c1cjsqit" shape="G" line="2"/>
<keySig xml:id="k17lf8pi" sig="2s"/>
<meterSig xml:id="mtnktsg" count="4" sym="common" unit="4"/>
</staffDef>
<staffDef xml:id="P2" n="2" lines="5" ppq="2">
<clef xml:id="cq2i1pi" shape="F" line="4"/>
<keySig xml:id="k12off3m" sig="2s"/>
<meterSig xml:id="m10nk5cx" count="4" sym="common" unit="4"/>
</staffDef>
</staffGrp>
</staffGrp>
</scoreDef>
<section xml:id="s1et4tnk">
<pb xml:id="p9abi3r"/>
<measure xml:id="mdhsxr1" n="11">
<staff xml:id="s1y1wo7j" n="1">
<layer xml:id="lkgngov" n="1">
<note xml:id="ncuuggu" dots="1" dur.ppq="3" dur="4" oct="4" pname="f" stem.dir="up" accid.ges="s">
<verse xml:id="vrpe4f6" n="1">
<syl xml:id="s1uyp1sw" con="d" wordpos="i">Stjer</syl>
</verse>
<verse xml:id="vh4572l" n="2">
<syl xml:id="s1aa13q1" con="d" wordpos="i">Flygt</syl>
</verse>
<verse xml:id="vk22rpz" n="3">
<syl xml:id="s1l3asrd" con="d" wordpos="m">skil</syl>
</verse>
</note>
<note xml:id="n2kit0d" dur.ppq="1" dur="8" oct="4" pname="f" stem.dir="up" accid.ges="s">
<verse xml:id="vu640pm" n="1">
<syl xml:id="sa3stcn" con="s" wordpos="t">ne</syl>
</verse>
<verse xml:id="vpahf2" n="2">
<syl xml:id="s29v3o3" con="s" wordpos="t">ning</syl>
</verse>
<verse xml:id="v1bsqcap" n="3">
<syl xml:id="sbf2zlg" con="s" wordpos="t">les</syl>
</verse>
</note>
<note xml:id="nir3syb" dur.ppq="2" dur="4" oct="4" pname="e" stem.dir="up">
<verse xml:id="vjf52n7" n="1">
<syl xml:id="s2d7eno" con="d" wordpos="i">Stjer</syl>
</verse>
<verse xml:id="v1uzqwhd" n="2">
<syl xml:id="skg0exf" con="s" wordpos="s">som</syl>
</verse>
<verse xml:id="v1ah0x66" n="3">
<syl xml:id="s1pw5uyf" con="s" wordpos="s">end</syl>
</verse>
</note>
<note xml:id="nuzzcpp" dur.ppq="2" dur="4" oct="4" pname="e" stem.dir="up">
<verse xml:id="vd0npy8" n="1">
<syl xml:id="sdvdqn" con="s" wordpos="t">ne</syl>
</verse>
<verse xml:id="v1qk7u9c" n="2">
<syl xml:id="s1kl43yw" con="s" wordpos="s">der</syl>
</verse>
<verse xml:id="v1ra57jd" n="3">
<syl xml:id="soa2e5k" con="s" wordpos="s">vort</syl>
</verse>
</note>
</layer>
<layer xml:id="l1r2kf4l" n="2">
<note xml:id="n1u5nav1" dots="1" dur.ppq="3" dur="4" oct="4" pname="d" stem.dir="down"/>
<note xml:id="no0ucjy" dur.ppq="1" dur="8" oct="4" pname="d" stem.dir="down"/>
<note xml:id="n49gzox" dur.ppq="2" dur="4" oct="4" pname="d" stem.dir="down"/>
<note xml:id="n9391aj" dur.ppq="2" dur="4" oct="4" pname="c" stem.dir="down" accid.ges="s"/>
</layer>
</staff>
<staff xml:id="s1xiccjh" n="2">
<layer xml:id="l16v2d50" n="1">
<note xml:id="n1o4uzgj" dots="1" dur.ppq="3" dur="4" oct="3" pname="a" stem.dir="up"/>
<note xml:id="n1wj4dpg" dur.ppq="1" dur="8" oct="3" pname="a" stem.dir="up"/>
<note xml:id="n155ttfj" dur.ppq="2" dur="4" oct="3" pname="g" stem.dir="up"/>
<note xml:id="n12rqd79" dur.ppq="2" dur="4" oct="3" pname="g" stem.dir="up"/>
</layer>
<layer xml:id="lo70lob" n="2">
<note xml:id="nsp94nv" dots="1" dur.ppq="3" dur="4" oct="3" pname="a" stem.dir="down"/>
<note xml:id="n44qb4r" dur.ppq="1" dur="8" oct="3" pname="a" stem.dir="down"/>
<note xml:id="nqesh7j" dur.ppq="2" dur="4" oct="2" pname="a" stem.dir="down"/>
<note xml:id="n9i7nzp" dur.ppq="2" dur="4" oct="2" pname="a" stem.dir="down"/>
</layer>
</staff>
<hairpin xml:id="h1k1gl43" staff="1" tstamp="1" tstamp2="0m+4" form="dim" place="above" vgrp="4000"/>
<hairpin xml:id="h1udjad4" staff="2" tstamp="1" tstamp2="0m+4" form="dim" place="above" vgrp="5000"/>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>
@axgeertinger I finally figured it out! You're encoding is just fine, but apparently you are not allowed to use it on the second staff! 🥴 So it is implemented, but weirdly only works for the first staff.
<?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>Unisons in multiple staves</title>
</titleStmt>
<pubStmt>
<respStmt>
<persName role="encoder">Klaus Rettinghaus</persName>
</respStmt>
<date isodate="2024-07-03">03 Jul 2024</date>
<pubPlace>
<ref target="https://github.com/rism-digital/verovio/issues/655" />
</pubPlace>
</pubStmt>
</fileDesc>
</meiHead>
<music>
<body>
<mdiv>
<score>
<scoreDef>
<staffGrp>
<staffDef n="1" lines="5" clef.shape="G" clef.line="2" />
<staffDef n="2" lines="5" clef.shape="C" clef.line="3" />
<staffDef n="3" lines="5" clef.shape="F" clef.line="4" />
</staffGrp>
</scoreDef>
<section>
<measure>
<staff n="1">
<layer n="1">
<note dots="1" dur="2" oct="4" pname="g" />
</layer>
<layer n="2">
<note dots="1" dur="2" oct="4" pname="g" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dots="1" dur="2" oct="4" pname="c" />
</layer>
<layer n="2">
<note dots="1" dur="2" oct="4" pname="c" />
</layer>
</staff>
<staff n="3">
<layer n="1">
<note dots="1" dur="2" oct="3" pname="f" />
</layer>
<layer n="2">
<note dots="1" dur="2" oct="3" pname="f" />
</layer>
</staff>
</measure>
<measure>
<staff n="1">
<layer n="1">
<note dots="1" dur="4" oct="4" pname="g" />
</layer>
<layer n="2">
<note dots="1" dur="4" oct="4" pname="g" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dots="1" dur="4" oct="4" pname="c" />
</layer>
<layer n="2">
<note dots="1" dur="4" oct="4" pname="c" />
</layer>
</staff>
<staff n="3">
<layer n="1">
<note dots="1" dur="4" oct="3" pname="f" />
</layer>
<layer n="2">
<note dots="1" dur="4" oct="3" pname="f" />
</layer>
</staff>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>
I finally figured it out! You're encoding is just fine, but apparently you are not allowed to use it on the second staff! 🥴 So it is implemented, but weirdly only works for the first staff.
Good work! I was trying to figure out the strange situation as well.
OK, I did some testing. It seems the upper staff is affecting the lower in some unintended way: If any note in the upper staff coincides with the dotted unison in the lower staff, two dots are shown instead of one. The encoding below renders like this in the editor:
<?xml version="1.0" encoding="UTF-8"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
<meiHead>
<fileDesc>
<titleStmt>
<title>Dot test</title>
</titleStmt>
</fileDesc>
</meiHead>
<music>
<body>
<mdiv>
<score>
<scoreDef>
<staffGrp>
<staffGrp>
<staffGrp>
<grpSym symbol="bracket" />
<staffDef n="1" lines="5" ppq="2">
<clef shape="G" line="2" />
</staffDef>
<staffDef n="2" lines="5" ppq="2">
<clef shape="F" line="4" />
</staffDef>
</staffGrp>
</staffGrp>
</staffGrp>
</scoreDef>
<section>
<measure>
<staff n="1">
<layer n="1">
<note dots="1" dur="4" oct="4" pname="b" />
<rest dots="1" dur="4" />
<note dots="1" dur="4" oct="4" pname="b" />
<note dur="4" oct="4" pname="b" />
<note dur="4" oct="4" pname="b" />
<note dur="4" oct="4" pname="b" />
<note dur="4" oct="4" pname="b" />
<rest dur="4"/>
<rest dur="4"/>
<rest dur="4"/>
</layer>
<layer n="2">
<note dots="1" dur="4" oct="4" pname="b" />
<rest dots="1" dur="4" />
<space dots="1" dur="4" />
<note dur="4" oct="4" pname="b" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
</layer>
<layer n="2">
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
<note dots="1" dur="4" oct="3" pname="a" />
</layer>
</staff>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>
Here is a case where it is behaving on multiple staves:
Transcoded from Humdrum
Thanks, @craigsapp and @rettinghaus . This is a tricky one. It also seems that the issue occurs only in octave 4 and below:
The problem seems to be related to the algorithm only looking at the clef of the top staff. Any secondary staff with the same clef will also behave (as in my last example), but a different clef on secondary staves will cause a problem (as in @rettinghaus example). But this does not account for @axgeertinger last example...
Test 1: bass clef on top staff and bottom staff (both with single dots):
Transcoded from Humdrum
Moving the staves around, now the top staff is treble clef, and dots behave on all treble clef staves:
Transcoded from Humdrum
So apparently the dots behave only in the clef and octave used in the uppermost staff OR if there are no notes at the same timestamp in the top staff?
I think the final solution is that the unison comparison is between a note on the current staff and (incorrectly) a note on the top staff:
Transcoded from Humdrum
In the first measure there are single dots in the bottom staff, but when the pitches are different from the top staff in the second measure, the double dots appear in the second staff.
@craigsapp yes, that would explain it
BTW It seems that the single dot unison was working fine with version 3.4.1. Check Verovio Version comparison.
@ndubo indeed. Apparently the issue was introduced with version 3.5.0.
Not sure whether this qualifies as a feature request or a bug report: Dotted unisons in double stem notation sharing the same notehead should only have one dot, not two (cf. Behind Bars, p. 58). This:
currently produces this: The lower dot should be omitted. The problem only occurs when the notehead is placed on a staff or ledger line, not between lines.