The Raspberry Pi (RPi) is a pocket-sized computer that has sold over 10 million units, making it the best selling British computer in history. While it was originally developed to help teach computer programming to kids, it has since been adopted for both DIY and commercial projects and products in many areas, including music and audio. For less than $40 you can buy the Raspberry Pi 3 – a quad-core computer running the Linux operating system, allowing you to run a growing number of music production applications such as Audacity, Waveform (previously Tracktion), and Non.
However where the RPi really shines is as an embedded computer running your own software. As mentioned in a couple of previous articles of mine, the RPi can be used for building your own synthesiser, sampler, FX unit, sequencer, MIDI controller, and everything in between. Many of the best audio programming environments and libraries for creating your own audio/MIDI software, such as Pure Data, SuperCollider, Processing, openFrameworks and JUCE will work in the RPi, making it one of the best, easiest, and most affordable solutions for building your own music hardware.
The team at Blokas has realized this growing importance of the RPi in the music tech industry and has just launched their Indiegogo crowdfunding campaign for pisound – an audio/MIDI interface for the Raspberry Pi, which they have been working on for around 18 months. I was lucky enough to get hold of a unit a few weeks ago and have been busy testing it out ever since.
The Blokas pisound is an audio/MIDI interface specifically for the Raspberry Pi, structured as a shield that slots directly on top of the Pi and its GPIO pins, however it is designed to be a platform for RPi audio projects rather than just an interface. It boasts ultra-low latency-and-noise 24-bit stereo audio in/out, sample rates up to 192kHz using high quality components and a pair of 6.35mm stereo sockets as well as high speed MIDI in/out through a pair of 5-pin DIN MIDI sockets.
It includes two knobs for setting input gain and output volume, is completely powered by the RPi, and is readily recognized by the RPi as a standard audio and MIDI interface. It also includes some really interesting features such as a configurable button that can automatically load a Pure Data patch from a USB drive, and Wi-Fi MIDI and TouchOSC integration. If you use (or are considering using) RPi for any kind of audio or MIDI projects, this has been developed for you.
For the full pisound tech specs see the pisound website.
I was pleasantly surprised how straightforward and problem-free the setup process was, with all the needed guides documented on the pisound docs page. Attaching the pisound to my RPi just involved screwing in four supplied spacers/stand-offs, and slotting the interface into the Pi’s GPIO pins; it took less than five minutes to complete this.
The next step was to install the pisound drivers onto my RPi. I personally chose to do this directly on my Pi by connecting a monitor, keyboard and mouse to it, but the supplied instructions will apply just as easily if instead connecting remotely to the RPi via another computer. Installing the drivers just involved entering three commands into a command line application (such as Terminal), and for me took less than 15 minutes to install. Very helpfully, this installation process also gave me the option to automatically install other useful software such as Audacity and touchosc2midi (a Linux version of TouchOSC Bridge) as well as to set the pisound as the default audio device of my Pi. After a quick reboot, pisound was then ready to begin using.
First, it is worth mentioning that I used a Raspberry Pi 3 for my particular tests, as it is the best companion for pisound due to its built-in support for Wi-Fi Hotspot Mode, but other models are supported by pisound too. Also I used Pure Data (Pd) for all of my tests due to its strong integration with pisound’s button (more on this in a bit), however you’re in no way limited to using just Pure Data for developing software that talks to the pisound – theoretically, as pisound is recognized as a standard audio/MIDI interface, it should be able to work with most programming environments or libraries that work on the RPi. It is also worth mentioning that the pisound I’ve been testing is a beta version that requires its own power supply, however the latest version is powered through the RPi instead.
Before I tried anything exciting I wanted to make sure the audio in/out was working and at an acceptable quality and latency. I launched Pd on my RPi and created a simple patch that sent the audio input directly to the audio output. I then went to Audio Settings, made sure pisound was the chosen audio interface and set the sample rate to 48kHz and block size to 64, and I could happily hear clean audio with no noticeable noise or latency.
Next I wanted to try something a bit more exciting, and build a simple synth that’s controlled by a MIDI keyboard. To implement this the RPi would need to respond to the pisound’s MIDI input and send audio to the audio output. I also wanted the RPi to operate headlessly (without a monitor or keyboard/mouse), therefore the pisound’s capability to launch a Pd patch from a USB drive with a single button click was important here.
I created a very simple mono-synth Pd patch on my MacBook, transferred it onto a USB drive and renamed the patch file to be called main.pd, and then connected the drive to a USB port on the headless Pi. I then clicked the pisound’s button and after a couple of seconds and a couple of LED flashes I was able to trigger and control synthesized audio using a MIDI keyboard connected to the pisound’s MIDI DIN input. It really was that easy – check out the below video for a demo of this.
Launching and playing a Pure Data synth on Raspberry Pi using pisound and an M-Audio MIDI keyboard
The first time I launched Pd via the button the Pd audio settings ‘Delay’ setting was set to 25, which created a very small amount of latency, however after manually setting this to 5 and trying again all seemed OK. After studying the pisound button ‘single-click’ behavior I found that, by default, when you launch a Pd patch it automatically sets the pisound to be the default audio interface and sets the sample rate to be 48kHz among a few other attributes, however it doesn’t set the audio ‘block size’ or ‘delay’ settings, which may be desirable. It is worth mentioning at this point that the pisound button has four individual interaction events (single-click, double-click, triple-click, and hold), each which can be modified or completely changed to do anything you want via editing a set of scripts that are installed onto your RPi. Having so many reconfigurable event possibilities from a single button is a really powerful and unique feature of pisound.
Next I wanted to properly test the audio input and the Wi-Fi MIDI feature by building a delay FX unit that I could wirelessly control via TouchOSC on my iPad. Again, I created a Pd patch on my MacBook which was then transferred onto a USB drive in order to launch it on the headless RPi.
However before launching my Pd patch I needed to put the RPi into Wi-Fi Hotspot Mode and launch touchosc2midi, which again is something that can be triggered via a simple button interaction, this time by performing a triple-click. Following the Blokas documentation, once I did this the pisound appeared as Wi-Fi network/device on my iPad, and once connected I was then able to use TouchOSC to connect to the RPi for sending wireless MIDI messages to it.
Finally I launched my Pd patch via a button single click, and like with my previous test everything just worked as expected and I found no issues with audio latency or quality. Blokas really have made sure that it’s as easy as possible to get everything up and running, and I was surprised at the lack of complications that were involved. Check out the video below to see this FX unit in action.
Launching and using a Pure Data delay FX patch on Raspberry Pi using pisound, controlled by a custom TouchOSC layout running on an iPad
When I first got my pisound I primarily just saw it as an audio/MIDI interface but the more I used it the more I discovered it was so much more than that. Firstly its form factor makes it closer to a shield than a traditional audio/MIDI interface, and this is an advantage for a couple of reasons – the fact is sits directly on top of the Pi makes your projects more portable than if you were using a USB interface, and its size makes it more feasible for embedding into single cases or enclosures.
Also, the way it connects to the RPi has a number of positives – as it connects directly to the Pi’s GPIO pins it means audio and MIDI can be faster; it’s a lot less likely to be accidentally disconnected, and it saves you from having to use up one of the USB ports on your RPi. However if you currently use your Pi’s GPIO pins this could be an issue – the pisound only leaves 10 free pins for you to use, and doesn’t exactly provide an easy way to connect to the available ones. The pisound documentation provides a guide on how you can build your own MIDI controller that can connect to the pisound/RPi via MIDI DIN or USB, in case you usually use the GPIO’s for connecting dials, buttons or other controls; but if you’re using the GPIO pins for certain other reasons (e.g. for SPI communication) you’re not going to be able to use the pisound at the same time.
The main differences between the pisound and existing USB interfaces are its configurable button and wireless MIDI/OSC integration. These features make the pisound integrate with the RPi in a powerful way, way beyond that of a traditional audio/MIDI interface, and are primarily what makes pisound more of a platform rather than just an interface.
Based on my previous experiences around embedded Linux platforms, using pisound has definitely been the quickest and easiest process of connecting high-quality audio and MIDI to my projects without having to rely on a clunky external USB interface. Being able to headlessly launch a Pure Data patch with a single button click makes it really easy to build standalone devices with the RPi, such as for building a synth or guitar pedal for onstage where you don’t want to have a monitor and mouse attached to it, and the configurability of this button is an extra bonus.
Also the built-in wireless MIDI/OSC integration allows you to add an improved level of control to your RPi, inspiring you to expand your audio projects in ways you may have not considered. Finally, at a starting price of €79/$84/£68, this is possibly the most affordable all-in-one solution for high quality audio and MIDI integration with the RPi; more affordable that any existing Linux-compatible 2-in/2-out audio/MIDI USB interface, especially considering the unique features it provides.
If you currently use or plan to use Raspberry Pi for any audio/MIDI-based work or projects and you need a quick, easy, and affordable solution for high quality and low latency audio, pisound is the answer, and I thoroughly recommend it.
Price: Indiegogo – starting from €79/$84/£68, MSRP – €99/$106/£87
Indiegogo campaign: http://blokas.io/indiegogo