To register and login, use your Google, Twitter, Facebook, LinkedIn, or OpenID credentials.

This is allowing us to stop most spam registrations. We've deleted most of the spam accounts that got through, and we're closely watching for more.

LibPD + Processing + Android tutorial

rjmarsanrjmarsan Posts: 70
edited 11:48AM in Pd Everywhere
I wrote up a tutorial about working with all 3 a while ago, but never got around to posting it in it's own topic until now.

Let me know if anyone finds it useful.


  • pbrinkmannpbrinkmann Posts: 686 ✭✭
    Hi RJ,
    Thanks for writing this up! A few minor suggestions:
    * Make sure to tell people to use Eclipse 3.7 or later.
    * Use "File->Import->General->Existing Projects" rather than "File->New" when importing the projects in pd-for-android. You can just select the pd-for-android directory and Eclipse will import all projects at once.
    * If you check your project configuration into git, people will be able to import your project the same way.
    * references a Java class that I removed from recent versions of pd-for-android. It's easy to fix: Just organize the imports in YayProcessingPD (Cmd-Shift-O).
    Other than that, it looks great!
  • Thank you for posting this RJ. Really useful tutorial indeed. In a day I was able to get all the components working together. All in all good learning experience. Keep up : )
  • pbrinkmannpbrinkmann Posts: 686 ✭✭
    By the way, I have since refactored the Processing branch of libpd to work with Android. If you update your copy of pd-for-android, you should see a new sample project call PdP5Sample (make sure to update the libpd submodule as well). The sample project is basically RJ's YayProcessingPD updated for the new Processing support of libpd. Installation instructions are here:
  • Thank you for your reply Peter. Got your new example running smoothly. Good luck to you both on your creative computing endeavors.

  • kamborkambor Posts: 7
    First of all, thanks for taking the time to write a tutorial.

    I took all the steps I could but I cant compile the PdP5Sample, Eclipse throws "Unable to resolve target 'android-10' " error.

    I think I've installed everything correctly, with the proper versions and all, but I don't know. I don't have a strong background in programming as I'm a musician, so if anyone has idea of what is happening, please be my guest!
  • kamborkambor Posts: 7
    I've tried selecting the PdCore version from the project properties menu, but it jumps an exception window in parseSdkContent "java.lang.StackOverflowError".

    When I open the project again, I can't do that anymore, and the "problems" tab tells me that the "gen" folder is missing, among other things.

    I got the zip version of libpd, I tried to make the git thing but it kept telling me that it weren't a repository so I assumed that I already had the latest version available or that the tutorial was outdated. I don't know what else to do, really...
  • kamborkambor Posts: 7
    Well, I give up! lol. Making this is over my head. Please consider keeping a binary compilation of the las release of libpd for people like me, who can't compile all this but could make it work with processing.

    Keep the hard work!
  • rjmarsanrjmarsan Posts: 70
    I'm sorry you're having trouble.

    For the “Unable to resolve target ‘android-10?" error, it's most likely caused by the fact that you don't have android sdk 10 installed (honeycomb).  You can easily install it with the 'android' tool that comes with the SDK.

    Not sure about the StackOverflowError.
  • plandpland Posts: 93
    Jorge: you really must use the git repository as it definitely RJ points out, the 'android-10' error is a target problem and you can firstly install the sdk through the ADT tool, but also, look at the androidmanifest.xml file and make sure the Target, minimum and max versions of the SDK property point at the SDK you want to work with (i.e. the sdk your phone is running, for example)...get in touch with me if you can't get it working after this, I've just taken a whole bunch of students through using the new libpd github repo successfully, so I'm sure I could help you.
  • kamborkambor Posts: 7
    Thanks RJ and David!

    I'll try it again later in the day and post the results here. Thanks again for taking the time!
  • plandpland Posts: 93
    No worries. Just let us know how you got on. I'm in meetings all day but I could screencast the setup process tomorrow morning if you still can't get anywhere (eclipse isn't the friendliest IDE to get started with!).
  • kamborkambor Posts: 7
    The target error went away (finally!). I've been able to run git succesfully by pure luck using mingw, and it seems that it was what caused the problem. Also, it seems Eclipse has a "bug", so for any newbies like me, in case you come up with just an error saying "missing /gen folder" or something like that, just rebuilding should make it go.

    I still get errors in PdP5Sample: The container 'Library Projects' references non existing library 'C:\pd-for-android\PdCoreP5\bin\pdcorep5.jar'
    Do I need those projects, what are they for?

    Thanks again for the support guys!
  • kamborkambor Posts: 7
    It seems this new error comes from PdCoreP5, as it says: The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
  • plandpland Posts: 93
    Look under File-Properties for each project...are you pointing at the right libs? For PdCoreP5, you'll want to point at Processing...
  • kamborkambor Posts: 7
    Yes that was it! I had to "file/import/general/file system" the core.jar library from the processing instalation folder. Everything compiles fine now! I owe you a beer David, thanks a lot for your help.
  • abeshiusabeshius Posts: 9

    thank you so much Rj! You tutorials as well as your application really helped us a lot to develop our own little sequencer using libPd+processing+controlP5 for android. We would love it if you could give it a little spin!

    You guys are awesome.

Sign In or Register to comment.