Digression #1: SqueezePi

I’ve wandered away a bit from Pi synthesiser exploration, and spent some time on another Pi audio project – the SqueezePi!

IMG_20140829_192321

As a long-term owner and user of a couple of Slim Devices Squeezebox networked digital audio players, I’ve been feeling let down by Logitech’s purchase of that company and its subsequent discontinuation of the products. So I set myself the challenge to see if I could create an equivalent to the Squeezebox Radio or Boom players – taking inspiration from the work of others on open source versions of the software, and the efforts to get that running on the Pi.

In this post and subsequent ones, I’ll provide a potted, illustrated history.

First steps: Software and Key Goals

Fairly quickly, I discovered SqueezeLite. This is a free Squeezebox compatible player that has been successfully ported to the Pi in various Linux distributions. There’s a good thread about it on the Pi forums. I used a prebuilt (now deprecated) binary version.

It worked straight away on the Pi with my existing Squeezebox server – and I’m using it still (I should really attempt to build it from source soon, though).

So that got me off to a good start. Now some forward planning was in order…

To be as standalone as the real Squeezebox players, I was going to need some sort of dedicated display on the Pi. Also some push switches and a rotary control, analogue audio output to amplification and speakers, a power supply to drive the Pi and amplifier, and a nice case to package it all up. I drew up that list and began investigating my options.

Display

I was already aware of a wide range of dedicated displays for the Pi – many easily affordable and fairly easy to set up and use. But to be like the original Radio player, the display would have to be colour, which led me to research the various small TFT LCD displays for the Pi. So I decided to try the Adafruit 2.8″ TFT LCD which had the added bonus of a (resistive) touch screen – so my SqueezePi would be a blend of the Radio, Boom and Touch players!

I ordered one from the marvellous folks at ModMyPi, and on its prompt arrival dusted off my soldering skills and put it together. This was a little nerve-wracking, but ultimately more straightforward than I feared! The Adafruit site provided all the info and software needed, and I easily had it up and running in under an afternoon. I also soldered on some small push switches onto the display’s circuit board that I could try as dedicated controls for the SqueezePi.

With a little research, I was able to write a simple prototype UI in Python that pulled information from my Squeezebox Server, via PyLMS and PyGame and control playback on the Pi’s instance of SqueezeLite. It was straightforward to get the touchscreen working via PyGame, and I used the RPIO Python GPIO library for the Pi to add support for those little touch switches – et voila custom dedicated controls worked!

IMG_20140531_184444

In the image above, you can also see the first part of the audio stage – a “no-name” brand cheap USB audio card.

This was great as a prototype, but falling way short as a Squeezebox-like experience. So, next I had to either do more research into open source, or start some serious UI coding…

(c) 2014 Nick Tuckett.

Advertisements