DRAFT
Goal: Set up Pure Data (Pd) with Pisound
Difficulty: Easy
Required Hardware:
- Pisound
- Raspberry Pi
Background
Pure Data (or just Pd) is a visual programming system for multimedia. It has been around for decades. It is most similar to Max (is sort its cousin), but is open source, and a bit more “bare bones”.
Installation
Install with:
sudo apt-get install --no-install-recommends puredata gem
Note: This is a much smaller install than what the pisound-config
installs. For some unknown reason, the package for gem
recommends pulling in a full PDF rendering system! Hence, the --no-install-recommends
.
Running
Pisound button & control mobile app
The Pisound button feature, and the Pisound control mobil app both have built-in support for Pure Data, and launch it correctly set up for Pisound.
Command Line
If you are going to run Pure Data from the command line - either from scripts you write, or from a shell in the desktop, here are the options you need:
-
-alsa -audioadddev pisound
use Pisound via ALSA -
-audiobuf 10 -channels 2 -r 48000
proper settings, for Pisound
You may need longer audiobuf depending on your system. -
-alsamidi -mididev 1
add a port to ALSA’s MIDI system.=
You can have more than one, for example-mididev 1,2,3,4
creates 4.
So, for example:
puredata -alsa -audioadddev pisound -audiobuf 10 -channels 2 -r 48000 -alsamidi -mididev 1,2,3,4
Visual Desktop
If you are working in the Raspberry Pi desktop environment, launch Pure Data from the toolbar:
- Raspberry menu > Sound & Video > Pure Data
Then, in Pure Data’s window, from it’s menu bar:
- File > Preferences > Audio Settings…
This will open a dialog, which you should set as so:
Depending on your system configuration and patch complexity, you may need a larger block size.
Make sure you Save All Settings, then "OK*. Once you save these, then just launching Pure Data on the command line with no arguments, will use this configuration.
Now the audio in and out blocks in Pd will connect to the Pisound.