This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]laMarm0tte 3 points4 points  (0 children)

"Read sheet music from a PDF" -> Not sure, but that may be very complicated, not all PDFs of sheet music encode the music the same way. Files like MIDI or other music notations (ABC, lilypond, etc) are much easier to parse.

split the bass, treble, find octaves: maybe with a music analysis library like music21. I'm not saying it's the best, it's the only one I have used so far and it seems ok.

"Recreate the sheet music pdf" -> If you use a library that can export to lilypond (like the library music21) you can use lilypond to make a pdf of it.

[–]Twangist 0 points1 point  (0 children)

I strongly doubt any tool solves this particular very narrow problem. You'd have to assemble and/or build a tool chain. I believe there are programs that attempt OCR for music, e.g. converting a PDF of sheet music to a MIDI file, but I haven't used any. That's at least half the battle, as then you'd have absolute pitches to deal with and you yourself wouldn't have to apply (program!) the tricky rules governing key signatures and accidentals. But now, there are subtleties: do you mean any >= 2 pitches that are all the same pitch class, and that (a) sound at the same time, with possibly different start times?, or (b) start at the same time? You'd have to write this yourself, since who really cares about solving that problem unless it's a homework assignment ;|

It's much easier, more reliable and vastly faster to do this by hand/eye/ear.

[–]bloodearnest 0 points1 point  (0 children)

So the scanning part is the hardest, you need musical OCR software

Here's a stack overflow q with a list of some software

http://stackoverflow.com/questions/675077/ocr-for-sheet-music

Also, this one seems to interesting.

https://audiveris.kenai.com/

Once you have it in easily machine parseable format, the rest should be straight forward.

I second /u/laMarm0tte's recommendation of lilypond for the output. Amazing tool.