Layout
libpd has moved to GitHub: https://github.com/libpd
Project layout
The core project currently consists of five repositories (recently, three more repositories have appeared, for JACK, Pd and JACK, and Pd/JACK for Processing, but they are not part of the core project layout):
- git://gitorious.org/pdlib/libpd.git: The core library, including Pd sources and glue for various languages
- git://gitorious.org/pdlib/btmidi.git: Support for MIDI over Bluetooth on Android devices
- git://gitorious.org/pdlib/pd-for-android.git: The core Android library project for building Android apps with Pd, as well as a number of sample apps
- git://gitorious.org/pdlib/pd-for-ios.git: Sample apps for iThings
- git://gitorious.org/pdlib/pd-starter-kit.git: Somewhat unrelated, a collection of simple patches for making noises with Pd in a hurry
pd-for-android and pd-for-ios contain libpd as a git submodule. In order to clone pd-for-android as well as all dependencies, perform the following steps:
git clone git://gitorious.org/pdlib/pd-for-android.git
cd pd-for-android
git submodule init
git submodule update
This is all it takes to get started with the new layout. Once you have a copy of new layout including libpd, you can update them by typing the following in the pd-for-android root directory:
git pull
git submodule update
The steps for pd-for-ios are analogous.
Note: The steps listed here use the git protocol, which will let you check out repositories even if you don’t have an account at Gitorious. If you want to makes changes and push them to Gitorious, you need to have an account, upload your public SSH key, and check out the code using SSH. For instance, you would check out pd-for-android by saying git clone git@gitorious.org:pdlib/pd-for-android.git.
Layout of the libpd repository
The repository of the core libpd library (git@gitorious.org:pdlib/libpd.git) is laid out as follows:
pure-data: The folder containing the sources of Pd Vanilla and standard externals. This subtree is a subset of Miller Puckette’s official Pd git repository, available at git://pure-data.git.sourceforge.net/gitroot/pure-data/pure-data. You can delete the pure-data branch from the libpd repository and substitute a clone of Miller’s repository and libpd will still build and work just fine. We’re keeping our own copy of the sources of Pd in order to have the option of adding optimizations and other changes that may not make it into the official version any time soon, but the overall policy is to maintain compatibility with the official version. Please don’t make any incompatible changes in the pure-data branch, and don’t add anything specific to libpd that you wouldn’t expect to eventually be merged into the official version.
libpd_wrapper: This folder contains the source files that make up the core of libpd.
Android.mk, Makefile, Makefile.mac: Makefiles for building libpd for various platforms. I figure the Android makefile is pretty much finished, but the build system for other platforms still needs work. The makefile for building shared libraries on Linux is crude but functional. The one for Macs is tentative and untested, and we currently don’t have a makefile for Windows. Feel free to improve the build system in any way you see fit.
.project, .classpath: An Eclipse project for using the Java bindings outside of Android projects. Just ask Eclipse to import a new project from existing sources and point it to the libpd folder.
java, objc: Glue for using libpd with Java and Objective C. The Java part is pretty much done, I think. As for the rest, feel free to improve or add support for other languages such as Python or Lua.
samples: Currently, this branch only contains one small sample program in C built on top of libpd. It’s probably redundant, but it may give you an idea how to embed libpd into your own applications.
Adjusting existing Android projects to the new layout
Existing Android projects referencing PdCore as a library project will need to be updated to work with the new layout. The sample projects in pd-for-android are already updated; just pull the latest revision of pd-for-android, make sure to pull the libpd submodule as well (above), and refresh/rebuild your project. If you have an existing project outside pd-for-android, it is easy to adjust if you’re using Eclipse: Update your copy of pd-for-android and make sure to pull the libpd dependency. Then refresh your project in Eclipse, open the project properties, remove the dependency on the PdCore library, click on “Apply” (you may see some error messages at this point; that’s okay), then add the PdCore library as a dependency, click on “Apply” again, and everything should work.
You may run into the “gen folder not found” problem of Eclipse/ADT, but that’s easy to fix: Build the project, remove the gen folder, build the project again, and everything should be fine.

