Running PureData patches on a Beagle Board.

PureData patch Running on a BeagleBoard from Rafael Vega on Vimeo.

If you don't want to read the whole thing and just want to play a PD patch on your
BeagleBoard, read part 2 of this article.

0. Motivation.

  1. There is a large number of open-source software tools for working with audio. From low level programming tools to full-fledged digital audio workstations. On another side, there are musicians, producers and sound designers who use many hardware tools and there are few open-hardware alternatives for musical applications.

  2. Audio designers, musicians and producers don't usually have software development skills and need graphic tools for audio processing. Many of them want to take their algorythms to stage or to the studio "in a box".

This is a small step towards the possible development of an open and portable audio processing platform.

1. High level description of the system.

  1. The BeagleBoard is an open-hardware, portable, low cost, low power, compact and expandable computer. It is ideal for deploying applications that need a certain amount of processing but don't need all the paraphernalia that a regular computer has (keyboard, display, etc.) A stomp-box is a good example of such an application.

  2. Angstrom Linux is a GNU/Linux distribution designed to run on embedded systems such as the BeagleBoard.

  3. ALSA (Advanced Linux Audio Architecture) is a part of the Linux operative system that provides a consistent API to work with different audio hardware devices and implements drivers for such devices.

  4. JACK Is a system for handling real-time audio and MIDI. It can connect a number of applications to an audio device and allows them to share audio between them. It runs as a system daemon.

  5. Xooky Nabox is an application that I wrote in C++ that uses the libpd library to interpret pd patches. It puts pd patches to work as DSP engines and exposes their functionality as a JACK client. In other words, it's an adapter between PD and JACK, without a GUI.

2. How to use.

What you need:

  • A BeagleBoard, I used revision C4.
  • A 5 volt AC to DC converter.
  • A 1GB or larger SD card and a way to connect it to your computer.
  • A computer running Mac OS or Linux (you can use one of the many live CD distributions if youu're running something else and don't want to install Linux on your hard drive).
  • A PD patch that you want to play with.


1. Connect the SD card to your computer and immediately run sudo dmesg | tail on a terminal to determine the name that your system is giving the SD card.

2. Download this script and run it. This will erase all the data in the card!

sudo ./ /dev/sdc

/dev/sdc is the name that my system assigned to the SD card, it will be different on your system. Alternatively, you can create parted or a similar program to create a two partitions on the card labeled "boot" and "Angstrom" and formated as FT32 and ext4 respectively.

3. Download this file, uncompress it and copy the contained files to the boot partition in your SD card. (the order in which you copy the files is important).

tar xvfz boot.tar.gz
sudo cp boot/MLO /media/boot
sudo cp boot/u-boot.bin /media/boot
sudo cp boot/uImage /media/boot

4. Download this file, uncompress it and copy the contained files to the Angstrom partition in the SD card.

5. Copy your PD patch to /media/Angstrom/var/xooky/patch.pd

6. Put the SD card on the BeagleBoard, turn the BB on and make some noise :)

3. Building the system from scratch.

3.1. Establish serial communication between the BB and your computer

If your computer does not have a serial port, you need an RS232 to USB cable. Linux systems include a driver for such cables. If you're on Mac OS, you need to get drivers from (Snow Leopard) or (Lion).

Use an AT/Everex cable to connect the BB to your serial port as described here. If the physical connection is okay, the BB should show up on your system as /dev/tty.PL232<something>. Use the ls /dev/tty* command to find out the identifier that your system assigned to it.

Now, establish serial communication with the board using minicom:

sudo minicom -s

Follow the configuration screens to set these parameters: 115200 8N1, no flow control.

To verify that there's proper communication between the board and your computer, leave minicom open and connected and power cycle the BB. You should see something similar to the following in minicom:

U-Boot 2010.03-dirty (Oct 18 2010 - 11:31:58)
OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max clock-720Mhz
OMAP3 Beagle board + LPDDR/NAND
I2C:   ready
DRAM:  256 MB
NAND:  256 MiB

2. Install Angstrom Linux==

First, follow steps 1, and 2 of part 2 of this article.

Then, download the boot files from and copy them to the boot partition of the SD card as explained in step 3 of part 2.

Now, download the Angstrom distro and the BB kernel modules from and copy them to the Angstrom partition of the SD card with the following commands:

sudo cp Angstrom-Beagleboard-demo-image..... /media/Angstrom
sudo cp modules-2.6.X-rX-beagleboard.tgz /media/Angstrom
cd /media/Angstrom
sudo tar -jxvf Angstrom-Beagleboard-demo-image....
sudo rm Angstrom-Beagleboard-demo-image....
sudo tar -xvf modules-2.6.X-rX-beagleboard.tgz
sudo rm modules-2.6.X-rX-beagleboard.tgz

Go ahead and put the SC card back in the BB, fire up minicom and power up the BB, you should see Angstrom Linux booting up.

3. Share your computer's internet connection with the BeagleBoard

I chose an IP of198.168.2.202 for the BB and for my computer, you can choose whatever makes sense to you.

First, connect a USB cable between your computer and the BB. Then, using the serial terminal, log in to the linux shell in the BB (root user, empty password) and create the /etc/init.d/local_network file with the following content:

modprobe g_ether host_addr=16:0F:15:5A:E1:21 dev_addr=16:0F:15:5A:E1:20
ifconfig usb0 netmask
route add default gw
echo "nameserver" >> /etc/resolv.conf

and execute:

chmod +x /etc/init.d/local_network
update-rc.d /etc/init.d/local_network defaults

Everything is set up on the BB side, now you need to set-up your computer to do packet forwarding or share your internet connection with the BB connected on the USB port. On Mac OS, you can do it using the Network Preference Pane:

On Linux, you can do the same by following the instructions here.

Back on the BB terminal, test the internet connection with wget:

wget ``

If everything was set up correctly, you can disconnect minicom and the serial cable, leave only the USB connected and ssh from your computer to the BB (It's way more comfortable and simple to do so than using minicom):

ssh root@

4. Installing packages and testing audio i/o

Now that your BB has an active intener connection, you can use Angstrom's package manager to install the stuff needed to start making sounds. First, update the package manager:

opkg uodate
opkg upgrade

Then, configure Angstrom to start in mode 3 (command-line only mode) by default. This will ensure that no GUI programs are running that might use the ALSA driver. When you use ALSA, only one program can access the sound card at the same time.

In /etc/inittab:

#The default runlevel.

Now, install the aplay and arecord programs:

opkg install alsa-utils-aplay

And set the audio levels with alsamixer. (For some reason, the tab key wasn't working for me. You can use f4 and f5 instead):

Left Digital Loopback: Mute
Right Digital Loopback: Mute
DAC2 Analog: 6dB
DAC2 Digital Coarse: 6dB
DAC2 Digital Fine: -10dB
Headset: 6dB

Quit alsamixer and store the levels permanently:

alsactl store

Now, connect a microphone or any sound source to the audio in jack in the BB, connect a speaker or headphones to the audio out jack, record to a wav file and play it back

arecord -t wav -c 2 -r 44100 -f S16_LE -v recorded
aplay recorded.wav

If the file is successfully created and it sounds when you play it, everything is going just fine.

5. Installing and testing JACK

Install the jack packages:

opkg install jack
opkg install jack-dev
opkg install jack-examples

Start the JACK server:

jackd -d alsa -p 256 -n 4 -P hw:0 -C hw:0 -S -r 48000 &amp;

Start a JACK client (jack_metro is a sample client that implements a metronome)

jack_metro -b 60 &amp;

And connect jack_metro's audio ports to the system's audio outputs. You should hear the metronome clicking every second.

jack_connect system:playback_1 metro:60_bpm
jack_connect system:playback_3 metro:60_bpm[cc]

<h3>6. Finally, compile and execute XookyNabox</h3>

<p>In your computer, download the XookyNabox sources:</p>

[cc lang="bash"]git clone git://
git submodule init
git submodule update

Copy them to the BB:

scp -R XookyNabox/ root@

And copy a PD patch:

scp -R any/patch.pd root@

Then, in the BB, install the tools for compiling programs:

opkg install task-native-sdk

And compile XookyNabox:

cd XookyNabox/vendor/libpd
sudo make install
cd ../src
sudo make install[cc]

<p>To test it, load a patch and connect to the JACK server:</p>

[cc lang="bash"]xooky_nabox /var/xooky/patch.pd &amp;
jack_connect xooky_nabox:out1 system:playback_1
jack_connect xooky_nabox:out2 system:playback_3
jack_connect xooky_nabox:in1 system:capture_1
jack_connect xooky_nabox:in2 system:capture_3

And you should hear your patch!

The last step is to create an init script so that JACK and XookyNabox start automatically when the BB powers up. In /etc/init.d/xooky

jackd -d alsa -p 256 -n 4 -P hw:0 -C hw:0 -S -r 48000 &amp;
sleep 3
xooky_nabox /var/xooky/patch.pd &amp;
sleep 3
jack_connect xooky_nabox:out1 system:playback_1
jack_connect xooky_nabox:out2 system:playback_3
jack_connect xooky_nabox:in1 system:capture_1
jack_connect xooky_nabox:in2 system:capture_3

And execute:

chmod +x /etc/init.d/xooky
update-rc.d /etc/init.d/xooky defaults

94 thoughts on “Running PureData patches on a Beagle Board.

  1. Thanks for posting this and walking throught the code, I think I will grab a Beagle Board now.

    Would this whole thing also work on the Beagle Bone?

  2. I'm not familiar with the BeagleBone but I guess it depends on how processor intensive (DSP) are the pd patches you are loading.
    If you're grabbing a BB, I recommend getting one with ethernet. It'll be a lot easier to connect a cable to your router or computer and ssh into it instead of doing the USB network thing.

  3. This XooyNabox looks really interesting, however I can't build it.

    Following your instructions, I get:
    # cd XookyNabox/vendor/libpd
    # make
    libpd_wrapper/z_jni.c:10:17: fatal error: jni.h: No such file or directory

    When I install the latest official libpd version and I try to make XookyNabox (including /usr/include/pd with the z_libpd.h file in the makefile), I get the following error:
    g++ -Wall -g -c -I/usr/include/pd main.cpp -o main.o
    main.cpp: In function 'void initLibPd()':
    main.cpp:132:39: error: too many arguments to function 'int libpd_init_audio(int, int, int)'
    /usr/include/pd/z_libpd.h:30:12: note: declared here
    main.cpp: In function 'int process(jack_nframes_t, void*)':
    main.cpp:199:36: error: invalid conversion from 'float*' to 'int'
    main.cpp:199:36: error: too few arguments to function 'int libpd_process_float(int, float*, float*)'
    /usr/include/pd/z_libpd.h:33:12: note: declared here

    Perhaps I'm missing something obvious here, I'm not very experienced with any kind of C code (or packaging it) :)

  4. Well, I managed to fix the problems. Building XookyNabox against upstream libpd now. The changes are documented in my fork of the code.

  5. Thank you for your great post! Have you ever tried running a Pure Data patch on an Odroid X or Odroid X2 or any Odroid platform? I am wondering if there would be more processing power available for complicated patches and perhaps smaller buffer sizes possible when using the Odroid platform? Please let me know if you have any experience or opinion on this:

    Thank you!

  6. Frank. I was not aware of the Odroid platform, their tech specs look very impressive. It sure looks like their boards would have more processing power than the Beagle.

  7. Whats up very cool blog!! Man .. Beautiful .. Superb .
    . I will bookmark your website and take the feeds also?
    I'm satisfied to search out numerous useful information here in the put up, we'd like develop
    more strategies on this regard, thank you for sharing.
    . . . . .

    Here is my web page :: shapewear

  8. Your style is so unique in comparison to other folks I've read stuff from. Many thanks for posting when you've got the opportunity, Guess I'll just bookmark this web site.

  9. When someone writes an paragraph he/she keeps the idea of a user in his/her brain that how a
    user can be aware of it. So that's why this paragraph is amazing. Thanks!

  10. l sur la libert锟斤拷 religieuse et la fronti锟斤拷re entre l'锟斤拷glise et les dirigeants, y compris le parrain de l'exposition, les chevaliers de colomb, a apport锟斤拷 les reliques mercredi apr锟斤拷s-midi 锟斤拷 la plus ancienne section de la cath锟斤拷drale, construite lorsque le texas 锟斤拷tait un colony.they espagnol dit qu'ils chronom锟斤拷tr锟斤拷s l' l'arriv锟斤拷e des reliques de san antonio dans le film comme un moyen de renforcer l'argument de l'锟斤拷glise que la libert锟斤拷 religieuse est tiss锟斤拷 dans le tissu culturel am锟斤拷ricain, mais perdre plus de terrain 锟斤拷 laques 锟斤拷v锟斤拷ques ont 锟斤拷t锟斤拷 ouvertement leur opposition 锟斤拷 un mandat f锟斤拷d锟斤拷ral exigeant des organismes confessionnels 锟斤拷 fournir une couverture de contrle des naissances sur les plans d'assurance de leurs employ锟斤拷s. il devait entrer en vigueur en aot et est contest锟斤拷e dans un proc锟斤拷s intent锟斤拷 par 43 entit锟斤拷s catholiqu

  11. I loved as much as you will receive carried out right here.
    The sketch is attractive, your authored subject
    matter stylish. nonetheless, you command get bought an
    edginess over that you wish be delivering the following.
    unwell unquestionably come further formerly again
    since exactly the same nearly very often inside case you shield this

    Check out my page - webpage -

  12. Exceptional post however , I was wondering if you
    could write a litte more on this topic? I'd
    be very grateful if you could elaborate a little bit
    further. Cheers!

  13. This is very attention-grabbing, You're an excessively skilled blogger.
    I have joined your rss feed and look forward to searching for more of your excellent post.

    Also, I've shared your site in my social networks

    Feel free to surf to my homepage :: SEO

  14. I don't leave a leave a response, but I read a few of the
    responses on this page Running PureData patches on a Beagle Board.
    | El Software Ha Muerto. I do have 2 questions for you if it's okay.
    Could it be only me or does it look like like some of these responses come across as if they are written by brain dead folks?
    :-P And, if you are posting at additional online sites, I'd like to follow you.
    Would you make a list of all of all your social pages like your
    linkedin profile, Facebook page or twitter feed?

  15. This is critical, as the size, color, shape and text with
    the logo should reflect whatever you asked for, and whatever you will accept as your company logo.
    When you are making a juice from dark, leafy greens, try
    adding a little cucumber. That makes a larger part in the MILLIONS of users downloading torrents every day.

  16. Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something.
    I think that you can do with some pics to drive the message home a bit, but other
    than that, this is excellent blog. An excellent read.

    I will certainly be back.

  17. As an example, in the event you conduct a quest for anything precise inside
    a filesharing method (including Limewire), youll observe numerous practical information on some of your results.
    Its a good elderly man travels backwards soon enough to when he would be a young handsome man within the 1970s.
    ISO Hunt provides a search engine, scouring other torrent sites to find the best results.

  18. I think that is among the most vital info for me.
    And i'm glad studyung your article. Butt want to statement on few general
    issues, The web site taste is great, the articles is actually excellent : D.
    Just right job, cheers

  19. Hey just wanted to give you a quick heads up. The text in your article seem to be running off the screen in Safari.
    I'm not sure if this is a formatting issue or something to do with browser compatibility but I figured I'd post to
    let you know. The design and style look great
    though! Hope you get the issue solved soon. Thanks

    my website: my singing monsters cheats

  20. Hey there would you mind letting me know which hosting company
    you're working with? I've loaded your blog in 3
    different internet browsers and I must say this blog loads a lot faster then most.
    Can you suggest a good internet hosting provider at a reasonable price?

    Thanks a lot, I appreciate it!

  21. I am sure this post has touched all the internet users, its
    really really good post on building up new web site.

  22. May I just say what a relief to find an individual who truly understands what they are discussing online.
    You actually realize how to bring a problem to light and make
    it important. A lot more people ought to look at this and understand this
    side of the story. I was surprised that you are not more popular because you certainly possess the gift.

  23. What's up to every , for the reason that I
    am truly keen of reading this weblog's post to be updated on a
    regular basis. It carries pleasant information.

  24. Hey! Would you mind if I share your blog with my myspace group?
    There's a lot of folks that I think would really enjoy your content.
    Please let me know. Thanks

  25. This is very attention-grabbing, You are an excessively
    professional blogger. I have joined your feed and sit up for searching for more of your excellent post.
    Additionally, I've shared your site in my social networks

  26. all the time i used to read smaller content which also clear their
    motive, and that is also happening with this post which I am reading
    at this time.

    my website: social landings (Donny)

  27. When I bit into a Vocelli's Pizza, I realized, wow, there's another pizza out
    there that's better than the rest of the formats cannot guarantee that you can warm
    up slowly to beccome your customer. The trickle down of the services in the market
    for pricey home remodeling jobs, and the mailing service regularly -
    and that can then increase your profit margin. Mailing lists can usally be ordered in at least
    three formats - peel and stick labels if they're going to be OK to send through the mail
    without using an outer envelope.

  28. They exist only inside the mouth mainly on the inside of your cheek
    or lips, tongue, on the base of the gums and any part of the mouth that moves.

    There is a burning or tingling then a tiny bump pops up.
    This led to a distinct divide between the North and

  29. I'm curious to find out what blog platform
    you are utilizing? I'm having some minor security
    issues with my latest blog and I would like to find something more safeguarded.
    Do you have any suggestions?

  30. Moreover, to preserve very good clean drinking water I realized I'd have to
    be changing filters all the time. This is where the difficulty of the Taiwan enterprises turn to the
    domestic lies. Of course, Miu is truth be told there and additionally
    leading to situations consequently it gets to be a much more known.

  31. I like this post, enjoyed this one regards for putting up. The goal of revival is conformity to the image of Christ, not imitation of animals. by Richard F. Lovelace. dbagkcfadbkf

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *


Puedes usar las siguientes etiquetas y atributos HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>