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
661 stars 181 forks source link

mRpt numbering #1867

Closed craigsapp closed 2 years ago

craigsapp commented 3 years ago

How are numbers above <mRpt> controlled in refined cases? Numbers are currently added above the mRpt automatically by default:

Screen Shot 2020-11-27 at 12 33 59 PM
Click for MEI data ```xml </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2020-11-27T12:31:50" version="3.1.0-dev-c299a50"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="mdiv-0000001578304534"> <score xml:id="score-0000001135662375"> <scoreDef xml:id="scoredef-0000000517827537"> <staffGrp xml:id="staffgrp-0000000889201589"> <staffDef xml:id="staffdef-0000000667682266" n="1" lines="5"> <clef xml:id="clef-0000000635355091" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="staff-0000000099618976" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L3F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L4F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L5F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L6F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L7"> <staff xml:id="staff-L7F1N1" n="1"> <layer xml:id="layer-L7F1N1" n="1"> <mRpt xml:id="mrpt-L8F1" /> </layer> </staff> </measure> <measure xml:id="measure-L14"> <staff xml:id="staff-L14F1N1" n="1"> <layer xml:id="layer-L14F1N1" n="1"> <mRpt xml:id="mrpt-L15F1" /> </layer> </staff> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>In the documentation for mRpt: <a rel="noreferrer nofollow" target="_blank" href="https://music-encoding.org/guidelines/v4/elements/mrpt.html">https://music-encoding.org/guidelines/v4/elements/mrpt.html</a></p> <p>In the remarks section:</p> <blockquote> <p>The automated numbering of consecutive measures of rest may be controlled via the multi.number attribute on the scoreDef or staffDef elements.</p> </blockquote> <p>which is implemented in verovio:</p> <img width="818" alt="Screen Shot 2020-11-27 at 12 43 20 PM" src="https://user-images.githubusercontent.com/3487289/100483554-3c5b6f00-30ae-11eb-942e-ee73351f54e7.png"> <details> <summary> Click for MEI data </summary> ```xml <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0"> <meiHead> <fileDesc> <titleStmt> <title /> </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2020-11-27T12:31:50" version="3.1.0-dev-c299a50"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="mdiv-0000001578304534"> <score xml:id="score-0000001135662375"> <scoreDef xml:id="scoredef-0000000517827537"> <staffGrp xml:id="staffgrp-0000000889201589"> <staffDef xml:id="staffdef-0000000667682266" n="1" lines="5" multi.number="false"> <clef xml:id="clef-0000000635355091" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="staff-0000000099618976" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L3F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L4F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L5F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L6F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L7"> <staff xml:id="staff-L7F1N1" n="1"> <layer xml:id="layer-L7F1N1" n="1"> <mRpt xml:id="mrpt-L8F1" /> </layer> </staff> </measure> <measure xml:id="measure-L14"> <staff xml:id="staff-L14F1N1" n="1"> <layer xml:id="layer-L14F1N1" n="1"> <mRpt xml:id="mrpt-L15F1" /> </layer> </staff> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>The question is: How to control the numbering behavior on a case-by-case example? For example, if there are only a few repeated measures, then it is not necessary to number them. In such cases, does a <code><staffDef></code> turning off <code>@multi.number</code> need to be added, and then turned back on after the mRept section of music? That seems quite contrived. It would perhaps be better to have a way of controlling the minimum number of repeated symbols before numbers are added above the mRpt. And/or allowing <code>@multi.number</code> to be attached to <code><mRpt></code> to allow changing the numbering behavior contrary to the global setting in <code><staffDef></code>.</p> <p>One possibility would be to utilize <code>mRpt@n</code> which could be used to set the number explicitly: </p> <blockquote> <p><code>@n</code> (optional) Provides a number-like designation that indicates an element's position in a sequence of similar elements. May not contain space characters. Value conforms to data.WORD.</p> </blockquote> <p>But adding <code>@n</code> to the mRpt does not change the number currently, and it cannot be used to turn off the numbers in any case (although setting to <code>0</code> could be assigned the meaning of suppressing the number).</p> <p>This also impinges on how to deal with automatic numbers in musical excerpts. Currently the number above the repeat sign always starts with 2:</p> <img width="363" alt="Screen Shot 2020-11-27 at 12 53 18 PM" src="https://user-images.githubusercontent.com/3487289/100483996-8c870100-30af-11eb-8513-a08ffab3492c.png"> <details> <summary> Click for MEI data </summary> ```xml <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0"> <meiHead> <fileDesc> <titleStmt> <title /> </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2020-11-27T12:53:20" version="3.1.0-dev-c299a50"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="mdiv-0000001050533788"> <score xml:id="score-0000001640547760"> <scoreDef xml:id="scoredef-0000000130786965"> <staffGrp xml:id="staffgrp-0000000180271132"> <staffDef xml:id="staffdef-0000001416799051" n="1" lines="5"> <clef xml:id="clef-0000001395732460" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="staff-0000000401321854" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <mRpt xml:id="mrpt-L3F1" /> </layer> </staff> </measure> <measure xml:id="measure-L9" n="2"> <staff xml:id="staff-L9F1N1" n="1"> <layer xml:id="layer-L9F1N1" n="1"> <mRpt xml:id="mrpt-L10F1" /> </layer> </staff> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>But what if the repeat number should not start at 2?</p> <hr /> <p>Indirectly related: is there a way of adding repetition numbering above repeated measures? In other words, orchestral parts often have repetition numbers above notated music that is equivalent to an expanded mRpt. Each measures in the following example would have a number above it (probably staring with "2" above the second measure):</p> <img width="820" alt="Screen Shot 2020-11-27 at 12 59 21 PM" src="https://user-images.githubusercontent.com/3487289/100484297-a412b980-30b0-11eb-9c00-ae8db2067da1.png"> <details> <summary> Click for MEI data </summary> ```xml <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="https://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0"> <meiHead> <fileDesc> <titleStmt> <title /> </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2020-11-27T12:59:33" version="3.1.0-dev-c299a50"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="mdiv-0000000568643486"> <score xml:id="score-0000001099744775"> <scoreDef xml:id="scoredef-0000000499936172"> <staffGrp xml:id="staffgrp-0000000723438890"> <staffDef xml:id="staffdef-0000000369544041" n="1" lines="5"> <clef xml:id="clef-0000001339198681" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="staff-0000001510003217" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L3F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L4F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L5F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L6F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L7" n="2"> <staff xml:id="staff-L7F1N1" n="1"> <layer xml:id="layer-L7F1N1" n="1"> <note xml:id="note-L8F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L9F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L10F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L11F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L12" n="3"> <staff xml:id="staff-L12F1N1" n="1"> <layer xml:id="layer-L12F1N1" n="1"> <note xml:id="note-L13F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L14F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L15F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L16F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L17" n="4"> <staff xml:id="staff-L17F1N1" n="1"> <layer xml:id="layer-L17F1N1" n="1"> <note xml:id="note-L18F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L19F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L20F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L21F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L22" n="5"> <staff xml:id="staff-L22F1N1" n="1"> <layer xml:id="layer-L22F1N1" n="1"> <note xml:id="note-L23F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L24F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L25F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L26F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> <measure xml:id="measure-L27" n="6"> <staff xml:id="staff-L27F1N1" n="1"> <layer xml:id="layer-L27F1N1" n="1"> <note xml:id="note-L28F1" dur="4" oct="4" pname="c" accid.ges="n" /> <note xml:id="note-L29F1" dur="4" oct="4" pname="e" accid.ges="n" /> <note xml:id="note-L30F1" dur="4" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L31F1" dur="4" oct="4" pname="e" accid.ges="n" /> </layer> </staff> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>Here is an example from a Finale plugin documentation page:</p> <p><a rel="noreferrer nofollow" target="_blank" href="https://usermanuals.finalemusic.com/Finale2014Mac/Content/Finale/Number_Repeated_Measures_Plug_in.htm">https://usermanuals.finalemusic.com/Finale2014Mac/Content/Finale/Number_Repeated_Measures_Plug_in.htm</a></p> <img width="699" alt="Screen Shot 2020-11-27 at 1 11 25 PM" src="https://user-images.githubusercontent.com/3487289/100484631-120bb080-30b2-11eb-836f-9d013d42108b.png"> <p>Related to (same as) issue <a rel="noreferrer nofollow" target="_blank" href="https://github.com/humdrum-tools/verovio-humdrum-viewer/issues/464">https://github.com/humdrum-tools/verovio-humdrum-viewer/issues/464</a></p> <p>Also related somewhat to issue <a rel="noreferrer nofollow" target="_blank" href="https://github.com/music-encoding/music-encoding/issues/741">https://github.com/music-encoding/music-encoding/issues/741</a>, but that is a separate problem.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/lpugin"><img src="https://avatars.githubusercontent.com/u/689412?v=4" />lpugin</a> commented <strong> 2 years ago</strong> </div> <div class="markdown-body"> <p>Duplicating with #2784 </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>