Raspberry Pi - Sound not playing from Processing

When I attempt to play sound via Processing, I get a fast pace pulsing click that starts after a couple of seconds. With no other sound coming from the speaker. The sound is via the HDMI connection. If I plug in headphones to the audiojack it doesn’t change anything.

I’ve tried several different sketches, including the sample sketches provided by Processing and I can’t get sound to play on my Raspberry Pi.

  • I’ve tried mp3, aif, and wav files.
  • I tried playing some of the files via the VLC player outside of processing. Some worked, some didn’t. If it’ worked in VLC i then tried it through Processing with no change in results.
  • I took the same audio files and dragged them into the Chromium browser and they played just fine.
  • via command line - aplay failed to play the files in a normal manner (sounded real static)
  • some of the files I’m trying are 8 bit others are 16 bit. One hasn’t worked better or more consistently than the other.

My set-up

  • I’m using Raspbian and the latest build ie Stretch.
  • Raspberry Pi 3 Model B+
  • TV connected via HDMI cable
  • Processing 3.5.3
  • My cat has been supervising

Any insight is welcome

1 Like

do not blame the cat!

i have same setup:
-a- RPI Raspbian
-b- HDMI TV/Monitor with sound
-c- processing 3.5.3


now that funny noise from the speaker i also have!
but only when i play
p5js.org like sketch
p5.js Web Editor
! and only as long i am LOGIN!!! ( very spooky )
pls listen in:
http://kll.engineering-news.org/kllfusion01/downloads/VID_20190211_145928.3gp
the noise seems related to drop in FPS ( that’s why i choose this example )


if login i hear that noise!

@kjhollen any idea why login lets the FPS drop like that? server communication would be only required on menu operation??


with that in mind i open processing 3.5.3
in p5.js Mode
copy paste same sketch and run it,
but not hear anything.


in both that is not a sketch what use any sound lib.

when i use processing 3.5.3 in Mode p5js
and test any “p5js example sound” it works.
but i see the red warning

no content type found for .mp3


when i use processing 3.5.3 in Mode Java
and test example from Minim ( all P3D )
there is a 5 sec start delay for the sketch but
then the sound play fine.


oh yes, RPI settings!!!

  • i use the GLdriver Legacy / not KMS
  • memory split is on 128
1 Like

I am in the same boat. I even converted the mp3 to a wave. Plays just fine on my macbook, just makes a long thin creek on my pi (thru hdmi).

if you link to your
https://editor.p5js.org project
( what will show us your CODE / allow access to the WAV )
i can play with it on WIN 7 / WIN 10 / RASPBIAN

also you might mention your RPI setup,
i use RPI3B+
and RASPBIAN BUSTER

  • first version for RPI4 updated

or

  • latest version where all the video things for processing are different