Running Puredata patches on Bela » History » Version 5

Version 4 (Christian Heinrichs, 2015-12-05 03:59 PM) → Version 5/20 (Christian Heinrichs, 2015-12-05 03:59 PM)

h1. Compiling Puredata patches on Bela

Here's a quick guide to compiling Pd patches on Bela. Currently this only works on OSX and Linux, but Windows support will be coming soon.

You can also access the slides from the latest Bela workshop on compiling Pd patches at the following link: This also includes some handy tips for handling Bela's sensor inputs using Puredata.

h2. Getting everything up and running

Follow the following steps to get everything up and running on your Beaglebone Black:

*1. Download the project archive from*

* Extract the archive (and remember where you extracted it to)

*2. Make sure python is installed:*

* Type `which python` in a terminal window. If not installed, follow instructions here:

* Install the most up-to-date version of the *requests* python package (version 2.7.0). You can get it from
or typing the following in a terminal window (make sure it is not currently installed):

@curl -OL && unzip master && cd kenneth* && sudo python install@

*3. Create an account on*

* Go to

* Click *Login* on the top right corner of the page

* Create a new account

* Create a new patch and call it **bbb** _(N.B. compiling won't work if you use a different name)_

*4. Make sure the Beaglebone is plugged in to laptop and open a terminal window:*

* Navigate to the _scripts_ folder @cd /path/to/folder/scripts@

* If running for the first time @sh

* if prompted for a password enter letter 'a' (no quotation marks)

*5. Compile your first project!*

* @./ -i ../projects/heavy/pd/hello-world/@

*6. Create a new pd project*

* Create a new folder inside the /pd directory

* The pd patch must exist in its own folder and be named *_main.pd*. You can use abstractions if you like.

h3. Using analog ins/outs

* You can directly address the analog ins and outs from within PD (note that you have to compile and run the patch onto the BeagleBone to receive the data)

* Use the [adc~] and [dac~] objects to receive and send the data

* [adc~ 3] refers to Analog Input 0 (first two channels of [adc~] are audio inputs), likewise for [dac~]

* These inputs are sampled at audio sampling rate, so handle them as you would audio signals. (Use [snapshot~] if you want to turn them into control-rate values)

* See the example patches in the /pd folder for more information

h2. Important notes

* Make sure you aren't using any unsupported objects. For list of objects go to

* Pd patch must exist in its own folder and be named *_main.pd*. You can use abstractions if you like.

* See example pd patches for more information.

*Have fun!*