Jump to content

Convert dots to ABC? PDF to ABC?


Recommended Posts

There is piece of sotware called "scantailor" which I use to clean up and de-skew scans of electrical drawings (sometimes prior to converting to CAD files). It is not perfect but still quite useful, particulary for batch processing a set of drawings.

 

In terms of scan/pdf to a Music file the only one Ive tried is something called 'Omer' (optical music recognition) from Myriad software.

The only piece of music I've tried it on was an original arrangemet of 'A Nightingale Sang in Berkeley Square', and to be honest it did reasonably well in terms of percentage, but the remaining errors take ages to correct. Seems to get confused by slur lines etc, which that peice of music has lots of.

 

I've not tried it on a single note melody at all.

 

Caveat here - I've just checked on-line and there is a new version out, so I might try that at home.

 

It's quite likely that a modern Phone App more successful, and certianly easier as it combines many steps into one.

 

Link to comment
Share on other sites

On 6/17/2021 at 4:26 AM, gcoover said:

I have to second the recommendation for the iPhone app Sheet Music Scanner.

Sheet Music Scanner is also available on Android.

 

I have tried it on one clean PDF score and it was pretty good except that it did not recognise slurs or grace notes but it did produce a decent MusicXML file that I was able to import into Musescore and then easily add the missing pieces.  Scanning and exporting to MusicXML is no extra cost on top of a cheap (about US$3) app.

 

I have not tried it yet, but I do not see why EasyABC could not import the MusicXML file to create an abc notation from a scanned score.

Link to comment
Share on other sites

  • 2 years later...

I am resurrecting this topic as I am now attempting to convert my growing heap of pdfs to a much sleaker abc based database. I have done some research about it which I am now happy to share.

 

First of all, the discussion (at least on my side) is NOT about the pros and cons of being able to read traditional music notation. I can not sight read anything BUT the standard notation (not too well but improving). I see the merits of software based around abcs over pdfs (which are currently my musical data base) here (incomplete list):

 

- being able to transpose any piece which is important (among other things) when brass players try to play along

- use much less footprint, so exchanging abcs will burden the communication channels much less than pdfs or the brain dead MusicXML format

- Being able to index and search all parts of the files (title, lyrics, composer fields and so on).

- Being able to print the same score in different formats.

 

Converting existing scores by hand would be an option but cumbersome and error prone, in particular when several hundred tunes are floating around on the computer.

 

Soooo... apparently the gold standard is SmartScore64 of which I evaluated the Songbook version. It does a reasonably good job on most pdfs that were generated by music software, but there is still some post processing that needs to be done. There is more post processing that needs to be done when the score is scanned from a book pre-internet, and it fails pathetically for handwritten scores and scores photographed with a smartphone. Customer support also was frank in telling me that they support computer generated scores only.

 

From my understanding, all such systems work by converting the pdf to a TIFF file first and then analyzing every single dark pixel to determine where the staff lines, then the notes and everything else relevant might be. Frequently you can help the software by pulling a line along one of the staff lines so that tilted or skewed scores can be adjusted for.

 

Their biggest problem is dithering for which there are terabytes full of discussions, along with un-dithering software and very long explanations how to set up a scanner to eliminate or reduce dithering so the software has an easier job finding the lines and notes.

 

As of today, there is no satisfactory solution which would allow you to simply batch convert all of your pdfs to abcs and end up with the same stock of tunes in digital format without much pre- and post processing. Surprisingly, I would say, because the task of identifying music notation is not exactly rocket science. I would expect AI to do a much better job than the currently existing software solutions, so I am further on the look out.

Edited by RAc
Link to comment
Share on other sites

It would ideal if there were a web-based solution for this with an API that you could call with an image of sheet music and it would hand you back the notation in MusicXML or for my needs, ABC format.  

Having the ability to easily integrate a "Import Sheet Music" button on my ABC tool would be amazing. 

Link to comment
Share on other sites

I use Playscore 2, running on my iPad - point the camera at the score, listen to the resultant music, and export it as MusicXML to Dropbox. Then on a PC I drop the XML onto EasyABC to get ABC to sanitise and save.

 

Not trivial, and doesn't work for all scores, but does a good enough job on getting the melody across for most.

 

I agree a web engine would be good.

Link to comment
Share on other sites

The solution I have settled on for the time being is to query thesession, abcnotation and folktunefinder for existing scores that match my repertoire, fix them up if needed and hack all the remaining tunes (so far about 15%) by hand into Mozart, then fix up the exported abcs if need be. Mozart has a pretty intuitive and efficient interface for editing music, so after a very short warm up phase I was able to process between 6 and 10 tunes an hour. Whereever multiple parts are involved, music OCR would be a very nice option. 

 

Mozart is about 100€ for a licence which I gladly pay, being a software developer myself. EasyABC would not even start up on my Windows 10 machine, and Musescore requires internet access for vital functions which to me is not an option. The only missing feature in Mozart so far is the ability to combine several tunes into a set on a single page, but Dave (Mozart head developer, I guess) has committed to putting that on the TODO list.

 

Link to comment
Share on other sites

I use Sheet Music Scanner on Android (a few ££), which was mentioned by Don. It works on a downloaded PDF, image file, screenshot from a website, or a photo taken by the camera. That will play the music - either all voices or a single voice, which is important for me as as I play a duet. Then, if that sounds interesting I pass musicXML to EasyABC - via USB usually - to transpose for 42 buttons, muck about with, and print the score.

 

Davis Zemsky, author of Music Scanner, has been responsive to my suggestions for changes.

Link to comment
Share on other sites

I tried this about 4-5 years ago. Unfortunately, the software I used (I can't remember what now) produced a score such that I ended up in a right pickle! "...it would have been easier simply to copy out the score in ABC..." to quote HCJones. This is in fact what I do now...

 

22 hours ago, RAc said:

[1] ...I was able to process between 6 and 10 tunes an hour...

 

[2] ...Musescore requires internet access for vital functions which to me is not an option...

[1] This is pretty close to the rate at which I am able to do this - and I am by no means the worlsd msot copmetetn tpyits...

 

[2] Moi aussi! I finally gave up on MS when version 4 hit the streets. The only features which were of real interest to me for the fairly simple stuff I do were: using the sampled concertina sound font to get decent playback; and concertina tablature (which didn't work). Michael Eskin's tool now provides a very acceptable route to achieving both these goals.

 

I'm surprised you were unable to get EasyABC to run on a Windows 10 machine...

Edited by lachenal74693
  • Like 1
Link to comment
Share on other sites

3 hours ago, hjcjones said:

Do you find Sheet Music Scanner works reliably? The problem I have found with other scanners is that they require so much subsequent tidying up that it would have been easier simply to copy out the score in ABC. 

Music Scanner, the app on Android and iOS, works reasonably well for most modern typeset scores. Yes, you will need to do some tidying up and sometimes it misses something crucial that messes up the result completely.

 

This discussion has me thinking that I would really like to be able to quickly correct Music Scanner's result in Music Scanner itself and not have to post process the result in something else.  I will contact David Zemsky to see what he thinks.

Link to comment
Share on other sites

On a related front, since some of these image to notation conversion tools export to MusicXML, I added some experimental MusicXML import capability to my ABC Transcription Tools this morning.
 
You can now select a .musicxml or .xml file as well as .abc or .txt when opening files.

The code is live at:

http://michaeleskin.com/abc

It does fine on examples of traditional Irish tunes I found in musicxml format, and doesn't crash on much more complex scores, but ABCjs really isn't the ideal tool for multi-part orchestral scores as far as formatting.

So far it seems to not destabilize the core application, but if it does anything unexpected, I don't have a whole lot of ability to change its behavior.

You can configure the import parameters on this new sub-dialog of the main settings dialog:


image.thumb.png.40921cdd538bc947058779e25dd3497f.png
Edited by eskin
  • Like 1
Link to comment
Share on other sites

12 minutes ago, eskin said:
On a related front, since some of these image to notation conversion tools export to MusicXML, I added some experimental MusicXML import capability to my ABC Transcription Tools this morning.
 
You can now select a .musicxml or .xml file as well as .abc or .txt when opening files.

The code is live at:

http://michaeleskin.com/abc

It does fine on examples of traditional Irish tunes I found in musicxml format, and doesn't crash on much more complex scores, but ABCjs really isn't the ideal tool for multi-part orchestral scores as far as formatting.

So far it seems to not destabilize the core application, but if it does anything unexpected, I don't have a whole lot of ability to change its behavior.

 

Hi Michael, is there a way for your tool to print multiple tunes to one page (eg a jig set) instead of one tune per page? I enter more than one abc into the box. Otherwise that does look nice!

Link to comment
Share on other sites

I'll add the (strictly, off-topic) rider, that although this thread is about "Convert dots to ABC? PDF to ABC?", sometimes it's a matter of cleaning up existing ABC code so it conforms to 'modern ABC coding standards' (whatever that means).

 

I've found that sometimes, that ABC code is 'spotty', but that the score produced by that code looks fine. In such cases also, I tend to re-write the ABC code working from the score, rather than by attempting to clean up the original ABC code. Seems to work...

Edited by lachenal74693
Link to comment
Share on other sites

59 minutes ago, Steve Schulteis said:

 

What functions are those? I wasn't aware of anything like that, although I've usually got Internet access, so it's possible I just haven't noticed yet.

Probably the sound files that Musehub manages.  I did not like the smell of Musescore 4+Musehub so I have stayed on Musescore 3.  However, Michael Eskin's webapp looks more and more enticing.

 

Musescore now seems to have some sort of relationship with Ultimate Guitar (aka. the Muse Group ...) which is a for-profit company that seems to be trying to buy open source music apps (including Audacity) and using them as entries to their subscription services. 

 

I understand that Ultimate Guitar is headquartered in Russia.

 

https://en.m.wikipedia.org/wiki/Ultimate_Guitar

Link to comment
Share on other sites

2 hours ago, eskin said:
On a related front, since some of these image to notation conversion tools export to MusicXML, I added some experimental MusicXML import capability to my ABC Transcription Tools this morning.
 
You can now select a .musicxml or .xml file as well as .abc or .txt when opening files.

The code is live at:

http://michaeleskin.com/abc

It does fine on examples of traditional Irish tunes I found in musicxml format, and doesn't crash on much more complex scores, but ABCjs really isn't the ideal tool for multi-part orchestral scores as far as formatting.

So far it seems to not destabilize the core application, but if it does anything unexpected, I don't have a whole lot of ability to change its behavior.

A quick test.

 

I used Sheet Music Scanner on Android to convert the attached pdf of Glorishears that I recently downloaded from David Hansen.  I saved the output as XML and then imported that into Michael's app.  This is the abc that resulted:

 

X:1
T:Glorishears
L:1/8
Q:1/4=193
M:6/8
I:linebreak $
K:F
V:1 treble nm="Violin"
V:1
 c/B/ |: A>GF FEF | G>AG C2 E | G>AG GcB | %4
 A>GA FGA | B>cd cAB | c>de f2 e | d>cB ABG | %8
 F3- F2 c/B/ :| F3- F2 B/c/ |: d2 c cGA | B>cB B2 A | %12
 B>cd dcB | G>AG E>DC | F2 f f>ef | F2 f f2 e | %16
 d>cB ABG | F3- F2 B/c/ :| F3- F2 z |] %19

Observations:

 

Michael's converter produced exactly same result as was shown in Sheet Music Scanner and it plays the same.  So that is all good.  (The %4, %8, etc at the end of each line are just comments that number the previous measure).

 

This example does demonstrate a couple of shortcomings in Sheet Music Scanner:

  1. It does not recognise alternate endings for sections - annoying but easy to fix in Michael's app.
  2. It does not recognise chord notation at all so you would have to add this in by hand which would be fixable in Michael's app, but rather tedious.

On the other hand, it did a decent job on recognising the notes.

 

 

Glorishears.pdf

Edited by Don Taylor
Link to comment
Share on other sites

Sheet Music Scanner (Android) is capable of recognising alternate endings. It will (sometimes) play them, anyway, which is my main use rather than generating ABC.

 

I've been learning this - the pdf plays correctly here:

http://www.rudemex.co.uk/library/RM_arrangements/A Bruxa (Bm) (a).pdf

which is from here

http://www.rudemex.co.uk/library/RM_arrangements/01tunelib_RMarr.php

The ABC is here

http://www.rudemex.co.uk/library/ABC/01tunelib_abc.php

(I don't know if they're identical.)

Edited by DaveRo
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...