PD .48 on Raspberry Pi 3? [EDIT: updated to PD .51]
Tutorial to compile Pure-data 0.51-4 on Raspberry Pi with Jack support:
STEP1. Open Terminal:
Ctrl+Alt+T
STEP2. Creating folder to organize compilation (optional):
mkdir src
STEP3. Enter in src folder / install dependencies / download pd source code / unpack downloaded file:
cd src
sudo apt install build-essential autoconf automake libtool gettext git libasound2-dev libjack-jackd2-dev libfftw3-3 libfftw3-dev tcl tk
wget http://msp.ucsd.edu/Software/pd-0.51-4.src.tar.gz
tar -xzf pd-0.51-4.src.tar.gz
STEP4. Compiling Pd:
cd pd-0.51-4
./autogen.sh
./configure --enable-jack --enable-fftw
make
STEP5. Confirming if compilation are ok:
cd bin
./pd
STEP6. If it run, you can install Pd in your raspbian:
cd ..
sudo make install
It don't install fancy icons with desktop integration, if you need that, you need to do it manually.
hope it help!
Changelog:
2021.05.24
- update to compile newest Pd version (Pd-0.51-4)
2020.09.16
- update to compile newest Pd version (Pd-0.51-2)
2020.06.17
- update tutorial to compile newest Pd version (Pd-0.51-0)
2018.09.25
-
remove clone pure-data git repository step to download Pd-0.49 from miller's site in STEP3.
-
unpack file downlaoded via command line in STEP3
Camomile v1.0.1 - An audio plugin with Pure Data embedded
Thanks for the info @Pierre-Guillot!
@Pierre-Guillot said:
I argue that adding external is just a matter of incorporating them in libpd.dll. Am I right?
Yes but the libpd used by Camomile is the static library (.lib/.so/.a) that why libpd is embedded in Camomile.
- In fact, I guess that some of the external libraries are already compatible with multiinstance support because it depends on what parts of the Pd API the libraries use. But to ensure the multiinstance support you must use the C flags
-DPDINSTANCE=1
(and-DPDTHREAD=1
) while compiling the library or libpd and avoid all the static variables (except if they use thread local storage and you ensure to init them well on each thread). Here is one of the 1st posts by Miller about it: https://lists.puredata.info/pipermail/pd-dev/2017-04/020980.html
So i guess i have to remove directly from the external code all the static variable, so basically remove the "static" keyword from the variable declarations.
How can i compile libpd as a .lib/.so/.a and not .dll?
Should i use those flags in the various makefiles or just as a fleg in the command line? (assuming working with msys2 on Win64)
- The same way you did it for the "standard" approach.
So it's enough to use a x64 compiler and a x64 target?
- Including an external library with libpd is pretty straightforward (as long as, in this case, the library has the multiinstance support). See this: https://github.com/libpd/libpd/wiki/Adding-Pure-Data-external-libraries-to-your-project. And if a library is included in libpd it will also be included in Camomile.
So you also have to compile libpd then Camomile (all the instructions are on the Github repository - I updated it a week ago https://github.com/pierreguillot/Camomile/tree/dev/v1.0.6-lv2#compilation - or just do the same steps as on Travis and Appveyor and I can help if needed).
Cheers
I don't really know what Travis and Appeveyor are. I have to check them out.
How to include the static pthread lib for Win compilation? You mention it the Camomile build process readme.
PS: Another approach would have been to ship the libpd dynamic library next to each plugin. i need to try this but I afraid that, on Windows and Linux, the DAW think that the libpd library is another plugin try to load it.
I guess that most hosts have an avoid list for specific .dll. At least Reaper have a config file where is possible to remove a specific .dll from being scanned as a plugin.
thanks!
TimbreID On Raspberry Pi
Compiling only TimbreId against pd (not compiling pd source).
To load timbreIDLib, list the path to the timbreIDLib library file in Pd's startup dialog (e.g., /home/yourname/pd_libs/timbreID/timbreIDLib).
timbreID version 0.7 requires the FFTW library, available at http://www.fftw.org.
FFTW is included pre-compiled with timbreID's Windows binary package available through deken. It's fine to simply leave libfftw3f-3.dll in the timbreID directory for use as a shared library. For Linux and Macintosh, FFTW is statically linked with the timbreIDLib library file, so there is no need for compiling or obtaining FFTW.
If you are compliling FFTW yourself, it must be compiled in single precision. To do so in Linux, configure FFTW like this:
./configure CFLAGS="-fPIC" --enable-float
and like this on a Macintosh:
./configure CFLAGS="-arch i386 -arch x86_64" --enable-float
Then run:
make
sudo make install
The FFTW library for Windows is available precompiled at:
http://www.fftw.org/install/windows.html
You will need the 32-bit version, and the single precision version specifically. The provided zip file contains several compiled versions of FFTW, but only libfftw3f-3.dll is required for timbreID version 0.7.
On Linux and Macintosh, the FFTW library files should be installed to /usr/local/lib by default. Once FFTW is properly built and installed, you can make timbreID using the included Makefile by running:
make
You must specify the location of your Pure Data source code directory in the Makefile beforehand. Compilation from source on Windows can be done with the same Makefile if you use MinGW: http://www.mingw.org
On Linux and Macintosh, timbreIDLib will statically link the FFTW library. On Windows, you will either have to set up an environment variable to point to the location of libfftw3f-3.dll, or simply put libfftw3f-3.dll directly in the timbreID directory.
Cheers~
Matrices and reallocating memory
Perhaps we can create a new thread about C optimizations for real time audio.
I would appreciate that, although I wouldn't be much of a help.
I can't recreate the error, are you sure you use the object compiled with the last version of the code. Sometimes on Windows, you really need to clean the project before compiling otherwise the modifications are not taken into account.
I used your updated code, cleaned and rebuilded the project. Still get exceptions, with and without optimizations.
After some exceptions I sometimes have to restart the computer, as pd reacts strange on restarting the debugger.
As I said, I'm new to C and therefore to compiling as well.
I'm on win7, pd 0.47.1, Virtual Studio 2017 RC
I tried to follow your advise and implemented the average with one large vector. But I get errors as well - VS tells me, symbols are missing, but doesn't point me to a specific line.
My code is here:
https://github.com/XRoemer/puredata/blob/master/average~/C/r_average~2 -not working.h
EDIT2:
I made a stupid mistake: forgot to reallocate the avg array. I'll update the code.
EDIT:
I had to leave out EXTERN on meanblock_tilde_setup, as I couldn't compile with it. But I guess this is for CPP only, isn't it?
Also I compiled your meanblock as meanblock.h and not as meanblock.c
The 15 OWL "Faust" patches compiled as 32bit Linux externals (attached)
...in assembling a Big Picture I took time to focus on a small one.
I compiled (really just for kicks to see how hard it was to compile something) the "Audio Patches for the OpenWareLaboratory" at https://github.com/pingdynasty/OwlPatches (only the Faust folder) using the Faust Compiler at http://faust.grame.fr/compiler/.
They seem to be real bare bones but would be cool to make a straight forward sort of plaY-as-you-go guitar-rack. (I don't much else about them except they are basic guitar effects.)
-peace
svanya
p.s. having gotten my first taste of compiling something, I can see why people like it.
External (oggread~) compilation problem
Hello all,
After a few weeks of reading, researching, and attempting to find a reliable way to compile externals, I have most simple cases working such as the tutorial objects found from the IEM tutorials and Eric Lyon's book on the subject.
However, trying to compile Oggread~ from the pdogg library (https://goo.gl/WvPLnW) results in an external that fails to load in PD, throwing the error:
"oggread~.pd_darwin: dlopen(/path/to/external/oggread~.pd_darwin, 10): symbol not found: _ov_bitrate referenced from: /path/to/external/oggread~.pd_darwin
Expected in: flat namespace"
the reference to ov_bitrate is contained in vorbisfile.h, and as far as I can tell, has been linked and compiled correctly.
I hate to ask for help from a community I've just joined, but I've been struggling with this for a few weeks on my own to no avail, so absolutely any insight or help would be appreciated.
I've uploaded the files in question below. The compiled external can be found in the build folder, and all vorbis/ogg header files can be found in the libs folder.
Thank you,
James
How to compile and install a Real-Time Kernel for Debian \#1
original post by Sumidero, cut and pasted from here:
http://puredata.hurleur.com/sujet-5605-compile-install-real-time-kernel-debian
Hello everybody:
After some exchange of posts in this thread:
http://puredata.hurleur.com/sujet-5578-old-toughbook-useful-live-events
I told @katjav and @PonZo that soon I was going to post a log of a Real-time Kernel compilation and installation for Debian based machines, so that Pd would run fast and smooth in any machine, even a small netbook. I only found the log of the compilation of a desktop machine, but the process is the same, adjusting the choices to the equipment features. I hope this encourages you to compile your own Real-time kernel.
You can download the pdf file from here:
http://dl.dropbox.com/u/6086343/HowToCompileARealTimeKernelForDebian.pdf
Extra data:
You can find out the chipset name of your audio card using this command:
# cat /proc/asound/cards
There are some extra tweaks needed to develop real-time performance:
Install jack with its graphic front end:
# aptitude install qjackctl
Once installed, it prompts us to configure automatically this file:
/etc/security/limits.d/audio.conf
We agree and then we tweak this other file opening it with any text editor (always in root mode).
# gedit /etc/security/limits.conf
Then we add these lines at the bottom of the limits.conf file to assign high and real-time priorities to the @audio group:
@audio - rtprio 99
@audio - memlock unlimited
@audio - nice -10
Don't forget to add your user to the @audio group:
# adduser <userName> audio
I hope it works for you too. Best regards to all of you.
Sumidero
Installing PD-extended on Ubuntu 10.10 64 bit
Hello all,
I'm having an issue with pdextended..
installed Lucid 10.04 (amd64 64-bit) ok on Ubuntu 10.10, starts ok w/ no error and loads all libs.
i was testing Gem with the builtin examples.
got stuck on 05.pix_effects.pd : i get a gui exit with segmentation fault as i try to activate any of the pix effect object..
i browsed the web for a solution ,but nothing..
here's the log if i start it from terminal:
aleclofabbro@aleclofabbro:~$ pdextended
tk scaling is 1.2372999304105776
<init> : Avifile RELEASE-0.7.48-100119-23:57-../src/configure
<init> : Available CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf p
<init> : 2403.00 MHz Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz processor detected
pd_gui: pd process exited
Segmentation fault
and this is what i get on pd console, before it crashes
[import] $Revision: 1.2 $
[import] is still in development, the interface could change!
compiled against Pd version 0.42.5
libdir loader $Revision: 1.8 $
compiled on Sep 22 2010 at 16:04:27
compiled against Pd version 0.42.5.extended
GEM: Graphics Environment for Multimedia
GEM: ver: 0.92.3
GEM: compiled: Sep 22 2010
GEM: maintained by IOhannes m zmoelnig
GEM: Authors : Mark Danks (original version)
GEM: Chris Clepper
GEM: Cyrille Henry
GEM: IOhannes m zmoelnig
GEM: with help by Guenter Geiger, Daniel Heckenberg, James Tittle, Hans-Christop Steiner, et al.
GEM: found a bug? miss a feature? please report it:
GEM: homepage http://gem.iem.at/
GEM: bug-tracker http://sourceforge.net/projects/pd-gem/
GEM: mailing-list http://lists.puredata.info/listinfo/gem-dev/
GEM: compiled for SIMD architecture: SSE2 MMX
GEM: using SSE2 optimization
libdir_loader: added 'cyclone' to the global objectclass path
libdir_loader: added 'zexy' to the global objectclass path
libdir_loader: added 'creb' to the global objectclass path
libdir_loader: added 'cxc' to the global objectclass path
libdir_loader: added 'iemlib' to the global objectclass path
libdir_loader: added 'list-abs' to the global objectclass path
libdir_loader: added 'mapping' to the global objectclass path
libdir_loader: added 'markex' to the global objectclass path
libdir_loader: added 'maxlib' to the global objectclass path
libdir_loader: added 'memento' to the global objectclass path
libdir_loader: added 'mjlib' to the global objectclass path
libdir_loader: added 'motex' to the global objectclass path
libdir_loader: added 'oscx' to the global objectclass path
libdir_loader: added 'pddp' to the global objectclass path
libdir_loader: added 'pdogg' to the global objectclass path
libdir_loader: added 'pixeltango' to the global objectclass path
libdir_loader: added 'pmpd' to the global objectclass path
libdir_loader: added 'rradical' to the global objectclass path
libdir_loader: added 'sigpack' to the global objectclass path
libdir_loader: added 'smlib' to the global objectclass path
libdir_loader: added 'toxy' to the global objectclass path
libdir_loader: added 'unauthorized' to the global objectclass path
vbap - v1.0.3 - 12 Aug 2006 - (c) Ville Pulkki 1999-2006 (Pd port by HCS)
libdir_loader: added 'pan' to the global objectclass path
libdir_loader: added 'hcs' to the global objectclass path
libdir_loader: added 'jmmmp' to the global objectclass path
libdir_loader: added 'ext13' to the global objectclass path
libdir_loader: added 'ggee' to the global objectclass path
libdir_loader: added 'flib' to the global objectclass path
libdir_loader: added 'ekext' to the global objectclass path
libdir_loader: added 'flatspace' to the global objectclass path
PDP: pure data packet version 0.12.6
PiDiP : additional video processing objects for PDP
version 0.12.26
by Yves Degoyon and Lluis Gomez i Bigorda
[pdp_text] using font : UnBatang/14
[pdp_qtext] using font : UnBatang/14
thanx to all in advance
Error compiling PD-extended
[tim@vosto src]$ uname -a
Linux vosto 2.6.33.5-124.fc13.x86_64 #1 SMP Fri Jun 11 09:38:12 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
[tim@vosto src]$ cd /pd/src
[tim@vosto src]$ ./configure
bash: ./configure: No such file or directory
[tim@vosto src]$ sudo autoconf
[tim@vosto src]$ sudo ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for an ANSI C-conforming const... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking bstring.h usability... no
checking bstring.h presence... no
checking for bstring.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for gettimeofday... yes
checking for select... yes
checking for socket... yes
checking for strerror... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for dlopen in -ldl... yes
checking for sin in -lffm... no
checking for sin in -lm... yes
checking for pthread_create in -lpthread... yes
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for main in -ltcl85... no
checking for main in -ltcl8.5... yes
checking for main in -ltk85... no
checking for main in -ltk8.5... yes
.................... alsa= yes
checking for snd_pcm_info in -lasound... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
./configure: line 5767: syntax error near unexpected token `SINF,'
./configure: line 5767: `AST_EXT_LIB_CHECK(SINF, m, sinf)'
I can't solve this compilation error. Can anyone help?
I found a similar problem here: http://bbs.archlinux.org/viewtopic.php?id=86440
Unfortunately the planet CCRMA packages are quite fare behind the fedora releases, otherwise I'd use them.
Problem with Snow Leopard and Flext
I have a problem with flext and the modules compiled with it.
I'm using Apple Snow Leopard (10.6.2) on my macbook (white, mid 2007 intel core 2 duo 2,16GHz).
I could compile flext itself configuring it for ARCH=i386 only and the compiler and linker flags for a min version 10.5 and also I used the solution they gave here: http://www.mail-archive.com/pd-list@iem.at/msg29829.html to solve a problem with bits/atomicity.h while building it.
Once compiled and installed flext I built and installed some modules from the tutorial to try them but when I add them to a patch Pd (vanilla & extended) crash.
I try also to compile flext and the module adding the flags for the compiler and the linker like explained here: http://www.mail-archive.com/pd-dev@iem.at/msg06512.html
And again the same result.
The problem is that I don't know a way to debug it because PD just closes.
Any help will be absolutely useful!
Thanks
Miguel.