Raspberry Pi Synth – getting jackd working – Part 3

To get high performance audio out of the Pi, we need a program called jack. It allows programs to route audio between each other and allows access to the audio hardware.

Unfortunately the Wheezy binaries for jackd don’t work by default. Thankfully some awesome guys at autostatic have setup a repo which work with the Pi!

and type the commands into your rpi via the remote terminal login as setup in Part 2.

You can also reference the website:

wget -q -O - http://rpi.autostatic.com/autostatic.gpg.key | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/autostatic-audio-raspbian.list http://rpi.autostatic.com/autostatic-audio-raspbian.list
sudo apt-get update

if you try run jackd, it will most likely complain about memory, so type the following command.

sudo mount -o remount,size=128M /dev/shm

to start jackd we run:

jackd -dalsa -n4 -r44100 -p512 &
If you run with a lesser number of buffers (the default is 2) then you’ll probably get a lot of crackling during playback because the Pi isn’t that fast.

You can try tweaking the -p512 and try numbers such as 128, 1024 etc to try improve the latencies.

The ‘&’ at the end makes the jackd start up without tying up the Command Line Interface (CLI). If you need to kill the jack server at any point, do a
$ ps
$ kill

Using the internal sound card isn’t very good apparently, so your mileage may vary. You could use an external USB sound card and it will most likely have better performance.

Move on to Part 4 where we put it all together!

3 thoughts on “Raspberry Pi Synth – getting jackd working – Part 3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s