Closed gregchapman-dev closed 5 months ago
Interestingly the command-line rendering does not show a crash:
verovio copeland.krn -s 60 --page-width=2500 --page-height=4200
Using Verovio 3.15.0-dev-5260bd2-dirty
Error messages in console when rendering in VHV:
Here is a smaller sample demonstrating the problem:
**kern
*part9
*staff9
*ICbras
*Itromp
*I"Trumpet in Bb 3
*I'tp
*clefG2
*ITrd1c2
*k[b-e-]
*M2/2
=110
4.ff
8aa
4.gg
8c
=111
*Xtuplet
*^
*rscale:1/2 *rscale:1/2
*M6/8 *M6/8
3cc 3cc
6cc 6cc
3b- 3b-
6g 6g
=112 =112
3f 3f
6dd 6r
3cc 3r
6r 6r
*v *v
=
*-
With the command-line version of verovio this renders as expected (and no warnings or crashes):
The problem is related to two time signatures: 2/2 and 6/8, and I am adjusting the visual rhythms of the notes in 6/8 since they are encoded as triplets in 2/2 to align with parallel 2/2 measures.
When I convert the above Humdrum to MEI on the command-line with verovio, I get the expected notation of the MEI when rendering in VHV:
Transcoded from Humdrum
VHV is curretly using 4.3.0-dev-a9c89e9-dirty
on the command line verovio reports this version Verovio 3.15.0-dev-5260bd2-dirty
So there could be some regression between 3.15.0 and 4.3.0.
When I install version Verovio 4.3.0-dev-a9c89e9-dirty on the command line, I am no getting this error with the short example:
libc++abi: terminating with uncaught exception of type std::out_of_range: map::at: key not found
Abort trap: 6
Here is the backtrace (from bottom to top):
out of range problem occurred in:
vrv::Rest::GetRestOffsetFromOptions(vrv::RestLayer, std::__1::pair<int, vrv::RestAccidental> const&, bool) const + 395
Maybe the rest-aligner is not considering @dur.ges
There is something not clear for me. When running the minimal example posted by @craigsapp I obtain a different output. This is what I get with default options:
When looking that the MEI output -t mei
, I can see that note
and rest
elements in the second and third measure have no dur
. I am not sure what the intention is, but a note or a rest with no visual duration does not really make sense.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/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">
<meiHead>
<fileDesc>
<titleStmt>
<title />
</titleStmt>
<pubStmt>
<unpub>This MEI file was created by Verovio's Humdrum converter. When published, this unpub element should be removed, and the enclosing pubStmt element should be properly filled out.</unpub>
</pubStmt>
</fileDesc>
<encodingDesc>
<appInfo>
<application isodate="2024-06-17T12:10:34" version="4.3.0-dev-ab7a0b9">
<name>Verovio</name>
<p>Transcoded from Humdrum</p>
</application>
</appInfo>
</encodingDesc>
<extMeta>
<frames xmlns="http://www.humdrum.org/ns/humxml" />
</extMeta>
</meiHead>
<music>
<body>
<mdiv xml:id="mgsb59u">
<score xml:id="s1yeqi1p">
<scoreDef xml:id="s1it0619">
<staffGrp xml:id="sk66qea">
<staffDef xml:id="staffdef-L1F1" n="1" lines="5" trans.diat="-1" trans.semi="-2">
<label xml:id="label-L6F1">Trumpet in B<rend xml:id="r4m88sj" glyph.auth="smufl">î‰ </rend> 3</label>
<clef xml:id="clef-L8F1" shape="G" line="2" />
<keySig xml:id="keysig-L10F1" sig="0" />
<meterSig xml:id="metersig-L11F1" count="2" unit="2" />
<instrDef xml:id="i2gsemx" midi.instrnum="56" midi.instrname="Trumpet" />
</staffDef>
</staffGrp>
</scoreDef>
<section xml:id="section-L1F1">
<measure xml:id="measure-L1" n="110">
<staff xml:id="staff-L1F1" n="1">
<layer xml:id="layer-L1F1N1" n="1">
<note xml:id="note-L13F1" dots="1" dur="4" oct="5" pname="g" accid.ges="n" />
<note xml:id="note-L14F1" dur="8" oct="5" pname="b" accid.ges="n" />
<note xml:id="note-L15F1" dots="1" dur="4" oct="5" pname="a" accid.ges="n" />
<note xml:id="note-L16F1" dur="8" oct="4" pname="d" accid.ges="n" />
</layer>
</staff>
</measure>
<scoreDef xml:id="s1d1g2cz">
<staffGrp xml:id="sp69j9c">
<staffDef xml:id="sero4q0" n="1">
<meterSig xml:id="m1t07bb4" count="6" unit="8" />
</staffDef>
</staffGrp>
</scoreDef>
<measure xml:id="measure-L17" n="111">
<staff xml:id="staff-L17F1N1" n="1">
<layer xml:id="layer-L17F1N1" n="1">
<tuplet xml:id="tuplet-L22F1-L23F1" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L22F1" dur.ges="2" dots.ges="0" oct="5" pname="d" accid.ges="n" />
<note xml:id="note-L23F1" dur.ges="4" dots.ges="0" oct="5" pname="d" accid.ges="n" />
</tuplet>
<tuplet xml:id="tuplet-L24F1-L25F1" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L24F1" dur.ges="2" dots.ges="0" oct="5" pname="c" accid.ges="n" />
<note xml:id="note-L25F1" dur.ges="4" dots.ges="0" oct="4" pname="a" accid.ges="n" />
</tuplet>
</layer>
<layer xml:id="layer-L17F2N2" n="2">
<tuplet xml:id="tuplet-L22F2-L23F2" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L22F2" dur.ges="2" dots.ges="0" oct="5" pname="d" accid.ges="n" />
<note xml:id="note-L23F2" dur.ges="4" dots.ges="0" oct="5" pname="d" accid.ges="n" />
</tuplet>
<tuplet xml:id="tuplet-L24F2-L25F2" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L24F2" dur.ges="2" dots.ges="0" oct="5" pname="c" accid.ges="n" />
<note xml:id="note-L25F2" dur.ges="4" dots.ges="0" oct="4" pname="a" accid.ges="n" />
</tuplet>
</layer>
</staff>
</measure>
<measure xml:id="measure-L26" n="112">
<staff xml:id="staff-L26F1N1" n="1">
<layer xml:id="layer-L26F1N1" n="1">
<tuplet xml:id="tuplet-L27F1-L28F1" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L27F1" dur.ges="2" dots.ges="0" oct="4" pname="g" accid.ges="n" />
<note xml:id="note-L28F1" dur.ges="4" dots.ges="0" oct="5" pname="e" accid.ges="n" />
</tuplet>
<tuplet xml:id="tuplet-L29F1-L30F1" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L29F1" dur.ges="2" dots.ges="0" oct="5" pname="d" accid.ges="n" />
<rest xml:id="rest-L30F1" dur.ges="4" dots.ges="0" ploc="b" oloc="4" />
</tuplet>
</layer>
<layer xml:id="layer-L26F2N2" n="2">
<tuplet xml:id="tuplet-L27F2-L28F2" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L27F2" dur.ges="2" dots.ges="0" oct="4" pname="g" accid.ges="n" />
<rest xml:id="rest-L28F2" dur.ges="4" dots.ges="0" ploc="g" oloc="4" />
</tuplet>
<tuplet xml:id="tuplet-L29F2-L30F2" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<rest xml:id="rest-L29F2" dur.ges="2" dots.ges="0" ploc="e" oloc="4" />
<rest xml:id="rest-L30F2" dur.ges="4" dots.ges="0" ploc="b" oloc="4" />
</tuplet>
</layer>
</staff>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>
I assume this is causing the crash. I will look at what is happening in the rendering, but the MEI produced looks problematic to me.
It seems to be a regression in iohumdrum.cpp
code related to @dots.ges="0"
being added, while at the same time the @dur
disappears.
version 3.15.0 had the @dur
:
<tuplet xml:id="tuplet-L22F1-L23F1" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L22F1" dur.ges="2" dur="4" oct="5" pname="d" accid.ges="n" />
<note xml:id="note-L23F1" dur.ges="4" dur="8" oct="5" pname="d" accid.ges="n" />
</tuplet>
But your conversion (which I cannot get in version 4.3.0) does not have @dur
:
<tuplet xml:id="tuplet-L22F1-L23F1" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L22F1" dur.ges="2" dots.ges="0" oct="5" pname="d" accid.ges="n" />
<note xml:id="note-L23F1" dur.ges="4" dots.ges="0" oct="5" pname="d" accid.ges="n" />
</tuplet>
How did you get that conversion? Probably with implementatino of #3707I am getting a crash when trying to convert to MEI:
verovio -t mei test.krn
libc++abi: terminating with uncaught exception of type std::out_of_range: map::at: key not found
Abort trap: 6
(crashing at the same spot for the same reason as when generating SVG).
I am wondering why casting-off is being done for conversion between Humdrum to MEI, which I am not expecting casting-off to be a part of the conversion process.
I will fix the lack of @dur
now that #3707 is merged into develop
.
This is indirectly related to issue https://github.com/rism-digital/verovio/issues/3639 (March 25th), which is probably around the same time as the addition of @dots.ges
and deletion of @dur
in iohumdrum.cpp
for cases of tuplets with gestural durations.
The problem in #3639 is that this MEI data:
<tuplet xml:id="tuplet-L29F2" num="3" numbase="2" num.visible="false" bracket.visible="false" num.format="count">
<note xml:id="note-L29F2" type="color-marked" dots="1" dur="4" oct="4" pname="c" color="red" accid.ges="n" />
</tuplet>
Should be a triplet dotted quarter note, but is instead a regular dotted quarter note:
(the next note in the top staff after the red note should align with the third beamed group in the bottom staff)
I'll keep this open until I fix the regression.
It seems that the command-line call does not crash for me because of the rest@loc
value that prevents the Rest::GetRestOffsetFromOptions
to be called.
Commit https://github.com/rism-digital/verovio/commit/99e7bc0f5c4ec668e810c6438b5edebce395e7ab fixes the issue and now the original example renders as expected:
I will update the JavaScript toolkit for VHV and then close if it is working there.
Original example now working in VHV:
https://verovio.humdrum.org/?file=poly/R714_Cop-w32p117-118m110-112.krn
Any ideas why the conversion I had with the latest develop was different?
I think you were using the latest develop
which is a few months behind develop-humdrum
so you were using a version of the Humdrum converter that used to automatically assign rest positions when there were two voices on the staff.
I had removed those calculations and use the verovio default positions (unless I want the resets moved), so your version had @ploc
/@oloc
data, where the version I was using did not have them (and my default-positioned rests triggered Rest:: GetRestOffsetFromOptions
while yours did not).
OK. Yes, I was using latest develop
. Can we merge develop-humdrum
into develop
now?
Yes, it is in a reasonably stable state at the moment.
PR just submitted (but Humdrum code does not seem to be compiled with the current checks).
Describe the problem A particular Copland score fails to render, both on verovio.humdrum.org, and on the command line with develop-humdrum.
To Reproduce Steps to reproduce the behavior:
I ran it in Xcode (develop-humdrum), and it crashes in Rest::GetRestOffsetFromOptions because duration is DURATION_NONE, and g_defaultRests doesn't have a (leaf) entry for that value:
.at(duration)
crashes with out-of-range error.Expected behavior I expected it to render. This exact score rendered fine before I updated to latest develop-humdrum today (I had been running the version which I submitted as PR #3642).
Input data https://verovio.humdrum.org/?file=poly/R714_Cop-w32p117-118m110-112.krn
Verovio information
Environment information (as appropriate)