DDMAL / Neon

A web-based MEI neume editor.
https://ddmal.music.mcgill.ca/Neon
MIT License
25 stars 9 forks source link

Support creating ground truths in Neon #391

Open JRegimbal opened 5 years ago

JRegimbal commented 5 years ago

It should be supported for users to create ground truths using Neon without needing to manually supply one or more skeleton MEI files.

JRegimbal commented 5 years ago

The skeleton file for Neon would probably have to be something like this:

<?xml version="1.0" encoding="UTF-8"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title>Neon Skeleton File</title>
            </titleStmt>
            <pubStmt/>
        </fileDesc>
    </meiHead>
    <music>
        <facsimile>
            <surface></surface>
        </facsimile>
        <body>
            <mdiv>
                <score>
                    <scoreDef>
                        <staffGrp>
                            <staffDef n="1" lines="4" notationtype="neume" clef.line="3" clef.shape="C" />
                        </staffGrp>
                    </scoreDef>
                    <section></section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

It needs a <staffDef> to set the notation type and default clef information, a facsimile container so Verovio will detect it as being a facsimile file, and an empty section in which staves can be placed by Verovio.

JRegimbal commented 5 years ago

Note that this is stalled due to unexpected behavior in Verovio.

JRegimbal commented 4 years ago

Update the better part of a year later: an MEI file that would work for this purpose w current Neon would look like this:

<?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>MEI Encoding Output</title>
            </titleStmt>
            <pubStmt/>
        </fileDesc>
    </meiHead>
    <music>
        <facsimile>
            <surface ulx="0" uly="0" lrx="4414" lry="6993">
                <zone xml:id="delete-me" ulx="100" uly="100" lrx="1000" lry="1000"></zone>
            </surface>
        </facsimile>
        <body>
            <mdiv>
                <score>
                    <scoreDef>
                        <staffGrp>
                            <staffDef n="1" notationtype="neume" lines="4" clef.shape="C" clef.line="3"/>
                        </staffGrp>
                    </scoreDef>
                    <section>
                        <staff n="1">
                            <layer n="1">
                                <sb facs="#delete-me"/>
                            </layer>
                        </staff>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

Verovio (at least last year) doesn't like it when we try to go from 0 to 1 system, but going from 1 to 0 to 1 is absolutely fine apparently. So included is an obnoxiously large system to be removed before editing.

hajicj commented 4 years ago

Can confirm that this works. It would be cool to have a "start form scratch" option where this skeleton is used instead of uploading an MEI file. The use case here is not just ground truth creation, but manually encoding square notation documents in general (e.g. for small projects where OMR is not a part of the workflow).