Processing sound library on pi

Hi all, me again
The sound library is working fine on the pi, but I am getting an issue (and I noticed someone on GitHub having a similar recent issue, but as of now that thread is unresolved)
I am trying a super simple play back sketch but when I try to load a three minutes long uncompressed wave file I get an
ArrayIndexOutOfBondsException: 3 Message from the Processing compiler. I am guessing it is more of a java issue, but I don’t know how to fix it. Is there a maximum file size for Audio on the Pi ? (I am guessing not since I am using a 16GB simcard for storage) Any ideas what this problem could be?
Many thanks

@gwenn That’s with the latest Processing Sound library?

Yes, the latest version

@gwenn I see - this is then probably the same as Issue #14. You might want to post one of the files that doesn’t work for you there.

This this gets fixed, you could try using the old sound library. Its latest (last) release does support ARM platforms, such as the Raspberry Pi.

Edit: alternatively, you could also try using the Minim library.

Hi Gotfried. Thanks for responding. In the end I chose to use Minim because I am already familiar with it. And now everything works. I still get weird messages in the P5 compiler window but I think it has more to do with Java and the code used in the playback example. In any event sound plays and it sounds good.

To reiterate I am playing back audio on the pi 0. I used Adafruit example to reassign some of the pins. YOU can play audio out of the pi 0 (without spending money on a usb gadget). Let it be known :slight_smile:

1 Like