I am working on a project that converts raw sheet music into MIDI, mp3 files. I did this because right now many of the sheet music players I have heard are very bad and I think I can do better. In any case I was wondering if there was a standard for storing sheet music. I know a lot of sheet is stored in pdfs. Is there another way people save sheet music something that is easier to read if you are a computer?

Thanks in advance!

  • 4
    Pretty much nope. There is MusicXML which is an open standard but it’s mostly used for import/export between music apps. Jun 22, 2023 at 14:52
  • 1
    You've got quite a challenge there—you're talking about OCR, Optical Character Recognition, and it's a lot harder for printed music than for verbal text. But people have already been working on it for decades. There's probably something you can drop into your project rather than reinvent the wheel. Jun 22, 2023 at 15:03
  • 1
    'many are very bad'… that's pretty much inherent in anything as hard-quantised & emotion-free as a raw score, just like a raw midi file. BTW, this project sounds rather like you want to make a better English/Chinese dictionary… all you need to do first is learn Chinese.
    – Tetsujin
    Jun 22, 2023 at 15:07
  • 1
    Oh yeah, and I don't mean to talk you out of a learning opportunity, but large companies have already put lots of money into this issue and have solutions that are acceptable to the industry, so the idea that one person in their own spare time will "build a better mousetrap" is unlikely. Maybe a better motivation is "Because I want to explore musical OCR and translation to MIDI for personal curiosity." Part of the problem that Testsujin is getting at is that only 50%-80% of a pleasing musical performance is represented on the page.... Jun 22, 2023 at 16:00
  • 2
    @AndyBonner Real sorry but I think this bunch of comments are not really adding to the question here but are more questioning if the question is sound (pun intended) and talking the op out of his/her/its goal. IMO the question is sound but questioning why someone would ask it is not really the subject..
    – Tom
    Jun 22, 2023 at 23:07

2 Answers 2


There are many parts to this problem. A PDF can be both a raster image, but it can also be made up of vector paths and text (as exported from notation software). But is does not contain direct information about music context. The task of turning the former into the latter is what is usually called OMR (as pendent to OCR for text). Note that this is a much more complicated task than OCR, because music notation is has more dimensions.

There are quite a few solutions that work fine, but you need to provide sufficient quality and the notation should not be too complex. Some software explicitly works with the output from notation software (containing vector paths and text), other software will even need to try to identify different musical symbols.

Apart from PDF the raster content can be any raster image format (e.g. jpeg), and the vector output can be any vector format, although here you’d usually have pdf.

Once you are past that step and once you have data of musical semantics there are many options of how to encode and store that data. MIDI is a format mainly for controlling synthesizers and thus does not encode a lot of information. It basically gives chromatic pitch, velocity and some control options. MusicXML is a format intended to be an open standard to store notation. This will be able to encode more than you need for playback, like exact positioning of elements. You can of course use any file format for any notation software, or even devise your own code.

So what would need to be done now is to estimate things like dynamics, articulation, phrasing, timing &c. from this representation and then use this to perform synthesis.

If you are looking for a "format that is easier to read for a computer" you’d automatically land at a format with musical context. Which probably makes sense, as you won’t probably want to do your own OMR system.

I’d suggest to draw an outline of what you want to priorise. E.g. you might not want to implement OMR or synthesis, as for both there do exists decent solutions. Rather maybe you might want to implement something that takes something like a musicXML and creates from this playback information, which could then be fed into a synthesizer.

  • Thank you so much this is great! Jun 27, 2023 at 16:04

If you're starting from a printed page of music PDF is the standard.

Anything 'easier to read' will already have been at least partially converted into computer-playable form. Your job is done!

But if you're asking what format you should use as output from your 'music OCR' program, it's pretty much got to be MusicXML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.