humdrum-tools / verovio-humdrum-viewer

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

Footnote encoding #660

Open jacekiwaszko1 opened 2 years ago

jacekiwaszko1 commented 2 years ago

It would be useful to encode footnotes in Humdrum score. The example below contains several footnote marks in the score and footnotes at the bottom of the page: footnote

If the system for footnotes is not yet developed in Humdrum/Verovio Humdrum Viewer, I would suggest layout comment system for that:

!LO:TX:t=1):fnote=content of the footnote

where t= would store the footnote mark and fnote= the actual content of the footnote.

Proposal of encoding footnotes (first measure of the example):

**kern  **kern  **fing
*clefF4 *clefG2 *
*k[b-e-a-]  *k[b-e-a-]  *
*M6/8   *M6/8   *
=-  =-  =-
*   *^  *^
!   !LO:TX:iB:a:t=1):fnote=łagodnie 8 stopowemi głosami / sanfte 8fuſsstimmen   !   !   !
4E- [4.g    4e- 4B- 5   2 1
8r  .   8r  .   .
4BB-    8gL]    4d 4A-  .   .
.   8f  .   4   .
8r  8gJ 8r  5   .
*   *   *   *v  *v
*   *v  *v  *
*-  *-  *-

If it comes to MEI conversion, I guess the <annot> element (child of the same <dir> that contains a footnote mark) wouldn't be a bad place to put the footnote content in:

MEI conversion proposal ```xml </titleStmt> <pubStmt /> </fileDesc> <encodingDesc> <appInfo> <application isodate="2022-03-23T12:36:23" version="3.10.0-dev-fe12a79-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <workList> <work> <title /> </work> </workList> </meiHead> <music> <body> <mdiv xml:id="m28td9m"> <score xml:id="s9r8305"> <scoreDef xml:id="suf4c2p"> <staffGrp xml:id="skmu0te" bar.thru="true" symbol="brace"> <staffDef xml:id="sbl03w5" n="1" lines="5"> <clef xml:id="clef-L2F2" shape="G" line="2" /> <keySig xml:id="keysig-L3F2" sig="3f" /> <meterSig xml:id="metersig-L4F2" count="6" unit="8" /> </staffDef> <staffDef xml:id="st9rd0k" n="2" lines="5"> <clef xml:id="clef-L2F1" shape="F" line="4" /> <keySig xml:id="keysig-L3F1" sig="3f" /> <meterSig xml:id="metersig-L4F1" count="6" unit="8" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" right="invis"> <staff xml:id="subhvjg" n="1"> <layer xml:id="layer-L1F2N1" n="1"> <note xml:id="note-L8F2" dots="1" dur="4" oct="4" pname="g" accid.ges="n" /> <beam xml:id="beam-L10F2-L12F2"> <note xml:id="note-L10F2" dur="8" oct="4" pname="g" accid.ges="n" /> <note xml:id="note-L11F2" dur="8" oct="4" pname="f" accid.ges="n" /> <note xml:id="note-L12F2" dur="8" oct="4" pname="g" accid.ges="n" /> </beam> </layer> <layer xml:id="layer-L2F2N2" n="2"> <chord xml:id="chord-L8F3" dur="4"> <note xml:id="note-L8F3S1" oct="4" pname="e" accid.ges="f" /> <note xml:id="note-L8F3S2" oct="3" pname="b" accid.ges="f" /> </chord> <rest xml:id="rest-L9F3" dur="8" /> <chord xml:id="chord-L10F3" dur="4"> <note xml:id="note-L10F3S1" oct="4" pname="d" accid.ges="n" /> <note xml:id="note-L10F3S2" oct="3" pname="a" accid.ges="f" /> </chord> <rest xml:id="rest-L12F3" dur="8" ploc="c" oloc="4" /> </layer> </staff> <staff xml:id="scvrhks" n="2"> <layer xml:id="layer-L1F1N1" n="1"> <note xml:id="note-L8F1" dur="4" oct="3" pname="e" accid.ges="f" /> <rest xml:id="rest-L9F1" dur="8" /> <note xml:id="note-L10F1" dur="4" oct="2" pname="b" accid.ges="f" /> <rest xml:id="rest-L12F1" dur="8" /> </layer> </staff> <dir xml:id="dir-L7F2" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rv9nm8y" fontweight="bold">1)</rend> <annot xml:id="footnote1">łagodnie 8 stopowemi głosami / sanfte 8fuſsstimmen</annot> </dir> <tie xml:id="tie-L8F2-L10F2" startid="#note-L8F2" endid="#note-L10F2" /> <dir xml:id="dir-L8F4" type="fingering" place="above" staff="1" startid="#note-L8F2"> <rend xml:id="r1q5k8q" fontsize="x-small" fontstyle="normal">5</rend> </dir> <dir xml:id="dir-L8F5" type="fingering" place="below" staff="1" startid="#note-L8F2"> <rend xml:id="ri6xqos" fontsize="x-small" fontstyle="normal">2</rend> </dir> <dir xml:id="dir-L8F5" type="fingering" place="below" staff="1" startid="#note-L8F2"> <rend xml:id="ri25oqj" fontsize="x-small" fontstyle="normal">1</rend> </dir> <dir xml:id="dir-L11F4" type="fingering" place="above" staff="1" startid="#note-L11F2"> <rend xml:id="rrolpvy" fontsize="x-small" fontstyle="normal">4</rend> </dir> <dir xml:id="dir-L12F4" type="fingering" place="above" staff="1" startid="#note-L12F2"> <rend xml:id="ra819vm" fontsize="x-small" fontstyle="normal">5</rend> </dir> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <hr /> <p>In the example above there are footnotes written both in Polish and in German. Maybe it is a good moment for introducing language parameter to layout comments?</p> <p>What would you say about adding language indications to layout parameters like this:</p> <p><code>!LO:TX;t=1):fnote@@POL=łagodnie 8 stopowemi głosami:fnote@@DEU=sanfte 8fuſsstimmen</code></p> <p>In MEI it could be represented as</p> <pre><code class="language-xml"> <dir xml:id="dir-L7F2" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rv9nm8y" fontweight="bold">1)</rend> <annot xml:id="footnote1" xml:lang="pl-PL">łagodnie 8 stopowemi głosami</annot> <annot xml:id="footnote1" xml:lang="de-DE">sanfte 8fuſsstimmen</annot> </dir></code></pre> </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>Adding language markers such as that is good (Although I should play around with it to see what particulars are needed). This could also be extended to <code>!LO:TX</code> markers for the <code>t</code> parameter, such as:</p> <pre><code>!LO:TX:a:Bi:t@EN=Happy:t@@IT=Allegro:t@PL=Wesoły</code></pre> <p>The <code>@@</code> would mean the text of the diplomatic score, and would be selected to display if a particular language was not selected (so <code>t@@PL</code> would be similar to <code>t</code>.</p> <p>And there would be a way of selecting which language is desired for creating the graphical score.</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>There are two ways of showing footnotes in a score: (1) as popup text that shows when you mouse over the text in the score associated with the footnote (this is best for online scores), and (2) as a list of footnotes at the bottom of the page (best for PDFs but also can be used for digital scores). Number 2 is complicated if there are multiple pages. I can list footnotes in the MEI footer, but which page is difficult to control.</p> <p>One possibility is to display separately underneath the score (in addition to having pop-ups).</p> <hr /> <p>For the Tasso in Music Project, the footnotes are actually part of the critical report, which is a separate file from the Humdrum score, such as:</p> <p><a href="https://github.com/TassoInMusicProject/tasso-website/blob/gh-pages/data/reports/Trm0047m-report.aton">https://github.com/TassoInMusicProject/tasso-website/blob/gh-pages/data/reports/Trm0047m-report.aton</a></p> <p>This critical report is displayed on the work page (towards the bottom):</p> <p><a href="https://www.tassomusic.org/work/?id=Trm0047m">https://www.tassomusic.org/work/?id=Trm0047m</a></p> <img width="1069" alt="Screen Shot 2022-03-23 at 1 38 57 PM" src="https://user-images.githubusercontent.com/3487289/159791428-dbf2c00b-6e85-4d37-9ba2-ad1da41cdb6b.png"> <p>An "emended reading" entry such as:</p> <pre><code>@EMENDED_READING: {{MM 14}} and {{MMx 18}}, T, text reads “forza o d’arte” and “forza od arre,” respectively.</code></pre> <p>[<code>MMx</code> probably means do not insert into digital score. ]</p> <p>will be displayed in this critical report, but also the emended reading will be inserted into the digital score as an asterisk that displays the footnote on mouseover:</p> <img width="659" alt="Screen Shot 2022-03-23 at 7 05 22 AM" src="https://user-images.githubusercontent.com/3487289/159791698-793113bc-fb94-41d8-9d78-e10e35780f27.png"> <p>The insertion of the footnotes into the score are done with this Javascript code: <a href="https://github.com/TassoInMusicProject/tasso-website/blob/gh-pages/work/footnote.html">https://github.com/TassoInMusicProject/tasso-website/blob/gh-pages/work/footnote.html</a></p> <p>And then the tooltip hiding and showing is done with these two functions: <a href="https://github.com/TassoInMusicProject/tasso-website/blob/gh-pages/work/footnote.html">https://github.com/TassoInMusicProject/tasso-website/blob/gh-pages/work/footnote.html</a></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"> <blockquote> <p>In MEI it could be represented as</p> </blockquote> <pre><code class="language-xml"> <dir xml:id="dir-L7F2" place="above" staff="1" tstamp="1.000000"> <rend xml:id="rv9nm8y" fontweight="bold">1)</rend> <annot xml:id="footnote1" xml:lang="pl-PL">łagodnie 8 stopowemi głosami</annot> <annot xml:id="footnote1" xml:lang="de-DE">sanfte 8fuſsstimmen</annot> </dir></code></pre> <p>That is good for having in the MEI file, but it would not be transmitted to the SVG rendering via verovio (this would also require Javascript to manage display of the annotation in the SVG image after verovio prepares it). (Note xml:id="footnote1" is being duplicated).</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>