no sound or video playing in sketch.

edited May 2016 in Raspberry PI

Hi, I am using processing 3.1 on my ubuntu 16.04 laptop. A small test sketch with minim library works fine on the laptop, so I guess the syntax etc is all fine. However, on the Pi3 (armv6), there is no sound. The sound file can play directly, but not when run in the sketch. I’m guessing there is something wrong at the Pi end of things...

Video sketches wont play on either laptop or the Pi. I get an error code of can’t load file. (it IS in the data folder, and again, will play directly) I have tried .mov files and mp4 files. Nothing loads.

Any clues for a stumbling fool?



  • I never managed to get minim working on my pi3 - I stuck with beads instead, which works nicely, though the pi Zero stutters away & is underpowered for my project (6 voice sampler player). Can you get any sound out of minim on the pi?

  • hmmm. That's grim news :( No luck with Minim yet. A bit of Dr Google-ing revealed issues with the right type of audio jack lead. I swapped around and have got SOME sound from the pi, but that was only direct from file, not via processing or minim. I'm a bit (very) noobie with this, had a look at beads, but couldn't see how it worked or how to write the code that puts it in a sketch, loading and playing audio files. ANy clues on that? Cheers.

  • Slightly steep learning curve at first but recipes in link below (sonifying processing) all worked well for me when copied & pasted - try the sine wave player to check it works then chapter 4 for sample player. I'm using processing 3.0.1 currently, just in case that makes a difference... The sound quality of the main pi audio out is shocking - the phatDAC from pimoroni or other pi suppliers is much better - pimoroni site tells how to set it up as there's one line that needs changing. Good luck!

  • thanks for that. I shall get to trying Beads again. As you say, it does look like a bit of a steep learning curve...all I need to do is play an audio track for an installation. Experimental sound can come later. I've ordered the phatDAC so lets see what I can manage! :)

  • OK. Seems we need to dig further. Just installed beads on to my desktop as well as the pi. C&P'd the sine played fine on the desktop, nothing on the pi. The beads sketch was running on the pi, the canvas popped up in all its 400,300 glory. But no audio. The one sound I CAN hear though, is that of me weeping.

  • Sorry to hear that - really hard to know how to troubleshoot it - have you played around with raspi-config (>sudo raspi-config) and set the audio out? options are HDMI or main out, though probably leave it as default & get the phatDac on there asap, make sure to change the line I mentioned above. Heresy, I know, but you could use python instead - if you just want a sampler player. I've got my sampler written in processing running nicely now, so it can be done - hardest point was the electronics to interface with modular kit, which spits out 12v signals and would toast a pi. I'll post the code on github when I get a chance, but probably more than you need right now.

  • Hi again, fuzzySi. So, i've tried the phatdac etc, nothing doing so far. Though maybe that's down to my poor soldering skills. Who knows. I'll come back to that. Still, a BIG SOLVE has happened. I binned the native OS and installed Ubuntu Mate 16.04 as that now has an arm Sound works. Minim library works. Will play more with it later but for now, that was a simple and uncompromising work around. I'm more ta home with ubuntu anyway. cheers for your help :)

  • Cool, glad it's working. Is ubuntu mate noticeably slower? Latest MagPi suggests it's not that bad, but until now the extra overhead has put me off. Does phatDAC work on ubuntu?

  • Haven't tried the phatdac with ubuntu yet. Rushed of off my ass with work n stuff. Couldnt tell if there if there is any noticeable lag in performance as I havent done enough to compare. Still, the pi3 seems to handle things it in a very acceptable way, AND of course there is the minor fact that my sketch actually works at last. I'll take the lag if thats the price :)

Sign In or Register to comment.