P4 on Raspberry Pi500 Sound Library

//================================================
// Sound Check
//
import processing.sound.*;
SoundFile A;
void setup(){
  size(100,100);
  A = new  SoundFile(this,"snd01.wav"); A.play();}
void draw (){noLoop();}

Produces this error -
Sound library warning: Did not find any sound devices with input channels, you won’t be able to use the AudioIn class

Hi @walterwright,

The RPi500 does not have any built-in analog audio capabilities. You would have to use USB or Bluetooth to receive both audio input and output. If your monitor supports audio, the RPi may playback audio through the monitor’s speaker. That error indicates that there is no microphone detected. However, the soundfile should still play if you have an output device attached.

I have a monitor attached. Audio playback from the browser & VLM work well. But not from Processing ???

Note: it has worked in the past but not since updating (using Snap).

Thanks for your quick response 8^)))

Best

  • Walter

Someone mentioned you in a post.

| robertesler
April 13 |

  • | - |

Hi @walterwright,

The RPi500 does not have any built-in analog audio capabilities. You would have to use USB or Bluetooth to receive both audio input and output. If your monitor supports audio, the RPi may playback audio through the monitor’s speaker. That error indicates that there is no microphone detected. However, the soundfile should still play if you have an output device attached.

@walterwright That sounds more like a Linux issue on the RPi. You can try this line of code:

Sound.list();

And see which audio devices are listed. If the one that works with your browser is there, check the number in the list and you can try:

Sound s = new Sound(this);
s.outputDevice(0); //or whatever # your device is

The Processing IDE doesn’t have any way to deal with audio, so you have to do this manually in your sketches quite often.
If that doesn’t work, then it could be a much deeper Linux audio configuration issue.