This describes the beginning if this project; if you are here to see code and a working project, skip forward (if I have posted those). This installment is about the thought process leading up to it.
If you do not play an instrument, you may not believe this, but sheet music is haunted. Perhaps haunted by Murphy (of “If it can go wrong it will” fame).
Whenever you reach the end of a sheet of music, the Universe conspires against you – first, it will be a couple of measures that no matter how you try, your memory will forget at that moment. You will need to look at the page up until the last big of music on it. Next, as you reach to turn the page “stuff” happens — you turn two pages, the book falls closed, or off the stand. Sometimes it turns beautifully and as you start playing the next page — it flaps back.
Paper music is cursed. At least for me. So I wanted a better answer, and being of an Engineering bent, I turned to electronics. This is the story of the pursuit of an electronic sheet music reader, and along the same lines, building a library.
While building is always more fun than buying, the first thing I did was look for a pre-built alternative. There were a surprisingly large number out there. I will not try to do a review of them – I did not look deeply enough to do it justice, but will describe some of the issues I encountered and why I decided to build my own.
First – size matters. There are a lot of devices to mount typical tablets, like this image.
The idea is really nice, but the issue is physical size. For many instruments, where you need only one staff, you can enlarge the print size and make this work, but I find for pianos these fell into two categories: (1) ones that were single-page, and still marginal in terms of size, and (2) ones that were two page (horizontal) and just WAY too small. Remember a typical larger tablet is about 9-11″ diagonal. A typical sheet music page for piano is 14″ diagonal. Even with only one page to a tablet it means the notes get a lot smaller.
And I am spoiled — I like having two pages displayed. Plus, when it is time to change pages, having two pages displayed allows you to keep playing to the end of one, while changing page on the other side giving continuity.
Tablets have the advantage of being ubiquitous, relatively inexpensive (especially if you use an older one), light and have surprisingly good displays. I get why they are widely used. But I decided this just would not work.
So moving on – this left me wanted a larger, more conventional display. After all, a piano has a lot of area on the stand, a conventional monitor fits quite nicely. Let me jump to the end and show the final result in place:
It looks much like having a book open in terms of size, and (in this case) the color blends in. So this was my target, could I buy one?
The answer seems to be “maybe”. These seemed to fall into very specialized products that are generally very expensive (SightPad for example, though I could never find prices), or ones (for example MusicReader) which presume you already have the PC. One announced but not available uses eInk (like a Kindle), but was going to be well over $1000 (but looks very cool).
Some “All in one” hardware might be appropriate, where a PC is built into a somewhat fat monitor. Intended to be a “real” PC, they often are more pricey than needed for just a music display – faster processors, more capacity. These looked to be in the $500-1000 range, not really awful but pretty pricey.
In addition, these need software. I experimented with a few, and I came to the conclusion that I am pretty picky. Some of these appeared written by musicians who were bad programmers; some by good programmers who probably never actually used the product to perform. Some were decent, but I frankly just did not like them. Music Reader was a great example of the latter – it seems robust and well written and had most features I wanted, was affordable – I just found I hated the user interface. I did not find it intuitive; others may “get it” quickly and like it.
In experimenting I found I also needed to cross another issue – where was the library going to go. Indeed, how was I going to GET a library from all my paper? Many of these products have their own proprietary library. This can be nice, for example Music Reader will replicate that between paired copies of its software on different machines. But what if I wanted to change; how hard will it be to convert? Plus I had to figure out how to back it up (from my piano). Sure, Music Reader could do that by running on both the Piano and my Windows PC – if I remembered to start it periodically to synch. I wanted this to be simple.
I decided I wanted my library on my main Windows PC – it is on all the time, it is thoroughly backed up, raid drives, etc. I also wanted a more “open” library in case I wanted to change later. In experimenting, I also found that I would be doing PDF’s primarily; converting to a digital music form (i.e. individual notes as data) just was not viable for old sheet music, but scanning in old sheets is pretty easy.
Enter Calibre. If you are unfamiliar with it, it is an open source eBook library and reader. It is widely used, well supported, very stable. It also uses a “database” that is both open, and also preserves the actual documents unchanged (except perhaps the file name). This preserves my ability in the future to use my music elsewhere either by integrating with its (open) database, or just take out the PDF files. It also supports multiple format versions in case you get other format music. More importantly I already had it, used it, backed it up, etc. It keeps all my eBooks, even Kindle store ones (just in case the store disappears; never trust a cloud to always be there).
Once I got to this point – a bit frustrated with available products, and deciding I wanted an open library – I think i was committed to writing my own software.
OK, I probably was already there at the beginning, and looking for a project, but it was useful to go through the process and make sure I was not being completely foolish to build my own, even if the building is entertainment.
I looked again at All-in-one PC’s. Just two expensive, at least in comparison.
Small format PC’s, e.g. the Intel Compute Stick – pricey, and I noticed Windows was now available on the Raspberry Pi as the Windows IOT.
Back to Linux on the Pi. Microsoft will eventually get the IoT stuff right, but Linux and Pi are mature and usable now. I like the Raspberry Pi hardware, and the Pi 3 now has built in Wifi, making it even more handy for a piano system, since no ethernet cable required (to be fair the Pi 2 could have a small Wifi dongle attached which also works, but added some complexity and did not seem all that reliable).
The Raspberry Pi does not run “standard” linux (which is itself a contradiction in terms), but it is close enough to provide for numerous very usable development environments. I decided firmly then to use the Pi, and found a touch screen monitor for (relatively) cheap at Dell.
Why touch screen — because to access your library you really need a way to type. You do not want to scroll through hundreds of songs looking for one, you might want to type “Caberet”. But you do not want a physical keyboard either. Touch screen adds a lot to monitor cost. You can get (say) a 21″ monitor that is decent for $80. For a touch screen it is more like $300. I found a Dell S2240T 21.5″ touch screen for about $270. Ouch, but no good choices. Done.
Add a Pi and case and some cables and… hey, that’s it in terms of hardware. Well, other than needing a scanner to convert paper to PDF’s, but I already had a scanner.
So… hardware in or on order (Thanks, Amazon Prime), time to write some code. More on that in the next installment.