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
683 stars 185 forks source link

beam + rest@ploc@oloc collision #2848

Closed craigsapp closed 2 years ago

craigsapp commented 2 years ago

In this example:

Screen Shot 2022-05-08 at 6 25 20 AM
Click to view MEI data for above example ```xml </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2022-05-08T06:14:30" version="3.10.0-dev-2bebcfc-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="mftnb5l"> <score xml:id="skqzuzj"> <scoreDef xml:id="s4609pa"> <staffGrp xml:id="suwm9nx"> <staffDef xml:id="sz4i90j" n="1" lines="5"> <clef xml:id="clef-L2F1" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1"> <staff xml:id="smc2m74" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <rest xml:id="rest-L4F1" dur="16" ploc="d" oloc="5" /> <beam xml:id="beam-L5F1-L15F1"> <note xml:id="note-L5F1" dur="16" oct="4" pname="a" accid.ges="n" /> <rest xml:id="rest-L6F1" dur="16" ploc="d" oloc="5" /> <note xml:id="note-L7F1" dur="16" oct="4" pname="f" accid.ges="n" /> <rest xml:id="rest-L8F1" dur="16" ploc="d" oloc="5" /> <note xml:id="note-L9F1" dur="16" oct="4" pname="g" accid.ges="n" /> <rest xml:id="rest-L10F1" dur="16" ploc="b" oloc="4" /> <note xml:id="note-L11F1" dur="16" oct="4" pname="d" accid.ges="n" /> <rest xml:id="rest-L12F1" dur="16" ploc="b" oloc="4" /> <note xml:id="note-L13F1" dur="16" oct="4" pname="e" accid.ges="n" /> <rest xml:id="rest-L14F1" dur="16" ploc="b" oloc="4" /> <note xml:id="note-L15F1" dur="16" oct="4" pname="f" accid.ges="n" /> </beam> </layer> </staff> </measure> <measure xml:id="measure-L16"> <staff xml:id="staff-L16F1N1" n="1"> <layer xml:id="layer-L16F1N1" n="1"> <rest xml:id="rest-L17F1" dur="16" /> <beam xml:id="beam-L18F1-L28F1"> <note xml:id="note-L18F1" dur="16" oct="4" pname="a" accid.ges="n" /> <rest xml:id="rest-L19F1" dur="16" /> <note xml:id="note-L20F1" dur="16" oct="4" pname="f" accid.ges="n" /> <rest xml:id="rest-L21F1" dur="16" /> <note xml:id="note-L22F1" dur="16" oct="4" pname="g" accid.ges="n" /> <rest xml:id="rest-L23F1" dur="16" /> <note xml:id="note-L24F1" dur="16" oct="4" pname="d" accid.ges="n" /> <rest xml:id="rest-L25F1" dur="16" /> <note xml:id="note-L26F1" dur="16" oct="4" pname="e" accid.ges="n" /> <rest xml:id="rest-L27F1" dur="16" /> <note xml:id="note-L28F1" dur="16" oct="4" pname="f" accid.ges="n" /> </beam> </layer> </staff> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>The beam and rests are colliding in the first measure when the rests have specific <code>@ploc</code> and <code>@oloc</code> attributes. The second measure removes the <code>@ploc</code> and <code>@oloc</code> attributes, and the rests no longer collide with the beam (since they are now so low). But also interestingly, the beam in the second measure is higher (and would avoid the rests in the first measure if the same position were used).</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> 2 years ago</strong> </div> <div class="markdown-body"> <p>Fixed:</p> <img width="495" alt="Screen Shot 2022-05-12 at 8 19 00 PM" src="https://user-images.githubusercontent.com/3487289/168204734-218e4eee-4146-4043-a910-b2a48425a2b5.png"> <p>Most likely with PR <a href="https://github.com/rism-digital/verovio/pull/2858">https://github.com/rism-digital/verovio/pull/2858</a></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>