Quantcast
Channel: RaspberryPi – Limina.Log
Viewing all articles
Browse latest Browse all 5

How to build Pd-extended on the Raspberry Pi

$
0
0

It was quite an ordeal, but I managed to build Pd-extended (Puredata with a bunch of externals) on my Raspberry Pi running Debian Squeeze.  I also uploaded my finished package (.deb) to puredata.info, see below for details.  Here’s what you need to do:

  1. Firstly, your SD card’s partition is probably not large enough to accomodate all the files we’ll need, so we have to expand it to fit your card first.  From a terminal session on your Pi:
    1. printf "d\n3\nd\n2\nn\np\n2\n157696\n\nw\n" | sudo fdisk -cu /dev/mmcblk0
    2. sudo reboot
    3. sudo resize2fs /dev/mmcblk0p2
  2. We need to add the repositories for the source to aptitude:
    sudo nano /etc/apt/sources.list

    Move to the bottom and paste this in and save (ctrl+o):

    deb-src http://ftp.uk.debian.org/debian/ squeeze main
    deb http://backports.debian.org/debian-backports squeeze-backports main
  3. Update your aptitude cache:
    sudo apt-get update
  4. We’ll need  to install a whole bunch of dependencies for building Pd and all the various externals.  This took like 4 days to manually figure out:
    sudo apt-get install rsync autoconf libfftw3-dev liblua5.1-0-dev swig libvorbis-dev ladspa-sdk libspeex-dev libmp3lame-dev lua5.1
  5. Copy the source:
    rsync -av --delete rsync://128.238.56.50/distros/pd-extended/ pd-extended/
  6. Since it will take a while, you may want to use this command to detach the process from your terminal session and log the output to a file:
    nohup rsync -av --delete rsync://128.238.56.50/distros/pd-extended/ pd-extended/ > rsync.log &
  7. Build the main Pd dependencies:
    sudo apt-get build-dep puredata gem pdp
  8. For some reason I had to change one of the externals’ makefile to get it to build correctly. Open /externals/OSCx/src/Makefile (I used nano), go to line 20 and remove “-lpd” so it looks like this:
    LIBS = -L../../../pd/bin -lc -lm
  9. OK, we’re now ready to actually start building. This will take a long time, hours most likely. I did it piecemeal so I can’t say for sure how long it takes from start to finish.
  10. cd pd-extended/packages/linux_make
  11. nohup make install > makeinstall.log &
  12. While you’re still logged in, you can monitor that logfile by doing
    tail -f makeinstall.log
  13. Once that finishes, you should see “linux_make install succeeded!” Yay! If you encounter any errors please post them here and we’ll see what I missed.
  14. Now we can make the actual Debian package that you can install like any other program:
    nohup make package > makepackage.log &
  15. If you previously installed Puredata vanilla (as per my previous post), you’ll need to uninstall that first:
    sudo apt-get --purge remove puredata
  16. For convenience I uploaded this package to puredata.info.  All you have to do is download that file to your RPi:
    wget -O Pd-0.43.1-extended-20120606.deb http://download.puredata.info/pd-extended-rpi/releases/1.0/Pd-0.43.1-extended-20120606.deb
  17. Finally, let’s install it:
    sudo dpkg -i Pd-0.43.1-extended-20120606.deb
  18. If everything goes well, you now have Pd-extended on your Raspberry Pi! Here’s a new test patch that uses Freeverb~ for you to test, like so:
    pd-extended -nogui -noadc -alsa testPatchExtended.pd
  19. Presently, I’m getting some serious noise and I think it has something to do with the ALSA driver still being in beta. Looking into it. If any other linux hackers have any ideas, please let me know!

Viewing all articles
Browse latest Browse all 5

Trending Articles