Rewind: This Raspberry Pi cassette player plays Spotify tunes from actual tapes

raspberry-pi-tapes-1.jpg
Press play for Spotify tunes thanks to Matt Brailsford’s Raspberry Pi-powered tape player and NFC cassettes.
Matt Brailsford

Remember what it felt like to press play and record at the same time? Back before streaming and downloading and blogs and YouTube, music meant CDs and Smash Hits and the NME and taping off the radio — and this delightfully retro Raspberry Pi creation recreates that physical connection with music for the 21st century.

Raspberry Pi is the low-cost computing system that allows you to build all kinds of bespoke gadgets from basic components, teaching novices how to code and limited only by your imagination. British developer and maker Matt Brailsford has used the DIY system to combine the technology of today — Raspberry Pi, Spotify, and NFC tags — with the retro tech of yesterday to build a media server that streams different playlists when different cassette tapes are inserted. Hit play on the video to see how it works:

CNET caught up with Matt to find out why he combined old and new tech, how he created the next-generation tape player, and how a rapping cartoon cat figures into all this.

What was your inspiration?

A friend of mine happened to tweet about a gift he had received for his birthday called the iRecorder, which is a speaker for your iPhone in the style of a cassette player. That brought back tonnes of happy memories of creating mixtapes for (potential) girlfriends, and recording the charts every Saturday while trying not to get the DJ’s voice in the recording — an art form I was particularly good at — and it reminded me of how substantial these types of players were back then. Large chunky buttons, which had a level of resistance when you pressed them, not like your rubber or touch sensitive buttons of today.

With those memories flooding back, I thought why not actually make the iRecorder for real? A digital music player, with as much of the original player’s touch-and-feely nature as possible and so this is what I came up with!

How does the media server/tape player work?

Inside the cassette player, all the standard components have been removed and in their place a Raspberry Pi and several helper modules have been added: an NFC tag reader, which you can just see through the hole in the metal frame top left — the red printed circuit board (PCB); an amplifier which is the blue PCB below that — the original volume potentiometer is connected to this to control the volume; and a custom circuit board to connect the buttons of the cassette player to the Raspberry Pi’s General-purpose input/output (GPIO) via micro switches glued beneath the buttons.

raspberry-pi-tapes-6.jpgraspberry-pi-tapes-6.jpg

Matt Brailsford

The Raspberry Pi itself is running a version of MusicBox that has all the Spotify streaming features built in. A custom module was written to handle the button presses, and read the NFC tags that are stuck inside the cassettes to select the playlist to play.

When the player is turned on, MusicBox starts up and loads the custom module, which then waits for Spotify to connect and loads a list of spotify playlists into memory. It beeps while it’s waiting.

When a cassette is then loaded into the player, the custom module reads the tag’s ID and looks for a playlist associated with that ID — to associate a Spotify playlist to a cassette, simply add the tag’s ID somewhere in the playlist’s name — and if one is found, it is set as the active playlist. Then whenever a button on the player is pressed, the cassette player performs that action.

raspberry-pi-tapes-4.jpgraspberry-pi-tapes-4.jpg

Matt Brailsford

Play, Pause, Stop, Next, and Previous are all supported, with a beep noise to signify the command has occurred. If a cassette is removed the custom module will detect this, give out a beep, unload the active playlist and stop any playing tracks, and wait for a new cassette to be loaded. All cassettes are also double sides, so you can have Side 1 and 2 playlists for each cassette, just like when you were a kid!

How long did the project take to complete?

I think it was two or three weeks (I forgot to keep track). The majority of the time was spent figuring out the best way to lay everything out internally as there wasn’t much room, and gradually removing internal components if I was certain they wouldn’t be needed — it’s not easy putting stuff back you Dremel-ed out if you get it wrong — as well as choosing the best or most space-friendly components to use.

The most ambitious Raspberry Pi projects (pictures)

+4 more


See all photos

Easy as Raspberry Pi

Writing the custom module wasn’t too bad as I had a few example code snippets to work from already — one for reading NFC, one for working with the GPIO, and one as a basic module for MusicBox.

All the rest I either worked out from the documentation, or from the community on the Mopidy and MusicBox forums (who are super friendly and helpful by the way).

NFC has a lot of potential but hasn’t quite caught on yet; how do you think NFC will develop?

To be honest, this was my first attempt at using NFC myself. I just knew I needed a way to detect the cassettes without the user having to tell it anything, purely by the cassette’s presence, so NFC worked great. It’s easy and cheap to expand too — just buy more stickers and more cassettes. Heck, the cassettes are more expensive than the tags nowadays.

I think NFC just needs more creative people to play around with it. We all know of its uses for boring things like keyless door entry systems, or security tags in retail stores, but it has so much more potential, especially with the Internet of Things (IoT) becoming so prevalent in everyday devices. Having a cheap and easy way to identify “things” is a great feature to have. For me it’s about integrating it in a way that is just logical, but you don’t even know it’s there — like a device that knows when a cassette is put into a cassette player for example!

What was the first tape/record you ever bought?

Oh god, I don’t know what’s more embarrassing, the track itself, or the fact I still know all the words. The first cassette I ever bought for myself was “Skat Strut” by MC Skat Kat — you know, the animated cat from Paula Abdul’s “Opposites Attract” video. See, told you. And no, I won’t sing it for you.

What other Raspberry Pi projects are you proud of, and what’s next?

I’m actually rather eclectic and like to jump from platform to platform dependent on the needs of the project I’m working on, so this has probably been my biggest Raspberry Pi project to date. However, I am currently looking at converting a robotic Luxo lamp I built for a different platform to run from a Raspberry Pi so that is definitely high up on the list.

If your UK readers are interested in seeing either the cassette player or the Luxo lamp in person, then keep an eye on Barnsley.IO — a maker group I have set up in my local town of Barnsley, Yorkshire — and events throughout the country such as Derby Maker Faire this weekend, York Raspberry Jam the following week, and Maker Day Sheffield in November, as they often make personal appearances.

You can keep up with Matt’s latest geeky projects on his YouTube channel or at his new blog circuitbeard. For a look behind the scenes at Raspberry Pi, check out our Adventures in Tech: The Making of Raspberry Pi.

Check Also

The M2 MacBook Air Is the Ultimate Laptop Gift

This story is part of 84 Days of Holiday, a collection that helps you find the perfect gift for anyone. Over the years, I’ve often described Apple’s MacBook Air as the most universally useful laptop you can get (or in this case, give). The latest version, now with Apple’s new M2 chip inside, hits the fresh …

Leave a Reply