Hi,
I’ve read on this forum that some people use Raspberry Pi for audio. I’m trying to configure a Pi 3 version B for using it as a multi-track recorder, audio matrix and multiple midi operations.

It’s connected to an Expert Sleepers ES-8 audio interface and therefore can receive 12 audio channels and send to 16 channels.

I’ve successfully compiled and installed Purr Data for Raspbian Stretch but I have doubts regarding the audio setup.

To test the installation, I route an audio signal from the ES-8 to one of its ADAT outputs. I managed to have a fairly low latency (64 at 48000) with a few rare glitches, but this without processing the signal, and only if I run PD without gui.

sudo pd-l2ork -rt -alsa -audiodev 1 -r 48000 -audiobuf 64 -channels 12 -stderr -nogui /home/pi/Desktop/audio_test.pd

With the gui, it’s impossible to get a clean audio output, no matter which buffer size I select.

That’s why I’m wondering if there’s an specific optimization I should do on this Raspberry Pi.

Do you have any recommendation please ?

Thanks.

Avoid using the GUI.

Thank you. I will avoid that, yes. Some blogs mention using an RT kernel but that’s obscure… is it recommended with PD ?

It will improve latency but it shouldn’t impact CPU usage (which I suspect is your problem when using the GUI).

1 Like

Thanks for your reply. I understand. I will patch on my main computer and send the files to the Pi and avoid GUI. It was easier to use the Pi directly because I couldn’t connect the Monome to the Mac but this issue should be solved now with the latest serialosc. I hope I don’t encounter too many audio dropouts with more complex patches than ADC to DAC.

1 Like

You can totally disable the hardware you are not using like the HDMI, bluetooth and wifi. I found it helps.

If you can split your audio processing up, you can use multiple instance of pd or use pd~ to spread the load over the multiple cpu cores.

2 Likes

Ah great, it’s good to know I can disable some functionalities, thanks! I need Bluetooth for midi over Bluetooth and WiFi for ssh and OSC communication between pi’s etc but I could disable HDMI, does it consume some ressources even if the Pi is headless and configured to start without desktop ? I will investigate regarding the quad cores and multiple instances as you suggest, i don’t know yet how to set this up. At the moment, I simply “blacklisted” the onboard audio output, but should I completely disable it as well ? Also, should I use ALSA or something else ? A Jack server ? Sorry for all these noob questions, I’m new to Linux and Raspberry, it took me a few days to learn, set a starting script, connect midi with command lines etc, that’s also why I’m asking about audio optimization :wink:

Blacklisting should work. I think you can diasable it with the overlay dt stuff too.

There is an tecnical article about it here https://www.raspberrypi.org/documentation/configuration/device-tree.md

I don’t have any metrics on performance so I’m just going by “the vibe”.

I’m using jack server on mine so I can use netjack to route audio over the network to a windows machine. Jack sits on top of alsa. It can be a pain to work with.

1 Like

Excellent. Thanks again. I will test this audio matrix tomorrow with the Monome, without GUI and keeping in mind these optimization tricks. At the moment, the latency with a Pi3 and an Es-8 is much better than with an IPad … so It’s worth experimenting again and again until I find the correct settings :slight_smile:

1 Like