What if you could make any device or any software a re-programmable musical instrument, effect, or soundmaker? Your phone could be a touch-controlled effect, your tablet a sketchpad for interactive drum sequencers. Patches assembled on your desk on a computer could be taken with you in your pocket. And what if you could do all of this for free, using a time-tested environment?
libpd, authored by Peter Brinkmann, takes on that vision. It’s a way of making Pure Data (Pd), the visual development tool for interactive music and media, more accessible across a range of applications and gadgets. It lets you embed Pd pretty much anywhere. It’s not a new version of Pd. Instead, it makes use of the standard, “vanilla” distribution of the free and open source software. What’s different is that it separates the sound processing part of Pd from the part that talks to audio hardware, allowing Pd to run on a greater variety of mobile devices and inside other applications.
- turns Pd into an audio synthesis and processing library
- liberates Pd from GUI and drivers
- allows for easy communication between Pd and the code into which it is embedded (so you can send and receive messages with your Pd patch)
Today, a team of developers and testers (including myself) is releasing the first version of libpd. It’s free to use on any device you wish, and free to modify. Because of its licensing, you can even build commercial applications with it. (That is, yes, it’s open source – but yes, it can also be useful if you’re a commercial developer. You don’t have to choose.)
http://gitorious.org/pdlib | community discussion
We’re just pleased to have a tool that makes experimenting with sound and music quicker, easier, and more flexible and compatible. It’s more fun that way.
Supported Platforms, What You Can Make
Right now, today, you can use libpd with:
Android: Thanks to Google’s NDK (Native Development Kit), you can use libpd with any Android device running OS 1.6 or later. Note that devices without the Google Market are often non-standard in other respects, so your mileage may vary, but we’ve found a wide variety of devices work quite well, including the Motorola Droid and Droid X, HTC Legend, and Google NexusOne.
iOS: iPhone and iPad models with the latest, armv7 processors work (3GS, iPad); we’re working to extend compatibility across more devices. Working with Peter Brinkmann, the RjDj development team contributed (and continues to contribute) free code that’s making iOS support compatible and high-performance. But the Objective-C classes mirror the Android and Java classes, meaning the two will stay in sync, and once you’ve learned one, the other will be a piece of cake. (Or coffee. Or cocoa. Or whatever.)
In each case, you just need libpd, Pd for making your patches (graphically), and a copy of the SDK for each mobile platform you want to use.
Additionally, you will soon be able make user interfaces for libpd using cross-platform HTML5, via Chris McCormick’s project WebKitPd. (It’s not quite ready for consumption yet, but will also be free and open source.) Android was the impetus and initial test platform for libpd, so right now it’s the most mature. But we hope to improve iOS compatibility and testing next.
Some Sample Apps to Try for Android
libpd is really aimed at developers who want to embed Pure Data into mobile devices, games, and so on, and soon also people working with Processing, Open Frameworks, and the like.
But if you’re eager to try this out as an end user, there are a number of packages you can try. They don’t show off everything libpd and Pd can do, but they do allow you to load up something on your device and make some noise.
Download the test packages from the libpd site:
It includes a scene player for RjDj (see below).
Among the code included in the repository is one complete app, Peter Brinkmann’s own Circle of Fifths. He tells us:
Circle of Fifths: I wanted a circle of fifths tool for the subway, with exactly this kind of GUI. It also nicely illustrates the newly possible separation of concerns — Pd only does DSP, and an elaborate GUI is built somewhere else. It’s a demo and not optimized for universal consumption. In particular, it’s a bit CPU hungry because it’s actually simulating six Karplus-Strong strings in real time.
Of course, if string simulation is what you want to do, this also illustrates that you can – even on a phone.
Chris McCormick has created two libpd-based apps, one of which I feature in the video above. Can of Beats also makes use of WebKit as its UI rendering engine. Chris describes what he’s made:
Can of Beats: This is a procedural hiphop beat generator. The beats are generated using simple hand-crafted probability weightings for each type of sound at each position in the beat. In the Android app, you can also input simple melodies or basslines to go along with the beats.
Garage Acid Lab: This is an algorithmic, 303-style acid bassline generator. The app will make you an infinite number of different acid bass lines and garage style beats. You can also have some fun with the cutoff filter and delay unit settings with a kaos-pad style input. I want to work on this app a bit more to provide an ‘advanced’ mode which will let you write custom basslines, beats, and have more control over the effects. http://mccormick.cx/projects/GarageAcidLab/
RjDj, RjDj team. If you don’t know it by now, RjDj is a fantastic application built on Pd that makes interactive musical and sonic experiences deliverable in the same way as a digital album, not only to musicians, but anyone who wants to experience music and sound in new ways. libpd makes use of code contributed by RjDj. Future development on RjDj will use libpd. (More on those libpd-based versions, and the evolution of RjDj and RjDj Voyager, soon.)
Where to Get It, Where to Get Involved
1. Get the library. To get started, download libpd from its Gitorious source repository:
You’ll need Pd, too, if you don’t have it; vanilla Pd builds are available from the official Pd download page.
2. Join the community. You can discuss patching for libpd, developing using Pd, and making instruments and effects and other sonic creations for gadgets everywhere on our new community group:
That will be a location specifically dedicated to the unique challenges of working with mobile gadgets; of course, see also the other great community resources for Pd.
Who made this: libpd was conceived by a team including Peter Brinkmann, Hans-Christoph Steiner, and myself, with input from the RjDj team (particulary Martin Roth). It was primarily developed by Peter Brinkmann, who applied his talents and the work he has done in JJACK, a Java API for JACK, with additional contributions and testing by our team and by Chris McCormick. Major thanks to Martin Roth and the folks at RjDj, to Miller Puckette (creator of Pd), and the generous attendees of our first hackday at the NYC Patching Circle, along with others who are testing now.
Tutorial Next Week; Your Feedback Wanted
I’ve been preparing a tutorial for working with libpd Android (initially), to be followed eventually for developing on iOS devices once we have a better handle on making that go smoothly. We’ll have a complete tutorial for you by next week. Processing is then my next priority.
An FAQ will also be available by then. That means, first, ask some questions!
Got specific questions about what this is for? How to get started? What you’d like to see in the tutorial? Ask away.
And please do get the discussion going not only here in comments, but in the Pd Everywhere group. (Noisepages registration is now open; if you have any trouble, let me know and I’ll sort you out.)