Pure Data for Android
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.circleci Migrate to CircleCI 2.0 (#81) Jun 30, 2018
CircleOfFifths Upgrade to Android gradle plugin 3.0 Nov 11, 2017
PdTest Target API Level 28 Aug 11, 2018
ScenePlayer #60 add 'arm64-v8a' 'x86_64' to NDK build Jul 1, 2018
gradle/wrapper Upgrade to PD 0.48 (#70) Jun 29, 2018
.gitignore added pd external example to PdTest Dec 20, 2015
.gitmodules replaced midi submodule with a jitpack dependency Nov 18, 2015
README.md Update README.md Jul 1, 2018
build.gradle Target API Level 28 Aug 11, 2018
gradlew.bat Upgrades to gradle 4.3.1 Nov 15, 2017
settings.gradle Upgrade to buildToolsVersions 23.0.2 Feb 8, 2016


Download Release Circle CI

Join the chat at https://gitter.im/libpd/pd-for-android - Try the chat for problems with setting up the library to work with your app

StackOverflow - For questions regarding libpd

How to use the library

Make sure you have JCenter in your repositories:

allprojects {
    repositories {
        // ... other repositories

Add the dependency to your app:

dependencies {
    implementation 'org.puredata.android:pd-core:1.1.0'
    // ... other dependencies

Please note that pd-for-android depends on the vanilla version of Pure Data. Currently this is Pure Data vanilla version 0.48-0. You can get desktop distributions of it here: http://msp.ucsd.edu/software.html

If you're building the patch for your app using the extended distribution of Pure Data, or any other distribution that is not vanilla, you should be careful not to use PD objects that are not part of the vanilla distribution, because these will not work with libpd out of the box. It is however possible to add PD externals to your pd-for-android app. For a simple example as to how this could be done see the PdTest app in this repository, specifically the jni folder and the build.gradle file. If you take this path, you'll need to clone this repository and use it as the base folder for your app, similar to the way described in the following section on creating an .aar file.

How to create an .aar file of pd-for-android

Using the terminal

  1. Clone this repository
  2. Go to the repository folder: cd pd-for-android
  3. Initialize and udpate the git submodules: git submodule update --init --recursive
  4. Assemble the release: ./gradlew PdCore:assembleRelease (Note: Windows users should run gradlew)
  5. Now you have your PdCore .aar file in the folder PdCore/build/outputs/aar

Installation of the Android SDK and NDK is required. Specify the NDK location by adding an ndk.dir property to a local.properties file in the pd-for-android root folder, or by defining an ANDROID_NDK_HOME environment variable.

Using Android Studio

  1. Install Android Studio
  2. Make sure the Android SDK and NDK tools are installed and that Android Studio is properly configured to use them
  3. Clone and initialize this repository as per steps 1-3 above
  4. Create a new Android Studio project by importing settings.gradle from the pd-for-android root folder: File > New > Import Project...
  5. Open the Gradle Toolbar and run the task assembleRelease in the project :PdCore