rism-digital / verovio

🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)
https://www.verovio.org
GNU Lesser General Public License v3.0
678 stars 185 forks source link

trill line enhancement #3543

Closed craigsapp closed 8 months ago

craigsapp commented 11 months ago

In this example, the trills are adjusted vertically to avoid the previous trill line:

Screenshot 2023-11-08 at 01 23 12
Click to view MEI data for above example ```xml </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2023-11-08T01:24:07" version="4.1.0-dev-0f5111f"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="ml40ngd"> <score xml:id="sbxue0y"> <scoreDef xml:id="s16bnr85" midi.bpm="100.000000"> <staffGrp xml:id="sbk4fur"> <staffDef xml:id="staffdef-L1F1" n="1" lines="5"> <clef xml:id="clef-L2F1" shape="G" line="2" /> <keySig xml:id="keysig-L3F1" mode="major" sig="2s" pname="d" /> <meterSig xml:id="metersig-L5F1" count="5" unit="4" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="21"> <staff xml:id="staff-L1F1" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L8F1" dots="1" dur="4" oct="5" pname="d" accid.ges="n" /> <note xml:id="note-L9F1" dur="8" oct="5" pname="d" accid.ges="n" /> </layer> </staff> <tie xml:id="tie-L8F1-L9F1" startid="#note-L8F1" endid="#note-L9F1" /> <trill xml:id="trill-L9F1" staff="1" startid="#note-L9F1" tstamp2="1m+4.0000" /> <tie xml:id="tie-L9F1-L11F1" startid="#note-L9F1" endid="#note-L11F1" /> </measure> <measure xml:id="measure-L10" n="22"> <staff xml:id="staff-L10F1N1" n="1"> <layer xml:id="layer-L10F1N1" n="1"> <note xml:id="note-L11F1" dots="1" dur="2" oct="5" pname="d" accid.ges="n" /> <note xml:id="note-L12F1" dur="2" oct="4" pname="a" accid.ges="n" /> </layer> </staff> <trill xml:id="trill-L12F1" staff="1" startid="#note-L12F1" tstamp2="0m+6.0000" /> </measure> <measure xml:id="measure-L13" n="23"> <staff xml:id="staff-L13F1N1" n="1"> <layer xml:id="layer-L13F1N1" n="1"> <note xml:id="note-L14F1" dots="1" dur="2" oct="4" pname="f" accid.ges="s" /> <note xml:id="note-L15F1" dur="2" oct="4" pname="b" accid.ges="n" /> </layer> </staff> <trill xml:id="trill-L14F1" staff="1" startid="#note-L14F1" tstamp2="0m+4.0000" /> <trill xml:id="trill-L15F1" staff="1" startid="#note-L15F1" tstamp2="0m+6.0000" /> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>It would be preferable if the wavy lines for the trills did not trigger collision avoidance with the trill on the following note. In other words, not extend the trill line so far.</p> <p>For example, here is the original source typesetting:</p> <img width="252" alt="Screenshot 2023-11-08 at 01 22 29" src="https://github.com/rism-digital/verovio/assets/3487289/ffdc484a-da27-4e72-8e80-d61ec343b805"> <p>(allowing vgrp would also be useful for such cases, otherwise slight vertical adjustments for the stem on the second trill note would be OK).</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rettinghaus"><img src="https://avatars.githubusercontent.com/u/7693447?v=4" />rettinghaus</a> commented <strong> 11 months ago</strong> </div> <div class="markdown-body"> <p>Like this? <img src="https://github.com/rism-digital/verovio/assets/7693447/705a84c9-0f95-4c79-a529-2ecf7e9eb23f" alt="image" /></p> </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> 11 months ago</strong> </div> <div class="markdown-body"> <p>Yes, that looks great! I see you are using a different font. Does it work the similar in all fonts?</p> </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>