Hi,
i have built a puredata-stompbox. The main part is a raspberry pi running raspbian wheezy and pd-extended. Everything works fine now, but new externals don't work. I tried munger~ and +bubbler~. I put *.pd_linux binaries i found on the web in the searchpath, pd finds them but complains "cannot open shared object: no such file or directory". -Why? Do I need externals compiled for the raspberry pi?
best regards
-
Externals for raspberry pi
-
Do I need externals compiled for the raspberry pi?
Definitely. A *.pd_linux executable compiled for Intel processor will not work on ARM. So you need to find executables explicitly compiled for RaspberryPi. If not sure, you can check an executable's target platform with command objdump like so:
objdump -f munger~.pd_linux
Katja
-
Ok, thank you!
Does it make sense to take the source code and compile it on the raspberry?
The munger~ sourcecode includes some flext-stuff. I am not really sure, how flext works. Can it be installed on the raspberry? It seems flext itself needs to be compiled first. But how -with GCC ? from this source?:
https://launchpad.net/debian/experimental/+source/pd-flext/0.5.0g-2All this seems to be a complex journey for me, with a lot of little questions - Could it work like this?
-
All this seems to be a complex journey for me
Since compiling on RPi goes extremely slow, you could first find out how to build munger~ on a 'normal' computer. I tried to build a flext example class on OSX once but could not get it done for some reason. It is not trivial, is what I know.
Katja
-
Thanks for your helpful advice.
I got it working today. Indeed a long journey through lost library-folders...
I attached the working disis_munger~ external compiled on the raspberry pi.For the interested- here is a run-through of what i did (I think i did not forget something):
sudo apt-get install libasound2-dev
-download Synthesis Toolkit here:
https://ccrma.stanford.edu/software/stk/download.html-get the pd-extended sourcecode (flext did not want my suggestions, so i finally put a fresh src-folder on the sd-card)
-download subversion to download flext:
sudo apt-get install subversion
-download flext to the current folder
sudo svn co https://svn.grrrr.org/ext/trunk/flext flext-in this flext folder:
sudo bash build.sh pd gcc-
this created a configuration file in a subfolder, edit it:
sudo nano ./buildsys/config-lnx-pd-gcc.txt -
here is my edit, your paths may be different
(flext did not like the "libsndobj2c2" and "libsndobj-dev" i got via apt-cache search, but it is not needed for munger~)
# where is the PD source package?
# (this should point to the main folder, which has a "src" (PD Vanilla) or "include" (PD extended) subfolder)
PDPATH=/home/pi/pdsource/pd###############################################################
# prefix for flext installation
# headers are in $(FLEXTPREFIX)/include/flext
# libraries are in $(FLEXTPREFIX)/lib
# build system is in $(FLEXTPREFIX)/lib/flextFLEXTPREFIX=/usr/local
###############################################################
# where should the external be built?
OUTPATH=pd-linux# where should the external be installed?
INSTPATH=/usr/lib/pd-extended/extra###############################################################
# STK (synthesis tool kit) support
http://ccrma.stanford.edu/software/stk# where to find the STK header files (e.g. stk.h)
STK_INC=/home/pi/stk/stk-4.4.4/include# where to find the STK library (normally libstk.a)
# (comment out STK_LIB if you don't use STK)
STK_LIB=/home/pi/stk/stk-4.4.4/src/libstk.a###############################################################
# SndObj support
# http://music.nuim.ie//musictec/SndObj# where to find the SndObj header files (e.g. sndobj.h)
#SNDOBJ_INC=/usr/include/SndObj# where to find the SndObj library (normally libsndobj.a)
# (comment out STK_LIB if you don't use SndObj)
#SNDOBJ_LIB=/usr/local/lib/libsndobj.a#SNDOBJ_LIB=/usr/lib/arm-linux-gnueabihf/libsndobj.so
###############################################################
# make flags (e.g. use multiprocessor)
#MFLAGS=-j 2# user defined compiler flags
# (check if they match your system!)
#UFLAGS=-msse -mfpmath=sse -ffast-math
# don't overload new and delete operators
UFLAGS+=-DFLEXT_USE_CMEM# user defined optimization flags
# (check if they match your system!)
OFLAGS=-O3
# optimizations for Pentium 4
#OFLAGS+=-march=pentium4
-then again:
sudo bash build.sh pd gcc
-this creates another "config.txt" file to edit (uncomment)
# comment out to inhibit SIMD (Altivec/SSE) usage
#SIMD=1
-and again:
sudo bash build.sh pd gcc
-this takes a few minutes. if there are no errors:
sudo bash build.sh pd gcc install
-(flext should work now. i build the example "simple1", pd liked it)
- now get disis_munger~ not from Ivica Ico Bukvic's site,!!! I had to change some things in the sourcecode to get it working. These things are also changed (and perhaps some more) in the following source It works right out the box:
https://github.com/pd-l2ork/pd/tree/master/l2ork_addons/disis_munger
- edit the package.txt (check the paths, i just took them out. I did not try to leave BUILDTYPE and BUILDDIR there. NAME and SRCS is enough):
NAME=disis_munger~
SRCS=disis_munger.cpp
#PDPATH=../../pd
#INCPATH+=-I../../externals/grill/trunk/flext/source
#LIBPATH+=-L../../externals/grill/trunk/flext/libbuild/lib
#BUILDTYPE=multi
#BUILDDIR=build- and now from within the disis_munger folder (check the path to flext/build.sh):
sudo /home/pi/flext/flext/build.sh pd gcc
-this takes a few minutes to build, then install munger~ :
sudo /home/pi/flext/flext/build.sh pd gcc install
- copy the helpfile to the extras folder.
Done.
Now disis_munger~ works on my raspberry pi!I did not try much yet, but without the GUI i get 16 voices, 2 channels out of the edited helpfile without stuttering.
in my case:
raised output volume,
added loadbang-->delay 1000 ---> |;pd dsp 1;(
sudo pd -nogui -rt -alsa -audioindev 2 -audiooutdev 1 -blocksize 64 -r 48000 -audiobuf 6 -open /home/pi/<path to edited helpfile>I will try how it performs as a realtime fx-unit in the next days:-)
It seems munger~ makes a good benchmark-tool...
I did no overclocking. If you try the attached external, please post if it works and with how much voices, channels,... hardware, settingsbest regards
-
-
I did some tests now. Pd crashes sometimes when I try to change creation arguments of munger~. If I don't use any it works great.
I'll try to attach a mp3 with an example of a guitarchord in the frozen internal buffer, changing some settings with the pots of the stompbox. The patch has an additional delayline syncronized to the grain separation.
Jens -
here is the soundfile: