verovio
verovio copied to clipboard
key change with transposing instruments
A key change with transposing instruments does not result in the correct accidentals.
As seen here both the clarinet and the horn have the correct accidentals in the beggining but the key change does not consider the transposition of the instruments. Accidentals should be 1f for the horn and 5f for the clarinet. This did work before, I hope I'm not missung something obvious.
Test MEI
<?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>TestMEI KeyChange</title>
<respStmt />
</titleStmt>
<pubStmt>
<date isodate="2022-06-24" type="encoding-date">2022-06-24</date>
</pubStmt>
</fileDesc>
<encodingDesc xml:id="encodingdesc-npqx0g">
<appInfo xml:id="appinfo-6vugxl">
<application xml:id="application-mnrexv" isodate="2022-06-24T10:09:29" version="3.11.0-dev-5334175">
<name xml:id="name-jdab7g">Verovio</name>
<p xml:id="p-retco9">Transcoded from MusicXML</p>
</application>
</appInfo>
</encodingDesc>
</meiHead>
<music>
<body>
<mdiv>
<score>
<scoreDef>
<staffGrp>
<staffDef n="1" lines="5" ppq="1" trans.diat="-2.000000" trans.semi="-3.000000">
<label>Clarinet in A</label>
<labelAbbr>Cl. in A</labelAbbr>
<clef shape="G" line="2" />
<keySig sig="1f" />
<meterSig count="4" unit="4" />
</staffDef>
<staffDef n="2" lines="5" ppq="1" trans.diat="-4.000000" trans.semi="-7.000000">
<label>Horn in F</label>
<labelAbbr>Hrn. in F</labelAbbr>
<clef shape="G" line="2" />
<keySig sig="3s" />
<meterSig count="4" unit="4" />
</staffDef>
<staffGrp>
<grpSym symbol="bracket" />
<staffDef n="3" lines="5" ppq="1">
<label>Violin</label>
<labelAbbr>Vln.</labelAbbr>
<clef shape="G" line="2" />
<keySig sig="2s" />
<meterSig count="4" unit="4" />
</staffDef>
<staffDef n="4" lines="5" ppq="1">
<label>Violoncello</label>
<labelAbbr>Vc.</labelAbbr>
<clef shape="F" line="4" />
<keySig sig="2s" />
<meterSig count="4" unit="4" />
</staffDef>
</staffGrp>
</staffGrp>
</scoreDef>
<section>
<measure n="1">
<staff n="1">
<layer n="1">
<note dur="4" oct="4" pname="f" stem.dir="up" />
<note dur="4" oct="4" pname="g" stem.dir="up" />
<note dur="4" oct="4" pname="a" stem.dir="up" />
<note dur="4" oct="4" pname="b" stem.dir="down" accid.ges="f" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dur="4" oct="4" pname="a" stem.dir="up" />
<note dur="4" oct="4" pname="b" stem.dir="down" />
<note dur="4" oct="5" pname="c" stem.dir="down" accid.ges="s" />
<note dur="4" oct="5" pname="d" stem.dir="down" />
</layer>
</staff>
<staff n="3">
<layer n="1">
<note dur="4" oct="4" pname="d" stem.dir="up" />
<note dur="4" oct="4" pname="e" stem.dir="up" />
<note dur="4" oct="4" pname="f" stem.dir="up" accid.ges="s" />
<note dur="4" oct="4" pname="g" stem.dir="up" />
</layer>
</staff>
<staff n="4">
<layer n="1">
<note dur="4" oct="3" pname="d" stem.dir="down" />
<note dur="4" oct="3" pname="e" stem.dir="down" />
<note dur="4" oct="3" pname="f" stem.dir="down" accid.ges="s" />
<note dur="4" oct="3" pname="g" stem.dir="down" />
</layer>
</staff>
</measure>
<measure n="2">
<staff n="1">
<layer n="1">
<note dur="4" oct="5" pname="c" stem.dir="down" />
<note dur="4" oct="5" pname="d" stem.dir="down" />
<note dur="4" oct="5" pname="e" stem.dir="down" />
<note dur="4" oct="5" pname="f" stem.dir="down" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dur="4" oct="5" pname="e" stem.dir="down" />
<note dur="4" oct="5" pname="f" stem.dir="down" accid.ges="s" />
<note dur="4" oct="5" pname="g" stem.dir="down" accid.ges="s" />
<note dur="4" oct="5" pname="a" stem.dir="down" />
</layer>
</staff>
<staff n="3">
<layer n="1">
<note dur="4" oct="4" pname="a" stem.dir="up" />
<note dur="4" oct="4" pname="b" stem.dir="down" />
<note dur="4" oct="5" pname="c" stem.dir="down" accid.ges="s" />
<note dur="4" oct="5" pname="d" stem.dir="down" />
</layer>
</staff>
<staff n="4">
<layer n="1">
<note dur="4" oct="3" pname="a" stem.dir="down" />
<note dur="4" oct="3" pname="b" stem.dir="down" />
<note dur="4" oct="4" pname="c" stem.dir="down" accid.ges="s" />
<note dur="4" oct="4" pname="d" stem.dir="down" />
</layer>
</staff>
</measure>
<scoreDef>
<keySig sig="2f" />
</scoreDef>
<measure n="3">
<staff n="1">
<layer n="1">
<note dur="4" oct="5" pname="e" stem.dir="down" accid.ges="f" />
<note dur="4" oct="5" pname="d" stem.dir="down" />
<note dur="4" oct="5" pname="c" stem.dir="down" />
<note dur="4" oct="4" pname="b" stem.dir="down" accid.ges="f" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dur="4" oct="5" pname="g" stem.dir="down" />
<note dur="4" oct="5" pname="f" stem.dir="down" accid.ges="s" />
<note dur="4" oct="5" pname="e" stem.dir="down" />
<note dur="4" oct="5" pname="d" stem.dir="down" />
</layer>
</staff>
<staff n="3">
<layer n="1">
<note dur="4" oct="5" pname="c" stem.dir="down" />
<note dur="4" oct="4" pname="b" stem.dir="down" />
<note dur="4" oct="4" pname="a" stem.dir="up" />
<note dur="4" oct="4" pname="g" stem.dir="up" />
</layer>
</staff>
<staff n="4">
<layer n="1">
<note dur="4" oct="4" pname="c" stem.dir="down" />
<note dur="4" oct="3" pname="b" stem.dir="down" />
<note dur="4" oct="3" pname="a" stem.dir="down" />
<note dur="4" oct="3" pname="g" stem.dir="down" />
</layer>
</staff>
</measure>
<measure right="end" n="4">
<staff n="1">
<layer n="1">
<note dur="4" oct="4" pname="a" stem.dir="up" />
<note dur="4" oct="4" pname="g" stem.dir="up" />
<note dur="2" oct="4" pname="f" stem.dir="up" />
</layer>
</staff>
<staff n="2">
<layer n="1">
<note dur="4" oct="5" pname="c" stem.dir="down" accid.ges="s" />
<note dur="4" oct="4" pname="b" stem.dir="down" />
<note dur="2" oct="4" pname="a" stem.dir="up" />
</layer>
</staff>
<staff n="3">
<layer n="1">
<note dur="4" oct="4" pname="f" stem.dir="up" accid.ges="s" />
<note dur="4" oct="4" pname="e" stem.dir="up" />
<note dur="2" oct="4" pname="d" stem.dir="up" />
</layer>
</staff>
<staff n="4">
<layer n="1">
<note dur="4" oct="3" pname="f" stem.dir="down" accid.ges="s" />
<note dur="4" oct="3" pname="e" stem.dir="down" />
<note dur="2" oct="3" pname="d" stem.dir="down" />
</layer>
</staff>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>
I would be interested with which version this worked. You set the new key signature for the whole score, so this is exactly what I expect here.
Should've worked in 3.10.0 if remember correctly. You could of course set the key signature staff by staff, but it would make sense if it just changed it relative to the transposition as a default, because that's what you need in the majority of the cases. It would be just a QoL change of course...
In 3.10.0 and before trans.semi
and trans.diat
were only considered for MIDI. So it did not work there:
Since https://github.com/rism-digital/verovio/pull/2886 it is additionally considered when transposing to sounding pitch.
@DavidBauer1984 can we close the issue?
I guess it can be closed. It's definitely not a regression in Verovio and I think it's unlikely that in the future an encoding as above will have the expected outcome. This is rather an MEI question.