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

Support for ornaments #187

Closed efreja closed 7 years ago

efreja commented 8 years ago

Hello,

Thank you for your great work.

I think that to support a large number of piano scores, version 0.9.12 dev (that already contains a number of features), should be enhanced with the following elements, in that order of priority:

Thanks

craigsapp commented 8 years ago

Not to mention staccatos and other articulations which I don't think are implemented yet... (Fermatas are implemented).

lpugin commented 8 years ago

I'll change the ticket name to ornament support and remove ending in the list.

craigsapp commented 7 years ago

Staccatos are implemented now:

screen shot 2016-12-27 at 07 34 56

MEI data:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://music-encoding.org/schema/3.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://music-encoding.org/schema/3.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="3.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt>
                <date>2016-12-27 07:36:00</date>
            </pubStmt>
        </fileDesc>
        <encodingDesc>
            <projectDesc>
                <p>Transcoded from Humdrum with Verovio version 0.9.13-dev-a3ff6a7-dirty</p>
            </projectDesc>
        </encodingDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef xml:id="scoredef-000000156138654">
                        <staffGrp xml:id="m-000000087126578">
                            <staffDef xml:id="staffdef-000000182052644" clef.shape="G" clef.line="2" meter.count="4" meter.unit="4" n="1" lines="5" />
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-000000121504690">
                        <measure xml:id="measure-L3" n="1" right="end">
                            <staff xml:id="staff-L3F1" n="1">
                                <layer xml:id="layer-L3F1" n="1">
                                    <note xml:id="note-L4F1" dur="4" oct="4" pname="c" accid.ges="n">
                                        <artic xml:id="artic-000000211149901" artic="stacc" />
                                    </note>
                                    <note xml:id="note-L5F1" dur="4" oct="4" pname="d" accid.ges="n">
                                        <artic xml:id="artic-000000049630921" artic="stacc" />
                                    </note>
                                    <note xml:id="note-L6F1" dur="4" oct="4" pname="e" accid.ges="n">
                                        <artic xml:id="artic-000000052534613" artic="stacc" />
                                    </note>
                                    <note xml:id="note-L7F1" dur="4" oct="4" pname="g" accid.ges="n">
                                        <artic xml:id="artic-000000102203777" artic="stacc" />
                                    </note>
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>
craigsapp commented 7 years ago

I notice that PAE import allows for trills:

screen shot 2016-12-27 at 20 38 56

But the trills don't export into MEI (they are stored in Note::m_embellishment).

    verovio file.pae -t mei --no-layout --all-pages

MEI conversion:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://music-encoding.org/schema/3.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://music-encoding.org/schema/3.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="3.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt>
                <date>2016-12-27 20:31:36</date>
            </pubStmt>
        </fileDesc>
        <encodingDesc>
            <projectDesc>
                <p>Encoded with Verovio version 0.9.13-dev-0cd2987</p>
            </projectDesc>
        </encodingDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef xml:id="scoredef-000000154410583" key.sig="2s" meter.sym="cut">
                        <staffGrp xml:id="m-000000013760035">
                            <staffDef xml:id="staffdef-000000195667827" clef.shape="C" clef.line="4" n="1" lines="5" />
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-000000144735008">
                        <measure xml:id="measure-000000182476764" right="single">
                            <staff xml:id="staff-000000106560902" n="1">
                                <layer xml:id="layer-000000059448547" n="1">
                                    <beam xml:id="beam-000000156297108">
                                        <note xml:id="note-000000142348609" dots="1" dur="8" oct="3" pname="a" />
                                        <note xml:id="note-000000083505549" dur="16" oct="3" pname="a" />
                                    </beam>
                                </layer>
                            </staff>
                        </measure>
                        <measure xml:id="measure-000000056467151" right="single">
                            <staff xml:id="staff-000000097200409" n="1">
                                <layer xml:id="layer-000000019734144" n="1">
                                    <note xml:id="note-000000100298237" dots="1" dur="4" oct="4" pname="d" />
                                    <note xml:id="note-000000152563132" dur="8" oct="4" pname="d" />
                                    <note xml:id="note-000000033088367" dots="1" dur="4" oct="4" pname="c" />
                                    <note xml:id="note-000000132674683" dur="8" oct="4" pname="d" />
                                </layer>
                            </staff>
                        </measure>
                        <measure xml:id="measure-000000021871334" right="single">
                            <staff xml:id="staff-000000131134904" n="1">
                                <layer xml:id="layer-000000143099537" n="1">
                                    <beam xml:id="beam-000000101060737">
                                        <note xml:id="note-000000106990487" dots="1" dur="8" oct="4" pname="e" />
                                        <note xml:id="note-000000082995388" dur="16" oct="4" pname="c" />
                                    </beam>
                                    <note xml:id="note-000000112870835" dur="8" fermata="above" oct="3" pname="a" />
                                    <note xml:id="note-000000147820130" dur="8" oct="4" pname="e" />
                                    <note xml:id="note-000000203852144" dur="4" oct="4" pname="d" />
                                    <note xml:id="note-000000047583868" dur="4" oct="4" pname="e" />
                                </layer>
                            </staff>
                        </measure>
                        <measure xml:id="measure-000000001356142" right="single">
                            <staff xml:id="staff-000000019166056" n="1">
                                <layer xml:id="layer-000000057721384" n="1">
                                    <beam xml:id="beam-000000171631930">
                                        <note xml:id="note-000000104937538" dots="1" dur="8" oct="4" pname="f" />
                                        <note xml:id="note-000000117817901" dur="32" oct="4" pname="g" />
                                        <note xml:id="note-000000185551337" dur="32" oct="4" pname="e" />
                                    </beam>
                                    <note xml:id="note-000000200332276" dur="8" fermata="above" oct="4" pname="d" />
                                    <rest xml:id="rest-000000159711049" dur="8" />
                                    <rest xml:id="rest-000000123800241" dur="2" />
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>
screen shot 2016-12-27 at 20 41 44

In case you didn't notice ;-) the "tr" symbol occurs too far to the left, and they should be more centered on the note:

screen shot 2016-12-27 at 20 44 32
craigsapp commented 7 years ago

trills are now exportable to MEI data:

screen shot 2017-01-22 at 06 20 44

MEI data:

<?xml-model href="http://music-encoding.org/schema/3.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://music-encoding.org/schema/3.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="3.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt>
                <date>2017-01-22 06:20:35</date>
            </pubStmt>
        </fileDesc>
        <encodingDesc>
            <projectDesc>
                <p>Transcoded from Humdrum with Verovio version 0.9.14-dev-ca447f7</p>
            </projectDesc>
        </encodingDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef xml:id="scoredef-000000056964191">
                        <staffGrp xml:id="m-000000095955813">
                            <staffDef xml:id="staffdef-000000104861129" clef.shape="G" clef.line="2" meter.count="4" meter.unit="4" n="1" lines="5" />
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-000000107354854">
                        <measure xml:id="measure-L3" n="1" right="end">
                            <staff xml:id="staff-L3F1" n="1">
                                <layer xml:id="layer-L3F1" n="1">
                                    <note xml:id="note-L4F1" dur="1" oct="4" pname="c" accid.ges="n" />
                                </layer>
                            </staff>
                            <trill xml:id="trill-000000086029721" staff="1" tstamp="1.000000" />
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>
craigsapp commented 7 years ago

Are turns available in verovio yet?

Here is an example:

screen shot 2017-01-22 at 06 13 33

Rendered in verovio (without turns):

screen shot 2017-01-22 at 06 17 14

MEI data:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://music-encoding.org/schema/3.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://music-encoding.org/schema/3.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="3.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt>
                <date>2017-01-22 06:17:12</date>
            </pubStmt>
        </fileDesc>
        <encodingDesc>
            <projectDesc>
                <p>Transcoded from Humdrum with Verovio version 0.9.14-dev-ca447f7</p>
                <p>Encoded by: Craig Stuart Sapp</p>
            </projectDesc>
        </encodingDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef xml:id="scoredef-000000017110891">
                        <staffGrp xml:id="m-000000122260288" symbol="brace" barthru="true">
                            <staffDef xml:id="staffdef-000000211122180" clef.shape="G" clef.line="2" key.sig="2f" n="1" lines="5" />
                            <staffDef xml:id="staffdef-000000214358049" clef.shape="F" clef.line="4" key.sig="2f" n="2" lines="5" />
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-000000196746881">
                        <measure xml:id="measure-L4" n="2">
                            <staff xml:id="staff-L4F2" n="1">
                                <layer xml:id="layer-L4F2" n="1">
                                    <beam xml:id="beam-000000068979765">
                                        <note xml:id="note-L5F2" dots="1" dur="8" oct="5" pname="e" accid.ges="f" />
                                        <note xml:id="note-L8F2" dur="16" oct="5" pname="f" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-000000018500741">
                                        <note xml:id="note-L9F2" dots="1" dur="8" oct="5" pname="g" accid.ges="n" />
                                        <note xml:id="note-L12F2" dur="16" oct="5" pname="a" accid.ges="n" />
                                    </beam>
                                    <beam xml:id="beam-000000056764784">
                                        <note xml:id="note-L13F2" dots="1" dur="8" oct="5" pname="a" accid.ges="n" />
                                        <note xml:id="note-L16F2" dur="16" oct="5" pname="b" accid.ges="f" />
                                    </beam>
                                    <note xml:id="note-L17F2" dur="8" oct="5" pname="f" accid.ges="n">
                                        <artic xml:id="artic-000000034499580" artic="stacc" />
                                    </note>
                                    <rest xml:id="rest-L19F2" dur="8" />
                                </layer>
                            </staff>
                            <staff xml:id="staff-L4F1" n="2">
                                <layer xml:id="layer-L4F1" n="1">
                                    <beam xml:id="beam-000000034253559">
                                        <note xml:id="note-L5F1" dur="16" oct="3" pname="g" accid.ges="n" />
                                        <note xml:id="note-L6F1" dur="16" oct="4" pname="e" accid.ges="f" />
                                        <note xml:id="note-L7F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                        <note xml:id="note-L8F1" dur="16" oct="4" pname="e" accid.ges="f" />
                                    </beam>
                                    <beam xml:id="beam-000000192730873">
                                        <note xml:id="note-L9F1" dur="16" oct="3" pname="e" accid.ges="f" />
                                        <note xml:id="note-L10F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                        <note xml:id="note-L11F1" dur="16" oct="3" pname="g" accid.ges="n" />
                                        <note xml:id="note-L12F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                    </beam>
                                    <beam xml:id="beam-000000067243800">
                                        <note xml:id="note-L13F1" dur="16" oct="3" pname="d" accid.ges="n" />
                                        <note xml:id="note-L14F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                        <note xml:id="note-L15F1" dur="16" oct="3" pname="f" accid.ges="n" />
                                        <note xml:id="note-L16F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                    </beam>
                                    <beam xml:id="beam-000000067389287">
                                        <note xml:id="note-L17F1" dur="16" oct="3" pname="d" accid.ges="n" />
                                        <note xml:id="note-L18F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                        <note xml:id="note-L19F1" dur="16" oct="3" pname="f" accid.ges="n" />
                                        <note xml:id="note-L20F1" dur="16" oct="3" pname="b" accid.ges="f" />
                                    </beam>
                                </layer>
                            </staff>
                            <slur xml:id="slur-000000037623911" staff="1" startid="#note-L5F2" endid="#note-L8F2" />
                            <slur xml:id="slur-000000054672810" staff="1" startid="#note-L9F2" endid="#note-L12F2" />
                            <slur xml:id="slur-000000127017481" staff="1" startid="#note-L13F2" endid="#note-L16F2" />
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>
craigsapp commented 7 years ago

Here is an alternate representation of turns which occur on notes rather than between notes:

screen shot 2017-01-27 at 04 29 48
lpugin commented 7 years ago

I am closing this issue since most of it is implemented except for arpeg.

craigsapp commented 7 years ago

But then don't forget arpeg 😃