Please give me a jump start: musical recognition today; measure counts in Musescore/Midi

• Jan 4, 2021 - 03:40

Several years ago (version 3 was just in beta or pre-beta) I scanned all my sheet music to PDF, and a few songs I converted into Musescore using Music-to-Xml (which is now SmartScore I think from Musitek). It worked only fair at best.

I also did some Musescore customization to include in exported MIDI output a measure number (if you output honoring repeats otherwise it cannot match actual measure counts on the page). Somewhere I have the code still. I think I also had to do something special to output just piano (which I wanted) from score which had a vocal staff, otherwise it output that also. I think.

I now have more spare time and plan to digitize more of my music from PDF's. I have paid zero attention to this world over many years. Can someone give me a jump start:

  • What is the most accurate way to convert piano music on PDF's into something I can take into Musescore and fixup and export as cleaner PDF's and MIDI? I never want to say cost is not an issue, but cost is not the driving factor, I have hundreds of sheets I would like to convert, so accuracy is more important. Piano (2 and 3 staff) only.

  • I don't suppose anything has happened that will let me match midi measures exported to measure numbers on the Musescore score (honoring repeats)? I can resurrect my code if not, but I certainly do not want to recreate a wheel.

Thanks for any pointers.

Linwood


Comments

There is nothing new on the PDF import front except the PDF import tool works a little better that 2 years ago.

For matching the score measure to midi measures, there is now the Unroll repeats under the Tools menu which I believe is what you are asking for. The result is a new file that you can save separately or close without saving but it has no effect on the score it is made from.

In reply to by mike320

Interesting, I do not recall there being a import PDF tool in the Musescore world when I last looked, I will give it a try. My question was really aimed at 3rd party tools as I thought that was all that existed, but all the better if there's one semi-built-in.

I don't recall if Unroll Repeats was there, but that is not really what I want. Let me elaborate just a bit in case there is a better way to do what I want.

Eventually whatever viewable score I produce will get exported as PDF and loaded into a (home grown) music reader, which displays on a touch screen on my piano (pedal or touch screen for page turn). I want to be able to play from that PDF myself.

This music reader ALSO has a midi player integrated with it, and my piano can be driven by MIDI. So when I export the PDF, I also export a MIDI file, and in the music reader I can let the midi take over playing, including starting at a specific point (e.g. if I want to hear complex timing of a refrain). The two are tied together by measure numbers, the viewable (not unrolled) score just includes Musescore's default measure numbers, and the midi player displays the current measure, skips to that measure if requested and plays.

This works fine except on repeats. What I did in the past was change musescore to output a MIDI comment (I forget the actual term but something like that) with the print version's measure number in the MIDI file, and then changed my MIDI player to search for it. Thus measure "35" might appear twice in the MIDI output, and in a sequential playback would be shown twice (just as the human eye will encounter it twice in honoring the repeats) and can be searched and used as a restart point also based on context. It works great to tie the visible score to the midi score for someone playing.

But I am not wedded to that technique. However, I really do not want the human score to be unrolled, I'd rather practice playing with conventional notation.

In reply to by Ferguson

Just for a historical overview, several years ago would have probably been in version 2. The PDF import tool has been in existence since at least 2.0.3 when I started using MuseScore regularly. The unroll repeats tool is a version 3 addition (sometime around 3.1). This tool basically unrolls the score so it looks like it's played when exported to midi. I thought that might be a useful tool for what you are trying to do but I'm not familiar enough with your goals to know for sure.

The integration between PDF and MIDI playback sounds very interesting. There have been several discussions about how this could be done in MuseScore but it's not currently part of the program. It would be a great addition to the program's capability to be able to tell MuseScore to start playback on the 2nd time through on a repeat or the 3rd time through on a repeat nested within a DS or DC.

I'm a program user not a code writer so there is much related to this that I can't help you with.

In reply to by mike320

Thank you. I looked, my last attempts were early 2017. Maybe the PDF input was there and did not work well, not sure why I did not use it. I just tried it on a really clean sheet and it was... fair. It missed a few notes, surprising as the PDF was really clean.

Anyway... I was not trying to change musescore's behavior for playback, though that is an interesting thought. At the time (and I do not recall why) I dismissed using musescore itself to drive the midi playback, and wrote my own. I need to revisit that, consider using Musescore as the midi player perhaps, and then let it just show the scrore as it plays. I'll have to rig something up to do that. It may have been horsepower, my early implementations of the music reader on the piano were on a Raspberry Pi, but I've moved on to a (clone)NUC, and could replace it with a more powerful one if needed. I'll explore that next.

Thank you for the update and leads on what to look at next.

If anyone has suggestions for a more error-free PDF conversion, please chime in.

In reply to by Ferguson

"If anyone has suggestions for a more error-free PDF conversion, please chime in."
For years I have used the venerable SharpEye for optical music recognition. Unfortunately it's a commercial product, so definitely not available for free. The interface also looks a bit like an old DOS program... and there is a bit of a learning curve. More details on their website:
http://visiv.co.uk/

SharpEye works best with single-page black-and-white 300 dpi TIFF files as input. SharpEye claims also to work with BMP files, but I never had any success with that format. Nor does SharpEye handle PDF files at all. But I can get 90-98% correct recognition, which IMO is better than the built-in Audiveris PDF import offered in MuseScore.

In reply to by DanielR

Thank you, will look. There's decades of investment in the sheet music, so paying a few dollars to convert and clean up the images would not be an issue. I'll put them on the list. I also tried to try Sebilius First, but can't get it out of "review" mode... what the heck is wrong with vendors ho make it hard to use FREE software due to licensing issues!

So I managed to resurrect my programming changes to midi output so I can do that part again. I may post in the development forum on that.

I've looked at the Musescore web PDF importer, and also have tried PhotoScore (Avid) and SmartScore (Musitek) and SCanScore. I looked briefly at SharpEye but it looks like it has not had development in 20 years or so.

Photoscore seems best so far, though Avid is horrible -- their darn Avidlink pops up advertising in my face all the time it's open, and from what I read that's true even if you buy it. But I may end up with that. It has some good sanity checking, and most of its mistakes were voicing (and so timing), e.g. it would put a rest for voice 2 in voice 1 throwing both off). I don't recall it missing any notes, or very few.

SmartScore was just a bit worse at everything, it missed more notes (not wrong, just gone), and while it also flagged timing issues (which is a good indicator of a bad note) it seemed harder to know what was wrong, which voice, etc. And harder to fix. But some of that may just take familiarity.

ScanScore seemed similar to SmartScore, maybe a bit worse. It certainly was screwy in how you change voicing (e.g. if it imports incorrectly), nothing seemed to work (there is a change voice, it just ignored me).

So I think I'll get a copy of Photoscore, even though Avid is annoying and it's expensive. HOWEVER....

They won't let me trial saving. I need to save to XML and import into Musescore to do my midi export (through my customizations), and it is aimed at Sibelius. I don't want or need Sibelius. But... I have no idea whether its Music XML is any good.

So... Does Anyone Have Photoscore who can comment? Or process a couple pages for me? I'd hate to buy the most expensive product and then find out it munges the XML formats.

In reply to by Jojo-Schmitz

Jojo, if you are asking me: yes, I did download and try Audiveris on my PC. It was about a year ago, and I was disappointed. Should I try again?

[EDIT] ... and @Ferguson could try Audiveris for free before spending money on a commercial product. Perhaps that was your (valid) point?

In reply to by Ferguson

Let me catch up -- and thanks everyone.

First, I realized I had a Music-To-XML license from many years ago, which gets me half off Smartscore, putting the cost difference at $89 vs $249. Seemed like cheap enough to give it a more thorough try so I ordered it last night. I'm annoyed I have not gotten a key yet. If that doesn't work...

@DanielR, thank you. If Smarscore ends up not working well, will reach out and send you a medium quality PDF to see how it goes. Just run it through and export, do not clean it up; I see how cleanup works, it is the XML formatting I want to see.

@Jojo-Schmitz, no, I did not. I guess I assumed it was the released version (from 2018). Is it not? I see they have a new release planned, I guess I could pull the in-development moving target and try to get it running. Is it worth the effort? Is it that much better than the online?

Again, thanks for the feedback.

Do you still have an unanswered question? Please log in first to post your question.