Tactile Music Box – part 1

The Concept

I was thinking about the problem of digital collections not being tactile enough, and came up with a project idea to make a digital collection physical.

nfc-readerSo the thought here (click for bigger version) is that 1″ square tiles, probably plastic, could have an album art sticker on one side and an RFID/NFC chip sticker on the other side. You’d have a 1:1 ratio of albums to tiles, so if you have a huge collection it might be problematic… or you could just do favorites to keep it more lightweight.

The project idea is a Raspberry Pi 1 or 2 with Kodi (formally XBMC) and an NFC reader. The NFC tags on the tiles would be programmed with the album ID, on scanning one, it would communicate with Kodi to bring up and play that album. I’d want to rig up some play/pause/next/prev controls, maybe buttons, maybe just an IR receiver and a remote.

The nice thing about using a Raspberry Pi is that with a decently-sized microSD card, the music could be stored on the Pi itself. So NFC reader, Kodi, and MP3s are all handled by the same device. The whole thing could be placed in one box, all you would need to do is connect it to HDMI or a headphone jack.

Playing music on the Raspberry Pi

After some looking around, I settled on MOC instead of Kodi, which is very lightweight and allows playing music on command line. I couldn’t quite get it to play a directory, so ended up converting a directory to a playlist and passing that to MOC.

My bash scripting is pretty rusty, but I cobbled something together that functions.

It’s called playah.sh, and passing it a path to a directory of music starts MOC and plays files in that directory.

if [ -z "$1" ]; then 
echo usage: $0 path/to/directory/with/music

# start the mocp service, if needed
if ! pidof -o %PPID mocp > /dev/null; then
mocp -S
# clear the playlist
mocp -c

# generate a playlist file from a dir search
find $MP3DIR/*.mp3 -maxdepth 1 > playlist.m3u

# add the playlist to mocp
mocp -a playlist.m3u

# start playing the files
mocp --play

# then control the playlist with these commands
# mocp --next
# mocp --previous
# mocp --stop

Next Steps

I am waiting for the NFC reader I ordered (coming from China), once that arrives, it’s time to get physical!

Managing Digital Media

In this modern life, a lot of our purchases are no longer physical, but digital. Although this solves a lot of problems (delivery, shelf space, etc) it creates a host of new problems. Let’s look at some.


First off, there’s just knowing what I own, which is not as simple as it might sound. Setting aside physical media for now (also important if I don’t want to accidentally buy a digital version of a book I have a physical copy of), here’s a quick rundown of media sources I own content (or licenses to content) on:

  • Music
    • Amazon
    • Google
    • iTunes
    • Steam
    • Humble Bundle
    • Ripped from CD
  • eBooks
    • Amazon
    • Sony (now defunct)
    • Barnes & Noble
    • Humble Bundle
    • StoryBundle
    • Kickstarter (direct downloads)
    • Comixology
    • Zinio
    • Dark Horse
    • DriveThruStuff
    • Various PDFs
  •  Movies
    • Amazon
    • Google
    • UltraViolet
    • Disney
    • Steam
    • Kickstarter (direct downloads)
    • iTunes
  • Games
    • Steam
    • GOG
    • Origin
    • Humble Bundle
    • Kickstarter
    • App Store

As you can see, just keeping track of what I own is hard. Oh, that game is on sale on Steam! Wait, do I already own that on GOG? There are undoubtably even sources I have forgotten from this list.

For the inventory issue, one obvious solution is if all the services offered an API, it would be relatively easy to write an aggregator library application which could serve as a central collection title browser. Alas, most of these services don’t have an API, so this isn’t possible. A few do, so some cobbled-together combination of API and manually entered data could be used. It would be a pain to keep manually in sync with services lacking an API, though.


The various services also have various policies regarding sharing content. Humble Bundle, for example, provides DRM-free files that you are free to do with as you wish. I bought a book bundle that included a couple books on programming for kids, I could simply download them and send them to my nephew. Amazon, on the other hand, is extremely restrictive – only certain content can be shared, and then it can only be shared one time and only for 14 days.

Taking a look at music, probably the best case scenario – it’s DRM-free and MP3 is a universal format that basically every device I own can play. I can download my purchased content from every service and collect them on a hard drive connected to a media server in my house. But even this simplest case is complicated by metadata issues, local network issues (occasionally requiring a restart of the media server and/or machine connecting to it), UI issues (for example, Roku’s file share browser is kind of terrible) and software issues (tricking iTunes into using a remote library to allow syncing music to a phone is error-prone). I’m a pretty technical guy, and not above upgrading hardware or software if it’s not working well, but it’s still not a seamless experience in my house – in fact it’s kind of annoyingly glitchy.


I touched on this already, but an important part of having a digital library (be it of music, ebooks, music) is being able to browse that content in a friendly and meaningful way. Some interfaces are ok, some are terrible. iTunes is pretty good for browsing a large number of albums, but browsing more than a handful of books on a Kindle is a poor experience.

Browsing digital libraries also lacks a tactile element that you would have when, for example, looking through a shelf of books. I’m not sure the right solution for this, but there might need to be a physical element added to the experience to feel comfortable. Digital collections can feel very abstract, and any visual (i.e. album covers), informative (comparative widths of books) or tactile (flipping through CDs and turning one over to see the back, reading dustjackets of books) interaction that can be added may help to make digital content feel more “real”.

Brave New World

Clearly, there’s no turning back from the new world of digital media – even CDs and DVDs feel somewhat antiquated now – but we need to ensure that the use of digital media remains intuitive and pleasurable. Right now it’s a jumble of interfaces, sources, and restrictions that need to be sorted out.

This is something I’ll be exploring further.