Score Scanning: my digital workflow for PDF editing with GIMP

A topic that’s probably of limited use for most people, and limited interest for even fewer: how I batch-process scans of my scores for digital editing.

I write all my scores by hand. Always have. I wish I could wax lyrical about Craft, or Thinking Through One’s Own Hand… but it’s a bit of a pain in the arse and, honestly, it just happens to work for the way I think and my process. I don’t think there’s anything special about handwriting over digital, it just happens to work for me.

The workflow has been the same for years: sketch in notebooks; mock-up frameworks and structures; write the draft; rewrite the draft; ink it; scan it; digital post-processing to clean up, make tweaks and, ultimately, send it off the PDF. While it might not be the sexiest bit of the workflow, dealing with pages of scans, and cleaning them up always feels the most time-consuming. So I have some automated tricks as a workaround.

Okay, this post is really just for me to record my workflow. For some reason I keep losing the .txt file on my computer that reminds me of the command-line arguments.  I’ve recently made the move away from using Photoshop with macros. I’m now using GIMP, and I’ve got a simple little set of Python plug-ins to help automate the process. Here’s the plan (files on GitHub):

  1. Scan the score (a single, multi-page, PDF file).
  2. Split the PDF into individual PNG files (pages)
    • This is easiest in the command-line using ImageMagick and Ghostscript:
    • convert -density 300 input-file.pdf %02d-output-page.png
      • you could add an ‘-auto-level‘ call in between the input and output files to have ImageMagick handle the level balance.
      • in the past, I’ve also had a lot of luck with the pdftk server
  3. Automatically balance levels of the PNG, prepare it for editing (XCF file).
  4. I do my editing/clean-up in GIMP.
  5. Flatten the XCF files down to PDFs.
  6. Merge the individual PDF pages back into a single PDF document.
    • This is easy: if I’m on a Mac, Preview can do it. Otherwise, Ghostscript:
    • gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dAutoRotatePages=/None -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dDownsampleMonoImages=false -dDownsampleGrayImages=false -sOutputFile=finalEditedPages-Merged.pdf *.pdf
  7. Done.

Pretty riveting stuff. This is always the point in the process where I swear that I’ll learn Sibelius or Finale for the next piece…

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.