Run your Pure Data patches on Android with native GUIs emulated.
(Unzip the zipfiles onto your device's sdcard e.g. into /sdcard/PdDroidParty/)
Get the GPLv3 source code from GitHub
On iOS? Check out PdParty for iOS.
Need help? Ask a question on the Pure Data mailing list or the Pure Data Forum.
1. Create a new Pd patch called droidparty_main.pd in a subdirectory. This patch will contain your GUI objects like sliders, toggles, numberboxes etc. If you have an existing patch you want to run with PdDroidParty you can create the droidparty_main.pd patch in the same directory.
2. PdDroidParty GUI patches will be scaled to fit the screen of the device. Your patches should have the rough dimensions of a phone/tablet in landscape mode (e.g. 3:2 aspect ratio or e.g. 480x320 should usually work well). If it's not exact it doesn't matter - the GUI elements will be scaled.
3. Numberbox, Sliders, Toggle, Comment, Bang, and Canvas are currently rendered by PdDroidParty, although not feature complete. Check out the GUI abstractions in the droidparty-abstractions.zip file - these are also supported natively. See the Abstractions section below for more details.
4. All GUI elements should communicate with the main audio patches using send and receive only. You can usually set send and receive for each GUI by right clicking on the object and choosing 'properties' in Pd. Do not directly connect cables to the GUI elements as they won't work. It helps to keep the GUIs on their own in the droidparty_main.pd file and have it include the logic of your patch as an abstraction or subpatch containing senders and receivers for interfacing with GUI elements. This is good patch design practice anyway as it is basically a model-view-controller methodology.
5. Copy the entire directory containing your droidparty_main.pd onto the sdcard of your device under a directory called PdDroidParty. You can usually do this over USB with most phones and tablets by mounting your device as a hard drive on your computer. For example your directory called MyPdPatch containing a patch called droidparty_main.pd could be copied to /sdcard/PdDroidParty/MyPdPatch on your device.
6. Run PdDroidParty and you will find an entry named after your subdirectory. Tap it to load your patch.
As well as the supported internal objects listed above the following abstractions work in Pd and are emulated natively on the device. Load the file droidparty-abstractions/_OVERVIEW.pd for more details and specific usage:
You can theme all of the defult non-SVG-themed widgets with a font other than the built-in courier font. Put a TTF font file of your choice in the patch directory and call it 'font.ttf' if you want aliased rendering, or 'font-antialiased.ttf' if you want anti-aliased rendering. This will cause PdDroidParty to render that patch with the font you have chosen.
It's possible to theme your patches with SVG images now. You can theme the following Pd GUI objects: canvas, numberbox (the abstraction), sliders, taplist (abstraction), toggle, touch (abstraction), wordbutton (abstraction).
To theme e.g. the toggle, create an SVG called Toggle.svg in the directory holding your droidparty_main.pd patch. You can also have separate images for specific toggles by using their send name or label name in the SVG filename. For example a toggle with a send name of "mysend" could have an SVG called Toggle-mysend.svg which would override the default Toggle.svg image. Send and label names are split on the hyphen ("-") character so for example if you have two toggles with send names of mysend-1 and mysend-2 you could theme them separately with Toggle-mysend-1.svg and Toggle-mysend-2.svg or you could theme them with the same image by creating a file called Toggle-mysend.svg which would apply to both.
The SVG renderer is not very robust, so the best way to design your own widget graphics is to start with the widget graphics in droidparty-tests/svg-widgets/*.svg and modify them. The renderer only really works on plain paths, so make sure you convert any objects like rectangles or circles to plain SVG paths. The renderer used is a fork of svg-android with some support for Inkscape hacked in.
You can put three special attributes on the SVG element using a text editor, for font customisation. They are textFont, textColor, and textAntialias.
You can use the PdDroidParty code base to bundle your own Pd patches as standalone Android apps.
There are some good tips for Windows users in this forum thread.
If you make an app based on this source code, I would love to hear about it.
Copyright Chris Mccormick 2011-2013. With contributions from: Kishan Muddu, Antoine Rousseau.
Made with libpd by Peter Brinkmann and Pure Data by Miller S. Puckette. They are BSD licensed.
Portions of this page and the PdDroidParty software contain modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.