Below is a step by step guide to settting up pyo on the raspberry pi. This guide is built from information from the!forum/pyo-discuss group.

First up log in and:

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo shutdown -r now

Setting up the SPI drivers.

  1. Log in.
  2. sudio su -
  3. wget
  4. unzip
  5. rm
  6. cd py-spidev-master
  7. sudo python install
  8. cd ..
  9. rm -rf ./py-spidev-master

Pyo Setup

  1. Log in.
  2. sudio su -
  3. sudo apt-get install libportmidi-dev portaudio19-dev liblo-dev libsndfile-dev python-dev python-tk
    subversion python
    -imaging-tk python-wxgtk2.8
  4. svn checkout pyo-read-only
  5. cd pyo-read-only
  6. sudo python install --install-layout=deb --use-jack

Install Jack2 v1.9.8

Unfortunately, the version of jackd2 that apt-get just installed is currently broken. If you try running it, you get a remarkably unhelpful Bus Error message as it dies due to struct alignment errors.

The solution: either wait until Jack or the compiler (whichever turns out to be the culprit) is fixed, or compile and install an older version which doesn’t suffer from the errors. It just so happens that version 1.9.8 works perfectly well. So, either download the source and compile it yourself, or follow these steps to set up a pre-compiled jackd2 binary available here.

  1. Log in
  2. Move into your home directory: cd ~
  3. wget
  4. tar xf jack_for_pi_v1.9.8.tar.gz
  5. export PATH=/home/pi/local/bin:${PATH}
  6. export LD_LIBRARY_PATH=/home/pi/local/lib
  7. which jackd should point to /home/pi/local/bin/jackd

A script to start up pyo.

export PATH=/home/pi/local/bin:${PATH}
export LD_LIBRARY_PATH=/home/pi/local/lib
jackd -m -p 32 -d dummy &
sleep 1
alsa_out -q1 2>&1 > /dev/null &
sleep 1


In your python code, after you start pyo. You can call jack_connect to setup the connections for you. Saves you having to manualy do it.

import os

# Setup our paths to out version of jack.

os.system(export PATH=/home/pi/local/bin:${PATH})
os.system(export LD_LIBRARY_PATH=/home/pi/local/lib)

# Called jack_connect to connect pyo to alsa playback

os.system(jack_connect pyo:output_1 alsa_output:playback_1)
os.system(jack_connect pyo:output_2 alsa_output:playback_2)


FluxPi First Look
Updated: 2015-06-01 12:56:40

First Look!
Updated: 2015-06-01 12:49:24

Introducing FluxPi
Updated: 2015-04-16 12:38:43

PlayPi and Raspberry Pi 2
Updated: 2015-04-14 12:54:32

PlayPi - Version 1.3.8
Updated: 2015-04-14 12:51:42

How to setup pyo and SPI on Raspbian
Updated: 2015-02-23 13:25:11

Playpi Version 1.1.0 | Raspberry Pi Drum Machine | Raspberry Pi Sequencer
Updated: 2014-10-24 23:31:14

Playpi Hardware Build | Raspberry Pi Drum Machine | Raspberry Pi Sequencer
Updated: 2014-10-24 23:30:56

Playpi LEDs up and running!
Updated: 2014-09-22 13:08:10

Playpi - Hardware Version 3.0 (Final) - Complete
Updated: 2014-09-02 12:38:34