OMR Scripting tools for Measure Segmented Images and Sound Files
Hello, I am looking if there exists, and if not, looking for tips how could I develop and contribute with a tool for:
Given a music.xml file produce a set of images, each containing a single measure, and a set of sound files accordingly.
I am interested in OMR problems and this would come in hand for dataset preprocessing.
Comments
It would be doable in MuseScore. Given a file music.xml.
mscore music.xml -o music.png
mscore music.xml -o music.wav
mscore music.xml -o music.mpos
In
music.mpos
, you will find a json structure containing the bounding box of measures in the PNG files and the corresponding time in the wave file. A short script in your preferred language should be able to export individual measures and individual wav files.In reply to It would be doable in… by [DELETED] 5
The .mpos (as well as the .spos) file is an XML file, not a JSON file. And IIRC it doesn't give time corresponding to event time in the wav, only time offsets in ticks * 1000.
In reply to The .mpos (as well as the … by rmattes
XML indeed but it does give time in milliseconds in the wave file.
In reply to XML indeed but it does give… by [DELETED] 5
What units are the graphics in?
For
mpos
, I get…… which looks like x 〈 sx and y 〈 sy so this seems to span a rectangle from (x,y) lower left to (sx,sy) upper right, but the canvas size is 2480x3508px in total, so it cannot be pixels.
For
spos
, things are weirder… the same score gives…… in MuseScore 2.3.2, and…
… in MuseScore 3.2.3 (I suspect a bug here, or a missing layout pass before exporting?).
Again with the weirdly high numbers, but x is no longer floating point but integer… and completely different from
mpos
. How do I interpret these numbers? (page
is obviously the index in the basename-number.png minus one.)