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.

Cannot open sound file from the application (iOS) using [tabplay~]

NaskerNasker Posts: 4
edited April 2013 in Pd Everywhere

Hi there,
I'm on my first steps building libpd-iOS apps. I have a simple patch that it's suposed to playback and audio sample. The patch works fine (opens and plays the sample if I run it from PD) but when I run the iOS app, I can't make the sample load. I can "solve" that, proving that the app it's working fine if I "hardcode" the sample making the array save it's data inside the patch. That way the app can make the sample sound. As you can understand, this is not it's suposed to be; I want to dinamically load different samples and not having to attach the samples to the patch.
Any help around that issue?? I guess that it might be something related to path files and stuff but I have tried different things taht didn't work!
Thanx so much!


  • pbrinkmannpbrinkmann Posts: 686 ✭✭

    It's almost certainly a path issue. Usually the best solution is to use relative paths throughout. When you develop your patch with Pd, use relative paths only, then copy the entire directory structure containing your patches and sound files into your app. Then the patch should work the same as before, and it should be able to find the sound files.

  • NaskerNasker Posts: 4

    First of all, thanks for libpd and the book and all the stuff, they're all great!
    I recall the samples relatively, let's say i have a PD folder with two subfolders: samples and patch. Obviously inside the patches folder i have my patch and the message to load samples :[ read -resize ../samples/filename.aif sample( . This works always from pd but doesn't work at all inside iOS (it seemed to work a few times but not now). Maybe what I'm doing wrong is the way I import this folder to the xcode project. Should I copy it or just reference it??

  • pbrinkmannpbrinkmann Posts: 686 ✭✭

    I think you need to copy it, but it's been over a year since I last looked at iOS development, so my recollection is getting a bit fuzzy.

Sign In or Register to comment.