music-encoding / sample-encodings

A directory of Sample Encodings for MEI
Educational Community License v2.0
31 stars 33 forks source link

Aguado-Walzer_G-major all notes are rendered 1 octave too high. #99

Open paul-bayleaf opened 8 months ago

paul-bayleaf commented 8 months ago

In the sample encodings for MEI there is a classical guitar piece, Aguado-Walzer_G-major, but when rendered with Verovio all the notes are rendered one octave too high.

Original image of the first bar: original-1st-bar

Verovio rendering of first bar: verovio-1st-bar

To Reproduce Render https://github.com/music-encoding/sample-encodings/blob/main/MEI_5.0/Music/Complete_examples/Aguado_Walzer_G-major.mei

Compare with original: https://github.com/music-encoding/sample-encodings/blob/main/MEI_5.0/Music/Complete_examples/Aguado_Walzer_G-major.pdf

Expected behavior Notes should be rendered an octave lower.

This is not a [Verovio issue] (https://github.com/rism-digital/verovio/issues/3641). With a G clef classical guitar music is played an octave lower than notated. However, this sample uses a G suboctave clef. I think this mean that the encoded pitches should be at sounding pitch, not 1 octave higher as currently.

If the fix is simply lowering the octave of each note then I could prepare a pull request for this if required.

craigsapp commented 8 months ago

I think this mean that the encoded pitches should be at sounding pitch, not 1 octave higher as currently.

Yes, the encoded pitches should be at sounding pitch. I think the problem is that the first conversion (probably in CapToMusic.py, but possibly in the MusicXML-to-MEI conversion) from the original source treated the music as in treble clef rather than vocal tenor clef (G suboctave clef). Afterwards, the treble clef was changed to the suboctave clef by hand to match the source (probably in MEI), but the notes were not transposed at the same time. This dataset was converted from MusicXML using XSLT (that @pe-ro wrote?), then Maja Hartwig and Kristina Richts added <meiHead>, but did not view or edit the musical content of the converter (verovio was not around then, there was an MEI-MusicXML XSLT converter I think, @pe-ro, and/or an MEI-to-MUP converter, but perhaps they did not have access to either of those).

So this music:

Screenshot 2024-04-03 at 10 40 10 AM
Click to view the MEI data for the above example. ```xml </titleStmt> <pubStmt> </pubStmt> </fileDesc> <encodingDesc> <appInfo> <application isodate="2024-04-03T10:50:34" version="4.2.0-dev-84f99b0-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <extMeta> <frames xmlns="http://www.humdrum.org/ns/humxml" /> </extMeta> </meiHead> <music decls="#work1_encoded"> <body> <mdiv xml:id="mch801d"> <score xml:id="s4l7t51"> <scoreDef xml:id="s1e05d2"> <staffGrp xml:id="s1nduof"> <staffDef xml:id="staffdef-L1F1" n="1" lines="5"> <clef xml:id="clef-L2F1" shape="G" line="2" dis="8" dis.place="below" /> <keySig xml:id="keysig-L3F1" sig="1s" /> <meterSig xml:id="metersig-L5F1" count="3" unit="8" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="staff-L1F1" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <rest xml:id="rest-L8F1" dur="8" ploc="f" oloc="4" /> <beam xml:id="beam-L9F1-L11F1"> <note xml:id="note-L9F1" dur="16" oct="4" pname="b" accid.ges="n" /> <note xml:id="note-L10F1" dur="16" oct="5" pname="c" accid.ges="n" /> <note xml:id="note-L11F1" dur="8" oct="5" pname="d" accid.ges="n" /> </beam> </layer> <layer xml:id="layer-L1F1N2" n="2"> <chord xml:id="chord-L8F2" dots="1" dur="4"> <note xml:id="note-L8F2S1" oct="3" pname="g" accid.ges="n" /> <note xml:id="note-L8F2S2" oct="3" pname="b" accid.ges="n" /> </chord> </layer> </staff> <tempo xml:id="tempo-L5F1" place="above" staff="1" tstamp="1.000000"> <symbol xml:id="s1bjp6os" glyph.auth="smufl" glyph.name="metNoteQuarterUp" fontsize="70.00%" /> = 92–98</tempo> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>Should be sounding like this:</p> <img width="293" alt="Screenshot 2024-04-03 at 10 40 39 AM" src="https://github.com/music-encoding/sample-encodings/assets/3487289/265765f9-8c1c-414f-8666-d3540635fa50"> <details> <summary> Click to view the MEI data for above example. </summary> ```xml <?xml version="1.0" encoding="UTF-8"?> <?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> <?xml-model href="https://music-encoding.org/schema/5.0/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"> <meiHead> <fileDesc> <titleStmt> <title /> </titleStmt> <pubStmt> </pubStmt> </fileDesc> <encodingDesc> <appInfo> <application isodate="2024-04-03T10:49:06" version="4.2.0-dev-84f99b0-dirty"> <name>Verovio</name> <p>Transcoded from Humdrum</p> </application> </appInfo> </encodingDesc> <extMeta> <frames xmlns="http://www.humdrum.org/ns/humxml" /> </extMeta> </meiHead> <music decls="#work1_encoded"> <body> <mdiv xml:id="m1a52n5q"> <score xml:id="sg2oiws"> <scoreDef xml:id="sq5a4yw"> <staffGrp xml:id="s1ek3v36"> <staffDef xml:id="staffdef-L1F1" n="1" lines="5"> <clef xml:id="clef-L2F1" shape="G" line="2" /> <keySig xml:id="keysig-L3F1" sig="1s" /> <meterSig xml:id="metersig-L5F1" count="3" unit="8" /> </staffDef> </staffGrp> </scoreDef> <section xml:id="section-L1F1"> <measure xml:id="measure-L1" n="1"> <staff xml:id="staff-L1F1" n="1"> <layer xml:id="layer-L1F1N1" n="1"> <rest xml:id="rest-L8F1" dur="8" ploc="g" oloc="4" /> <beam xml:id="beam-L9F1-L11F1"> <note xml:id="note-L9F1" dur="16" oct="4" pname="b" accid.ges="n" /> <note xml:id="note-L10F1" dur="16" oct="5" pname="c" accid.ges="n" /> <note xml:id="note-L11F1" dur="8" oct="5" pname="d" accid.ges="n" /> </beam> </layer> <layer xml:id="layer-L1F1N2" n="2"> <chord xml:id="chord-L8F2" dots="1" dur="4"> <note xml:id="note-L8F2S1" oct="3" pname="g" accid.ges="n" /> <note xml:id="note-L8F2S2" oct="3" pname="b" accid.ges="n" /> </chord> </layer> </staff> <tempo xml:id="tempo-L5F1" place="above" staff="1" tstamp="1.000000"> <symbol xml:id="sdtt8oe" glyph.auth="smufl" glyph.name="metNoteQuarterUp" fontsize="70.00%" /> = 92–98</tempo> </measure> </section> </score> </mdiv> </body> </music> </mei> ``` </details> <p>In both cases the dotted quarter G note is encoded at sounding pitch:</p> <pre><code class="language-xml"> <note xml:id="note-L8F2S1" oct="3" pname="g" accid.ges="n" /> <note xml:id="note-L8F2S1" oct="3" pname="g" accid.ges="n" /></code></pre> <p>while in the current MEI file, it is a G4 (which is then displayed as a G5 with the suboctave clef), so the music must be transposed down one octave to be correct.</p> <p>To fix in the MEI score, transpose down one octave with the <code>--transpose -P8</code> option in verovio:</p> <pre><code class="language-bash">verovio --transpose -P8 input.mei -t mei -o output.mei</code></pre> <p>Rendered output:</p> <img width="613" alt="Screenshot 2024-04-03 at 9 22 39 AM" src="https://github.com/music-encoding/sample-encodings/assets/3487289/19bb677d-0702-4f3e-9053-162346d13350"> <details> <summary> Click to view transposed 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>Walzer G-Dur<titlePart type="subordinate">an electronic transcription</titlePart> Dionisio Aguado y García Maja Hartwig Kristina Richts Musikwissenschaftliches Seminar, Detmold
Gartenstrasse 20 32756Detmold Germany
2011 This encoding is in the public domain. However, the sources used to create it may be under copyright. We believe their use by the MEI project for educational and research purposes is covered by the Fair Use doctrine. However, we will remove any material from the project archive when requested to do so by the copyright owner.
MEI Sample Collection German Research Foundation
Kennedyallee 40 Bonn Germany
National Endowment for the Humanities
1100 Pennsylvania Avenue N.W. Washington, DC20004 United States
MEI Project
http://www.hausmusik.ch/notenisodateal/a/aguado_dionisio(1788-1847)/walzer_g-dur/walzer_g-dur.xml Walzer G-Dur Dionisio Aguado y García Verein zur Förderung der Hausmusik
CH-4143 Dornach Postfach 68
(C) Jürgen W. Knuth
http://www.hausmusik.ch/notenregal/a/aguado_dionisio(1788-1847)/walzer_g-dur/walzer_g-dur.pdf Walzer G-Dur
mei2012To2013.xsl mei21To30.xsl MusicXML2MEI mei30To40.xsl mei40To50.xsl meiLint.xsl OCLC_DDC 787 OSWD 4021100-9 4129951-6 4302724-6 Walzer G-Dur Dionisio Aguado y García G major Incipit is not available Guitar Gitarrenmusik Instrumentalmusik Zupfmusik Stringed instruments Unknown

The original MusicXML file was generated using CapToMusic.py CapXML to MusicXML converter version 1.11.

Maja Hartwig

Transcoded from a MusicXML version 1.1 file on 2011-05-12 using themusicxml2meistylesheet.

Kristina Richts

Cleaned up MEI file automatically usingppq.xsl.

Cleaned up MEI file automatically usingHeader.xsl.

Kristina Richts

Revised the header.

Converted to MEI 2013 using mei2012To2013.xsl, version 1.0 beta

Converted to version 3.0.0 using mei21To30.xsl, version 1.0 beta

Converted to MEI version 4.0.0 using mei30To40.xsl, version 1.0 beta

Benjamin W. Bohl Stefan Münnich

  • update xml-model schema references to v4.0.1
  • update meiversion attributes to 4.0.1
  • add missing responsibility statements to change elements
  • unify documentation of mei version upgrades (appInfo and revisionDesc)
  • linted with meiLint.xsl
  • Converted to MEI version 5.0 using mei40To50.xsl, version 1.0

    Applied lint mode.

    0 0 1 2 4 1 3 4 3 1 2 3 1 2 - - - - 1 3 3 0 2 4 3 1 4 1
    ```

    When processing this file with verovio, the following warnings are generated:

    [Warning] Unsupported value '5.0' for att.meiVersion@meiversion
    [Warning] Element <title> within <pgHead> is not supported and will be ignored 
    [Warning] Element <persName> within <pgHead> is not supported and will be ignored 
    [Warning] Element <p> within <pgFoot> is not supported and will be ignored 
    [Warning] Tie 't4jikqp' is not encoded in the measure of its start 'd30278e1310'. This may cause improper rendering.
    [Warning] Tie with @xml:id t1b1jczt has both a @startid and an @tstamp; @tstamp is ignored

    Also the repeat barline(s) are not encoded in a way that verovio handles them properly at line breaks:

    Screenshot 2024-04-03 at 10 59 59 AM

    End of first line should be a plain barline not a repeat barline. Measure 9 has some glissandos which are encoded as text dashes. Fingerings to the left of notes are not implemented in verovio yet, I think (such as on first chord in first measure).


    As a side note, if the "8" below the clef is implicit (hidden, as typical in guitar music), then using clef@oct="3" would be used if the notes are encoded at sounding pitch:

    Screenshot 2024-04-03 at 9 30 33 AM

    [There is a bug in the display of the key signature in verovio when clef@oct is used, since the key signature should not be displaced by clef@oct]

    staffDef@clef.oct does not seem to exist (or at least implemented in verovio), so I had to adjust the staffDef:

    <staffDef xml:id="sjwauos" n="1" lines="5" >
       <clef oct="3" shape="G" line="2" />
    </staffDef>
    Display MEI data for above example ```xml Walzer G-Dur<titlePart type="subordinate">an electronic transcription</titlePart> Dionisio Aguado y García Maja Hartwig Kristina Richts Musikwissenschaftliches Seminar, Detmold
    Gartenstrasse 20 32756Detmold Germany
    2011 This encoding is in the public domain. However, the sources used to create it may be under copyright. We believe their use by the MEI project for educational and research purposes is covered by the Fair Use doctrine. However, we will remove any material from the project archive when requested to do so by the copyright owner.
    MEI Sample Collection German Research Foundation
    Kennedyallee 40 Bonn Germany
    National Endowment for the Humanities
    1100 Pennsylvania Avenue N.W. Washington, DC20004 United States
    MEI Project
    http://www.hausmusik.ch/notenisodateal/a/aguado_dionisio(1788-1847)/walzer_g-dur/walzer_g-dur.xml Walzer G-Dur Dionisio Aguado y García Verein zur Förderung der Hausmusik
    CH-4143 Dornach Postfach 68
    (C) Jürgen W. Knuth
    http://www.hausmusik.ch/notenregal/a/aguado_dionisio(1788-1847)/walzer_g-dur/walzer_g-dur.pdf Walzer G-Dur
    mei2012To2013.xsl mei21To30.xsl MusicXML2MEI mei30To40.xsl mei40To50.xsl meiLint.xsl OCLC_DDC 787 OSWD 4021100-9 4129951-6 4302724-6 Walzer G-Dur Dionisio Aguado y García G major Incipit is not available Guitar Gitarrenmusik Instrumentalmusik Zupfmusik Stringed instruments Unknown

    The original MusicXML file was generated using CapToMusic.py CapXML to MusicXML converter version 1.11.

    Maja Hartwig

    Transcoded from a MusicXML version 1.1 file on 2011-05-12 using themusicxml2meistylesheet.

    Kristina Richts

    Cleaned up MEI file automatically usingppq.xsl.

    Cleaned up MEI file automatically usingHeader.xsl.

    Kristina Richts

    Revised the header.

    Converted to MEI 2013 using mei2012To2013.xsl, version 1.0 beta

    Converted to version 3.0.0 using mei21To30.xsl, version 1.0 beta

    Converted to MEI version 4.0.0 using mei30To40.xsl, version 1.0 beta

    Benjamin W. Bohl Stefan Münnich

  • update xml-model schema references to v4.0.1
  • update meiversion attributes to 4.0.1
  • add missing responsibility statements to change elements
  • unify documentation of mei version upgrades (appInfo and revisionDesc)
  • linted with meiLint.xsl
  • Converted to MEI version 5.0 using mei40To50.xsl, version 1.0

    Applied lint mode.

    0 0 1 2 4 1 3 4 3 1 2 3 1 2 - - - - 1 3 3 0 2 4 3 1 4 1
    ```
    craigsapp commented 8 months ago

    staffDef@clef.oct does not exist. See issue https://github.com/music-encoding/music-encoding/issues/1446 for adding it.

    craigsapp commented 7 months ago

    MEI-MusicXML XSLT

    Here it is:

    https://github.com/music-encoding/encoding-tools/blob/main/mei2musicxml/mei2musicxml.xsl