humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

Missing clef change when no rhythms in the music #813

Closed craigsapp closed 1 year ago

craigsapp commented 1 year ago

There should be a treble clef change in this example:

Screenshot 2023-05-08 at 12 13 27 PM

If there is one explicit rhythm before the clef change, then the clef change is shown:

Screenshot 2023-05-08 at 12 14 37 PM

Test data:

**kern
*clefF4
C
D
E
F
G
A
B
*clefG2
c
d
e
f
g
a
b
cc
=
*-

Open in VHV

The problem is that the rhythmless notes are probably treated as having zero duration, and the treble clef is ignored somehow because if it. The clef change is never added to the MEI conversion:

Screenshot 2023-05-08 at 12 18 14 PM
Click to view MEI conversion of first example ```xml </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2023-05-08T12:17:51" version="3.16.0-dev-ae62ef2-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="m1ys4480"> <score xml:id="s14yinko"> <scoreDef xml:id="s1xd4stf"> <staffGrp xml:id="s16vol7j"> <staffDef xml:id="staffdef-L1F1" n="1" lines="5"> <clef xml:id="clef-L2F1" shape="F" line="4" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1"> <staff xml:id="staff-L1F1" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L3F1" dur="4" oct="3" pname="c" stem.visible="false" accid.ges="n" /> <note xml:id="note-L4F1" dur="4" oct="3" pname="d" stem.visible="false" accid.ges="n" /> <note xml:id="note-L5F1" dur="4" oct="3" pname="e" stem.visible="false" accid.ges="n" /> <note xml:id="note-L6F1" dur="4" oct="3" pname="f" stem.visible="false" accid.ges="n" /> <note xml:id="note-L7F1" dur="4" oct="3" pname="g" stem.visible="false" accid.ges="n" /> <note xml:id="note-L8F1" dur="4" oct="3" pname="a" stem.visible="false" accid.ges="n" /> <note xml:id="note-L9F1" dur="4" oct="3" pname="b" stem.visible="false" accid.ges="n" /> <note xml:id="note-L11F1" dur="4" oct="4" pname="c" stem.visible="false" accid.ges="n" /> <note xml:id="note-L12F1" dur="4" oct="4" pname="d" stem.visible="false" accid.ges="n" /> <note xml:id="note-L13F1" dur="4" oct="4" pname="e" stem.visible="false" accid.ges="n" /> <note xml:id="note-L14F1" dur="4" oct="4" pname="f" stem.visible="false" accid.ges="n" /> <note xml:id="note-L15F1" dur="4" oct="4" pname="g" stem.visible="false" accid.ges="n" /> <note xml:id="note-L16F1" dur="4" oct="4" pname="a" stem.visible="false" accid.ges="n" /> <note xml:id="note-L17F1" dur="4" oct="4" pname="b" stem.visible="false" accid.ges="n" /> <note xml:id="note-L18F1" dur="4" oct="5" pname="c" stem.visible="false" accid.ges="n" /> </layer> </staff> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/craigsapp"><img src="https://avatars.githubusercontent.com/u/3487289?v=4" />craigsapp</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Fixed with commit <a href="https://github.com/rism-digital/verovio/commit/d3567f3b86112ca73a435a848610edf732800e5c">https://github.com/rism-digital/verovio/commit/d3567f3b86112ca73a435a848610edf732800e5c</a></p> <img width="819" alt="Screenshot 2023-05-08 at 1 46 52 PM" src="https://user-images.githubusercontent.com/3487289/236931592-23c06c4b-6d1b-48c7-a25d-95e9d470e379.png"> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>