Remember to click G+1 if you like a post... It will make me happy :-)

5 June 2011

How to Scan Sheet Music

I had a go at scanning in a piece of sheet music this week... and what a journey of discovery it has been! I've scratched the scab off something horrible here and I thought I'd share some of the pain and the learning with you.

For today's lesson I'll be working with the Harburg/Arlen song 'Over the Rainbow' which is 4 pages at 24.8 by 31cm. More on this later...


I suppose the first question to answer is: why do it in the first place? That's an easy one: partly because I can; and partly because I was imagining some day in the not too distant future where I could flick through my sizeable collection electronically and enjoy it a whole lot more than I currently do (which is a lot!). And don't tell me that I could just buy electronic versions of the sheet music... perhaps I could for some of it, but it really wouldn't be the same...

Let's work on the assumption that this is a really great idea...

Viewing the Output

It might sound a bit odd, but the first place I started with this problem was to ask myself how I would view the electronic sheet music I'd be creating. As a starting point I just picked the iPad as my target device. I don't currently have one, but that's a different problem.

This got me into thinking about resolutions and dpi/ppi. Oh dear, my toes are curling already! Bear with me...

There are at 2 things that are important here:

1. How much detail the screen can display

Pixels Per Inch (or Dots Per Inch) is the standard way of expressing this. The more pixels, the more detail. The more detail, the better the experience.

The ipad screen is physically 9.56 by 7.47 inches in size. This displays 1024 by 768 pixels and so we can figure out the PPI using the following formula:

Square Root of (width in pixels * height in pixels) / (width in inches * height in Inches)

Based upon that, I get the iPad to be 105 PPI. Apple state that it is 132 PPI. At least one of us is wrong.

2. How close-up you are going to view the screen

Pretty much dependent upon how good your eyes are, although the length of your arms may also be a factor. ;-)

Now, clever people have put these two things together and worked out that for a device like an ipad, the optimum PPI is somewhere around 300 PPI. They figure that beyond that, your eyes just aren't going to notice a difference. Prior to the launch of ipad 2 it was rumoured that it would achieve 300 PPI, but in reality the screen didn't improve at all in this regard. But, let's face it, it's only a matter of time before they get there.

So... from all that, I figured that I should be aiming for achieving an electronic version that looks good at 300 PPI.

Electronic Format

Right from the start I never liked PDF as a document format. But enough people use it to make it the leading format for sharing documents on the internet. Apple don't like it, because they don't own it, but there are ways of viewing PDFs on the iPad and this seems to be the way that the world is moving.

So... I figured that I should be aiming for producing a PDF version of the sheet music.


Like most, my scanner can easily scan at 300 DPI. It actually goes right up to a heady 1200 DPI which would be great if only my PC could handle files that big. And here we hit a big electronic document conundrum: Lots of detail = Huge files.

We've already figured out that 300 PPI/DPI is optimum, so we're not going to go beyond that. That bit's easy.

[As an aside: I've found that scanning at the DPI I want to end up with produces the best results, rather than scanning high and then reducing in an image editor.]

But even 300 DPI produces huge files. To give you some idea: The front cover of 'Over the Rainbow' was into the hundreds of Mb if saved in an uncompressed format. Obviously we're going to want to compress the pictures in some way.

The defacto standard compressed image format is JPEG. The amount of compression you apply is purely up to you and how big you are prepared to go with the size of your files. Of course, compression does come with a cost, and that cost is that you start to lose detail... so there is definitely a balance to be made. Personally, I didn't really want to be above about 3Mb for this little project so I let this drive the amount of compression I applied.

So... I figured that I would scan all my images at 300 DPI and save them as JPEGs with hefty compression.

[Note: I did experiment with taking photos of the sheet music, which has the potential to produce a far better, more lifelike image, but I had problems with lighting and barreling in the images - i.e. distortion - which I found just too much work to fix. For some sheet music though, like the ones that have metallic ink, this would be the only way to go.]


By wrangling, I mean messing about with the images in an image editor.

The general consensus is to do as little of this as you can get away with, but it was unavoidable for me... My scanner isn't big enough to scan the sheet music I wanted to scan; A single page is bigger than my A4 scanner can handle. I picked this piece on purpose for that reason. I had to do half a page at a time and stitch the results together.

What a pain in the arse! But I did it, and the end results aren't too bad.

The only thing I did other than that was to balance the colours/contrast etc. and ensure that the JPEGs for each page were exactly the same size.

So... I ended up with 4 JPEGs: 1 for each page, ranging in file size from 580Kb through to the largest (the cover) at about 680Kb.


I downloaded some free JPEG to PDF software which... ahem... turns JPEGs into PDFs. The important bit here is to use software that simply takes the JPEG and packages it in the PDF container, rather than to re-process the image in any way. The sanity check is that the file sizes of the JPEG and PDF should be pretty much the same.

That left me with 4 PDF files (one for each page).

I then downloaded some free PDF merging software to merge the 4 PDFs into a single PDF. The end result was a 2.3Mb file.

And there you have it... an electronic version of the sheet music!

[Update: Here's a link to some fantastic software that you can use to create multipage PDFs in one go. The beauty of this one is that it is easy to retain the original dimensions of the JPEG.]

The 2 pictures in this post are the actual JPEGs of the front and back that I produced, to give you a feel for the sort of quality I achieved. I'm yet to see the end result on an iPad... anyone want to buy me one?

The Final Verdict

Although the output is okay... It took bloody ages! I don't know if I can be arsed doing any more... I've got thousands of pieces in my crate!


I did do some research into the legality of making electronic copies of sheet music you own, and it appears that this is okay. Obviously, sharing them is a big no-no.

Over the Rainbow

Let's wash away all that technical crap and get back to the music itself. I did a bit of digging on this particular piece of sheet music and discovered a copy listed on eBay by this guy in America. He's obviously a lot more knowledgable about it than me. Here's what he said:

Before MGM's release of The Wizard of Oz movie in 1939, Leo Feist issued sheet music for six of the songs from the movie. Over the Rainbow was the most popular, the US version fairly common. This scarce British printing is much more colorful, with an eye-popping scarlet cover and a great image of Judy Garland as Dorothy. Also includes character images of the Wizard, the Witch, Scarecrow, etc.

Four pages, including cover. The main piece has piano music, guitar chords, and the lyrics. There are also some other musical notations I don't recognize. The rear cover has a piano accordion solo of Over the Rainbow (that sounds interesting!) "Authorized for Sale in the British Empire, exclusive of Canada" in the bottom corner. With a 1939 Leo Feist copyright.

Ooh... and he wants 30 quid for it!

[Update 27-Jan-21013]

Well done for getting this far! I've returned to have another go at scanning sheet music... this time with the benefit of access to an iPad to judge the end results.


  1. I know it's been quite awhile since you posted this; but I am wondering how this project progressed. I am looking at converting my LARGE sheet music collection into digital mainly because of space issues and I'm not sure about the best way to do this.

  2. You're in luck Heather. Having left this for ages, I tried scanning again just recently with a slightly different technique. Check this out...
    Shout if you've got any questions and thanks for commenting...

  3. We sheet music scanners need to form a syndicate! I hate to think of the boxes of old paper crumbling away.

  4. I'm with you Danno! I love sheet music and I can't even read music! Ha ha. I love the look and feel. I've put all mine in plastic folders to try and keep them safe.

  5. Have I got a gift for you! Really need to deal with about 300 pounds of sheet music!

    1. My wife would murder me Dee, but you know what? She doesn't read my blog! ;-) ha ha. Happy to take it off your hands depending on what you be got and where you are in the world. Just let me know