DIY Hands-Free Sheet Music

Never lose your place, with a flat-panel monitor and foot pedals

4 min read
DIY Hands-Free Sheet Music
Photo: Ryan Matthew Smith

As an old-school writer, I prefer my reading matter printed and bound. But as an avid piano player, I am sick to death of music books. The music stand on our Baldwin grand piano holds a few pages laid side by side just fine. But most piano music is sold in songbooks: double-sided pages bound to inflexible spines. These books close up on you midsong when they are new; they fall to pieces when they get old. And playing complex music without interruptions is virtually impossible unless you have an assistant to turn pages for you.

Tinkerers since the early 1900s have patented myriad mechanical page turners to address this problem, but to this day they are generally considered a pain to load, noisy, and unreliable.

After years of growling at my misbehaving music, I finally resolved to create my own solution. I set the bar high. The system should work with all of my music books, allow annotations, and turn pages while my hands remain securely on the keys. It must be big enough to show two pages of notation sharply at full size, yet compact enough to fit on my piano’s music stand. I wanted something self-contained that would work with a digital keyboard when I play with a band. And I didn’t want to spend more than a few hundred bucks.

Clearly, the key was ditching print in favor of pixels. I lugged my boxes of books down to a copy center, and for US $30 they ran them through a guillotine to slice off the bindings. I then used a Fujitsu ScanSnap document scanner (modified to accept large pages) to convert the books into PDFs. Calibre, an open-source e-book library organizer, let me tag and sort scores by genre, difficulty, composer, and so on.

It was less obvious how best to display the scanned scores. Many people use tablets such as the iPad for this purpose, but none are big enough to display two typical 23-by-30-centimeter (9-by-12-inch) pages at full size. All-in-one computers are either too bulky to fit on the piano or exceeded my budget. What I need, I thought, is a thin, no-frills 24-inch monitor—and a cheap computer.

It occurred to me that a $35 Raspberry Pi might have just enough computing power and that I could tuck both the Pi and its cables out of sight behind the monitor, which I acquired for $170. Assembling the pieces was straightforward: The Pi, its case, a wireless mouse receiver, and a USB receiver for a pair of $80 wireless foot pedals all fit neatly onto the back of the display, held in place with Velcro strips. I ran a small bundle of power and Ethernet cables to a power-line network adapter, along with an audio cable to a separate amplifier for playing MP3 backing tracks.

The Pi runs Linux, so I had reams of open-source software to draw on. Only an obsolete version of Calibre had been released for the Pi in a precompiled package, so I had to download the latest source code and compile it, a tricky process that took several hours. I discovered that although Calibre is very good at organizing PDFs, it renders them too slowly when running on the Pi. So I turned to another open-source program called qpdfview, a streamlined app that prerenders upcoming pages.

I loaded the Duke Ellington song “It Don’t Mean a Thing (If It Ain’t Got That Swing)” and began playing. A bar before the first page turn, I tapped on the foot control. The next two pages appeared nearly instantaneously. I paged back with another tap—it was working!

But two problems emerged. Each time I finished a song, I had to pick up a wireless keyboard to close the PDF and return to the Calibre score library. And sometimes when I tapped the foot pedal, it sent two forward or back commands rather than just one, a classic case of contact bounce. I needed to filter out page-turn signals that arrived in quick succession.

To tackle the first issue, I dug through Linux software libraries and discovered voicecommand, a utility that hooks into Google’s speech recognition server to allow the Pi to interpret spoken commands and utter responses. I hooked up a USB webcam for an audio input, and before long I was having conversations with the piano.

“Baldwin?” I would say.

“Hello,” it would acknowledge in a pleasant voice.

“Change songs.”

After pondering this for about 10 seconds, voicecommand complied by executing a command I had preprogrammed—sometimes. Just as often, it replied, “I do not understand.”

This was no good, and the futility of this approach became clear as I launched into Gershwin’s jazzy “I Got Rhythm” and voicecommand, mistaking the music for speech, chirped along, “I do not understand...I do not understand...”

More searching led me to the Brightside and xdotool utilities, which offer a better way to eliminate the keyboard. Combining them, I set up the system to load a new song by executing a sequence of commands whenever I moused the pointer into the upper right corner of the screen.

Debouncing the pedal signals was more straightforward: I got the source code for qpdfview, modified it to accept only one page-change command every second, and recompiled.

Now, a run-through of “I Got Rhythm” zips along interruption-free. And as an added bonus, the Pi can accompany me by playing prerecorded bass and drum parts on certain songs—and act as a Web server through which I can access any piece of sheet music from my library when I am away. It’s music the way I like it: unbound.

This article originally appeared in print as “Hands-Free Sheet Music.”

This article is for IEEE members only. Join IEEE to access our full archive.

Join the world’s largest professional organization devoted to engineering and applied sciences and get access to all of Spectrum’s articles, podcasts, and special reports. Learn more →

If you're already an IEEE member, please sign in to continue reading.

Membership includes:

  • Get unlimited access to IEEE Spectrum content
  • Follow your favorite topics to create a personalized feed of IEEE Spectrum content
  • Save Spectrum articles to read later
  • Network with other technology professionals
  • Establish a professional profile
  • Create a group to share and collaborate on projects
  • Discover IEEE events and activities
  • Join and participate in discussions