When the Raspberry Pi 2 was released I certainly got curious. Would it be really better than it's little brother? As soon as it got available in The Netherlands I bought it and sure this thing flies compared to the Raspberry Pi 1. The four cores and 1GB of memory are certainly an improvement. The biggest improvement though is the shift from ARMv6 to ARMv7. Now you can really run basically anything on it and thus I soon parted from Raspbian and I'm now running plain Debian Jessie armhf on the RPi.
So is everything fine and dandy with the RPi2? Well, no. It still uses the poor USB implementation and audio output. And it was quite a challenge to prepare it for its intended use: a musical instrument. To my great surprise a new version of the Wolfson Audio Card was available too for the new Raspberry Pi board layout so as soon as people reported they got it to work with the RPi2 I ordered one too.
One of the first steps to make the device suitable for use as a musical device was to build a real-time kernel for it. Building the kernel itself was quite easy as the RT patchset of the kernel being used at the moment by the Raspberry Foundation (3.18) applied cleanly and it also booted without issues. But after a few minutes the RPi2 would lock up without logging anything. Fortunately there were people on the same boat as me and with the help of the info and patches provided by the Emlid community I managed to get my RPi2 stable with a RT kernel.
Next step was to get the right software running so I dusted off my RPi repositories and added a Jessie armhf repo. With the help of fundamental the latest version of ZynAddSubFX now runs like charm with very acceptable latencies, when using not all too elaborate instrument patches Zyn is happy with an internal latency of 64/48000=1.3ms. I haven't measured the total round-trip latency but it probably stays well below 10ms. LinuxSampler with the Salamander Grand Piano sample pack also performs a lot better than on the RPi1 and when using ALSA directly I barely get any underruns with a slightly higher buffer setting.
While packaging Tuna I ran into an issue for which I couldn't easily find a workaround on the ubiquitous search engine. Tuna depends on some unavailable Python applications so those had to be packaged too. After having successfully tested the packages locally with pbuilder I uploaded them to Launchpad and noticed that they failed to build. Apparently the Python installer setup.py wants to install in /usr/lib/python2.7/site-packages and while that worked fine locally with pbuilder, Launchpad had an issue with that:
Found files in /usr/lib/python2.7/site-packages (must be in dist-packages for python2.7).
dh_builddeb.pkgbinarymangler: dpkg-deb --build debian/python-schedutils .. returned exit code 1
make: *** [binary-arch] Error 1
dpkg-buildpackage: error: /usr/bin/fakeroot debian/rules binary-arch gave error exit status 2
Apparently the files had to be installed in /usr/lib/python2.7/dist-packages but how to instruct the installer to do so without having to resort to ugly hacks? As I couldn't find any useful answers on the web I asked falkTX on #kxstudio. He said the setup.py installer has a flag to install to dist-packages instead of site-packages, --install-layout deb. So I added that to the debian/rules file and gave it another spin:
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
python setup.py build
python setup.py install --skip-build --prefix /usr --root $(CURDIR) --install-layout deb
Now both pbuilder and Launchpad built the package without any issues.
For years I've used Focusrite Firewire interfaces, first the Saffire Pro 10 IO and after that its successor, the Saffire Pro 40. Both great devices but recently I decided to make the switch to USB. The reason was twofold:
- I was barely using more than 2 ins or outs simultaneously
- Firewire is being phased out and my notebooks don't have any Express Card slots either, only USB ports
- The Pro 40 isn't very portable
So when switching to USB I would need:
- Same or better quality preamps and AD/DA convertors
- At least 2 ins and outs
- Possibility to achieve similar latencies as with the Pro 40
- Works well with Linux
This narrowed down the choice significantly. I could go for a Focusrite Scarlett but from what I found on the net there were some issues with these devices. I've also looked at some Presonus devices but actually I had already set my mind on a different device: the RME Babyface.
So when I found a webshop that offered the Babyface at a reduced price (almost 15% off) I put my Focusrite up for sale and bought the Babyface. The Focusrite was sold within a week and the Babyface easily met my expectations:
- When in CC (Class Compliant) mode it works out of the box
- It's highly portable, the Babyface is actually specifically made for this purpose as it comes with a nice pouch
- It has 2 ins and outs and the great thing is that it's possible to extend the IO via ADAT
- The preamps and AD/DA converters are simply top notch, they're so good that I'm considering switching cans and studio monitors as this device is merciless, it simply doesn't work well with my current setup
- When connected to an USB3 port (XHCI) the Babyface can run with nominal latencies of 0.5ms (this is with 8 samples), i.e. it beats the other two OS's mentioned on the RME product page
I can live with not being able to control the device from within Linux, almost all settings can be done on the device itself. Upgrading the firmware can be done with a VM so that's covered too. The only real drawbacks are that it's an USB device so it's a bit more picky with regard to your system setup and it consumes a bit more CPU compared to Firewire. But all in all this is a great sounding device that works well with Linux when in CC mode and it fits my specific user case very well.
Finally got around finishing a new track. And it's just 65BPM so no four to the floor this time. I posted the demo a while ago, this is more or less a definitive version (definitive is a fluid term in my dictionary).
This song is about one of the most beautiful places I know on this
planet, Cala Del Aceite in the most southern part of Spain:
- Qtractor for recording and mixing
- seq24 for sequencing
- The necessary plugins:
- drumkv1 to hold the drum samples (drum samples are all from
- a lot of plugins that are part of Distrho or Carla: Noize Maker, Tal
- Reverb III, ZynAddSubFX-LV2, Nekobi
- MDA subsynth
- FluidSynth DSSI for the Rhodes
- linuxDSP plugins (EQ500, DYN500, MBC2B on the master bus)
- Calf Vintage Delay
- LADSPA comb filter, Fast Lookahead Limiter
The background vocals for the choruses are sung by my wife. The ocean
sample is from Freesound:
Cádiz is pretty close to Conil, hence the choice.
Making promises that I can't keep
It's pushing me, pushing me into a deep
State of sadness, state of doubt
A state of awareness I can't live without
Making mistakes, so hard to bear
It's driving me, driving me to a point where
I can't escape, I can't shy away
From the daemons I refuse to obey
All is forgiven, all is well...
Awaiting the day that I'll be relieved
From this burden, this burden that has grieved
So many loved ones, so many friends
All the people on which I depend
Stand up, act now, it's time for a change
Lingering won't help, help to rearrange
The current imbalance, the current state
Of things so rush now don't hesitate
All is forgiven, all is well...
Cala Del Aceite by The Infinite Repeat is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Just ordered a Wolfson Audio Card for Raspberry Pi via RaspberryStore. I asked them about this audio interface at their stand during the NLLGG meeting where I did a presentation about doing real-time audio with the RPi and they told me they would ship it as soon as it would become available. They kept their word so I'm hoping to mount this buddy on my RPi this very week. Hopefully it will be an improvement and allow me to achieve low latencies with a more stable RPi so that I can use it in more critical environments (think live on stage). It has a mic in so I can probably set up the RPi with the Wolfson card quite easily as a guitar pedal. Just a pot after the line output, stick it in a Hammond case, put guitarix on it and rock on.