humdrum-tools / verovio-humdrum-viewer

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

editorial dynamics styling #703

Closed craigsapp closed 2 years ago

craigsapp commented 2 years ago

Verovio now has dynam@enclose to add brackets or parentheses around dynamics. Switch from simulating them with text to using the enclose method.

Test example:

Screen Shot 2022-04-29 at 4 54 38 PM
**kern  **dynam
=1  =1
!   !LO:DY:ed=paren
1cc f
=2  =2
!   !LO:DY:ed=brack
1g  p
=3  =3
!   !LO:DY:paren
1cc f
=2  =2
!   !LO:DY:brack
1g  p
=   =
*-  *-

The last two are not implemented yet, but would be good to add (add parentheses or brackets which are not editorial or are unknown if they are editorial).

Click for current MEI conversion ```xml </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2022-04-29T16:57:43" version="3.10.0-dev-4aceb2c-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="mpn3t0z"> <score xml:id="s31vzuf"> <scoreDef xml:id="sq0cvze" midi.bpm="400.000000"> <staffGrp xml:id="sspewzg"> <staffDef xml:id="sgv1wm" n="1" lines="5"> <clef xml:id="cm3rj55" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="skrbgoe" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L4F1" dur="1" oct="5" pname="c" accid.ges="n" /> </layer> </staff> <supplied xml:id="svmt85r"> <dynam xml:id="dynam-L4F2" type="editorial" staff="1" tstamp="1.000000" vgrp="100">( f )</dynam> </supplied> </measure> <measure xml:id="measure-L5" n="2"> <staff xml:id="staff-L5F1N1" n="1"> <layer xml:id="layer-L5F1N1" n="1"> <note xml:id="note-L7F1" dur="1" oct="4" pname="g" accid.ges="n" /> </layer> </staff> <supplied xml:id="s4f03ot"> <dynam xml:id="dynam-L7F2" type="editorial" staff="1" tstamp="1.000000" vgrp="100"> <rend xml:id="rukaq5p">[ p ]</rend> </dynam> </supplied> </measure> <measure xml:id="measure-L8" n="3"> <staff xml:id="staff-L8F1N1" n="1"> <layer xml:id="layer-L8F1N1" n="1"> <note xml:id="note-L10F1" dur="1" oct="5" pname="c" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L10F2" staff="1" tstamp="1.000000" vgrp="100">f</dynam> </measure> <measure xml:id="measure-L11" n="2"> <staff xml:id="staff-L11F1N1" n="1"> <layer xml:id="layer-L11F1N1" n="1"> <note xml:id="note-L13F1" dur="1" oct="4" pname="g" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L13F2" staff="1" tstamp="1.000000" vgrp="100">p</dynam> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <details> <summary> Click to view target MEI conversion </summary> ```xml <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="https://music-encoding.org/schema/dev/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.0-dev"> <meiHead> <fileDesc> <titleStmt> <title /> </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2022-04-29T16:44:29" version="3.10.0-dev-4aceb2c-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="m7ctbeh"> <score xml:id="s6g0xuf"> <scoreDef xml:id="sn8j7bu" midi.bpm="400.000000"> <staffGrp xml:id="sultvp0"> <staffDef xml:id="sx4ybi8" n="1" lines="5"> <clef xml:id="c1fin1f" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="sa55mh4" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L3F1" dur="1" oct="5" pname="c" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L3F2" enclose="paren" staff="1" tstamp="1.000000" vgrp="100">f</dynam> </measure> <measure xml:id="measure-L4" n="2"> <staff xml:id="staff-L4F1N1" n="1"> <layer xml:id="layer-L4F1N1" n="1"> <note xml:id="note-L5F1" dur="1" oct="4" pname="g" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L5F2" enclose="brack" staff="1" tstamp="1.000000" vgrp="100">p</dynam> </measure> <measure xml:id="measure-L6" n="3"> <staff xml:id="staff-L6F1N1" n="1"> <layer xml:id="layer-L6F1N1" n="1"> <note xml:id="note-L7F1" dur="1" oct="5" pname="c" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L7F2" enclose="paren" staff="1" tstamp="1.000000" vgrp="100">f</dynam> </measure> <measure xml:id="measure-L8" n="2"> <staff xml:id="staff-L8F1N1" n="1"> <layer xml:id="layer-L8F1N1" n="1"> <note xml:id="note-L9F1" dur="1" oct="4" pname="g" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L9F2" enclose="brack" staff="1" tstamp="1.000000" vgrp="100">p</dynam> </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> 2 years ago</strong> </div> <div class="markdown-body"> <p>Implemented with commit <a href="https://github.com/rism-digital/verovio/commit/2425b7b5154a08b4198ef560a89af666e93d2e29">https://github.com/rism-digital/verovio/commit/2425b7b5154a08b4198ef560a89af666e93d2e29</a></p> <p>Complete example of dynamics enclosure styles:</p> <img width="1557" alt="Screen Shot 2022-04-29 at 7 06 48 PM" src="https://user-images.githubusercontent.com/3487289/166086567-95ab6c7e-29bd-4cc7-83ee-226bdd6e70f3.png"> <pre><code class="language-tsv">**kern **dynam =1 =1 !!LO:TX:a:t=w/o enclose:color=gray !!LO:TX:a:t=editorial:color=dodgerblue ! !LO:DY:ed 1cc f =2 =2 !!LO:TX:a:t=brack:color=gray ! !LO:DY:ed=brack 1g p =3 =3 !!LO:TX:a:t=paren:color=gray ! !LO:DY:ed=paren 1b pp =4 =4 !!LO:TX:a:t=curly:color=gray ! !LO:DY:ed=curly 1a ppp =5 =5 !!LO:TX:a:t=angle:color=gray ! !LO:DY:ed=angle 1dd f =6|| =6|| !!LO:TX:a:t=non-editorial:color=dodgerblue 32ryy . 1ryy . !!LO:TX:a:t=brack:color=gray ! !LO:DY:brack 1b mp =7 =7 !!LO:TX:a:t=paren:color=gray ! !LO:DY:paren 1a mf =8 =8 !!LO:TX:a:t=curly:color=gray ! !LO:DY:curly 1g fff =9 =9 !!LO:TX:a:t=angle:color=gray ! !LO:DY:angle 1f ff == == *- *- !!!verovio: spacingLinear 0.5 !!!verovio: pageWidth 2000</code></pre> <details> <summary> Click to view MEI data for above example </summary> ```xml <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="https://music-encoding.org/schema/dev/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="https://music-encoding.org/schema/dev/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.0-dev"> <meiHead> <fileDesc> <titleStmt> <title /> </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2022-04-29T19:10:57" version="3.10.0-dev-4aceb2c-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> <extMeta> <frames xmlns="http://www.humdrum.org/ns/humxml"> <metaFrame n="43" token="!!!verovio: spacingLinear 0.5" xml:id="L44"> <frameInfo> <startTime float="40.125" ratfrac="1/8" /> <frameType>reference</frameType> <referenceKey>verovio</referenceKey> <referenceValue>spacingLinear 0.5</referenceValue> </frameInfo> </metaFrame> <metaFrame n="44" token="!!!verovio: pageWidth 2000" xml:id="L45"> <frameInfo> <startTime float="40.125" ratfrac="1/8" /> <frameType>reference</frameType> <referenceKey>verovio</referenceKey> <referenceValue>pageWidth 2000</referenceValue> </frameInfo> </metaFrame> </frames> </extMeta> </meiHead> <music> <body> <mdiv xml:id="mddesik"> <score xml:id="sa8h9vg"> <scoreDef xml:id="srkfrpr" midi.bpm="400.000000"> <staffGrp xml:id="siyszde"> <staffDef xml:id="svpgw34" n="1" lines="5"> <clef xml:id="cs2lbmq" shape="G" line="2" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="so6i7ne" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L6F1" dur="1" oct="5" pname="c" accid.ges="n" /> </layer> </staff> <supplied xml:id="scz9ev7"> <dynam xml:id="dynam-L6F2" type="editorial" staff="1" tstamp="1.000000" vgrp="100">f</dynam> </supplied> <dir xml:id="dir-L3F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rbwemnh" color="gray" fontstyle="normal">w/o enclose</rend> </dir> <dir xml:id="dir-L4F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="r8fjyfm" color="dodgerblue" fontstyle="normal">editorial</rend> </dir> </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-L10F1" dur="1" oct="4" pname="g" accid.ges="n" /> </layer> </staff> <supplied xml:id="sacmt1j"> <dynam xml:id="dynam-L10F2" type="editorial" staff="1" tstamp="1.000000" enclose="brack" vgrp="100">p</dynam> </supplied> <dir xml:id="dir-L8F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="r5pidq6" color="gray" fontstyle="normal">brack</rend> </dir> </measure> <measure xml:id="measure-L11" n="3"> <staff xml:id="staff-L11F1N1" n="1"> <layer xml:id="layer-L11F1N1" n="1"> <note xml:id="note-L14F1" dur="1" oct="4" pname="b" accid.ges="n" /> </layer> </staff> <supplied xml:id="semj0bc"> <dynam xml:id="dynam-L14F2" type="editorial" staff="1" tstamp="1.000000" enclose="paren" vgrp="100">pp</dynam> </supplied> <dir xml:id="dir-L12F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="r4svnlk" color="gray" fontstyle="normal">paren</rend> </dir> </measure> <measure xml:id="measure-L15" n="4"> <staff xml:id="staff-L15F1N1" n="1"> <layer xml:id="layer-L15F1N1" n="1"> <note xml:id="note-L18F1" dur="1" oct="4" pname="a" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L18F2" staff="1" tstamp="1.000000" vgrp="100">{ ppp }</dynam> <dir xml:id="dir-L16F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="r1iwvax" color="gray" fontstyle="normal">curly</rend> </dir> </measure> <measure xml:id="measure-L19" right="dbl" n="5"> <staff xml:id="staff-L19F1N1" n="1"> <layer xml:id="layer-L19F1N1" n="1"> <note xml:id="note-L22F1" dur="1" oct="5" pname="d" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L22F2" staff="1" tstamp="1.000000" vgrp="100">< f ></dynam> <dir xml:id="dir-L20F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rge7xci" color="gray" fontstyle="normal">angle</rend> </dir> </measure> <measure xml:id="measure-L23" n="6"> <staff xml:id="staff-L23F1N1" n="1"> <layer xml:id="layer-L23F1N1" n="1"> <space xml:id="space-L25F1" dur="32" /> <space xml:id="space-L26F1" dur="1" /> <note xml:id="note-L29F1" dur="1" oct="4" pname="b" accid.ges="n" /> </layer> </staff> <dir xml:id="dir-L24F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="r197939" color="dodgerblue" fontstyle="normal">non-editorial</rend> </dir> <dynam xml:id="dynam-L29F2" staff="1" tstamp="5.125000" enclose="brack" vgrp="100">mp</dynam> <dir xml:id="dir-L27F1" place="above" staff="1" tstamp="5.125000"> <rend xml:id="rasebe5" color="gray" fontstyle="normal">brack</rend> </dir> </measure> <measure xml:id="measure-L30" n="7"> <staff xml:id="staff-L30F1N1" n="1"> <layer xml:id="layer-L30F1N1" n="1"> <note xml:id="note-L33F1" dur="1" oct="4" pname="a" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L33F2" staff="1" tstamp="1.000000" enclose="paren" vgrp="100">mf</dynam> <dir xml:id="dir-L31F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rpu57a1" color="gray" fontstyle="normal">paren</rend> </dir> </measure> <measure xml:id="measure-L34" n="8"> <staff xml:id="staff-L34F1N1" n="1"> <layer xml:id="layer-L34F1N1" n="1"> <note xml:id="note-L37F1" dur="1" oct="4" pname="g" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L37F2" staff="1" tstamp="1.000000" vgrp="100">{ fff }</dynam> <dir xml:id="dir-L35F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rek37ee" color="gray" fontstyle="normal">curly</rend> </dir> </measure> <measure xml:id="measure-L38" right="end" n="9"> <staff xml:id="staff-L38F1N1" n="1"> <layer xml:id="layer-L38F1N1" n="1"> <note xml:id="note-L41F1" dur="1" oct="4" pname="f" accid.ges="n" /> </layer> </staff> <dynam xml:id="dynam-L41F2" staff="1" tstamp="1.000000" vgrp="100">< ff ></dynam> <dir xml:id="dir-L39F1" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rlr3w2z" color="gray" fontstyle="normal">angle</rend> </dir> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> </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>