# Raspberry Pi - Sound not playing from Processing

**URL:** <https://discourse.processing.org/t/raspberry-pi-sound-not-playing-from-processing/8286>\
**Category:** Processing for Pi\
**Created:** [February 11, 2019, 6:50am UTC](https://discourse.processing.org/t/raspberry-pi-sound-not-playing-from-processing/8286 "2019-02-11T06:50:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhythmrascal](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@rhythmrascal](https://discourse.processing.org/u/rhythmrascal)\
**Post date:** [February 11, 2019, 6:50am UTC](https://discourse.processing.org/t/raspberry-pi-sound-not-playing-from-processing/8286/1 "2019-02-11T06:50:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [February 11, 2019, 7:56am UTC](https://discourse.processing.org/t/raspberry-pi-sound-not-playing-from-processing/8286/2 "2019-02-11T07:56:29Z")

</div>

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](http://p5js.org) like sketch  
[p5.js Web Editor](https://editor.p5js.org/kll/sketches/rkIQz9LhQ)  
! and only as long i am LOGIN!!! ( very spooky )  
pls listen in:  
[http://kll.engineering-news.org/kllfusion01/downloads/VID\_20190211\_145928.3gp](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 )

 ![2019-02-11_18-44-23_snap](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/cf8de4e6594bc7f443b3ce86af5e8743cd81028b.png)  
if login i hear that noise!  
 ![2019-02-11_18-45-11_snap](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e2fcb83a365866fb4ccfcaab7b95afc79d214802.png)  
@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

---

<div class="post-metadata">

**Author:** ![packplusplus](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@packplusplus](https://discourse.processing.org/u/packplusplus)\
**Post date:** [November 29, 2019, 8:43pm UTC](https://discourse.processing.org/t/raspberry-pi-sound-not-playing-from-processing/8286/3 "2019-11-29T20:43:36Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 30, 2019, 1:37am UTC](https://discourse.processing.org/t/raspberry-pi-sound-not-playing-from-processing/8286/4 "2019-11-30T01:37:16Z")

</div>

if you link to your  
[https://editor.p5js.org](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
