Patchbox OS (MODEP) and USB devices

Hi all!
I’m trying to get clean non-distorted (non-robotic) sound from USB devices connected to either RPi 4 4GB, 8GB or even RPi 3B+.

For this purpose I’m using Focusrite Scarlet 8i6 USB audio interface.

What I’ve found so far:

  1. On old MODEP image OS and on RPi 3B+ with these settings I get an clean sound:
    ExecStart=/usr/bin/jackd -v -t 2000 -P 75 -d alsa -d hw:USB -r 48000 -p 128 -n 3 -X seq -s -S
  2. When running the same config also on RPi 3B+ but running an latest Patchbox OS I get distorted sound no matter what.
  3. Same problem with RPi 4 4GB or 8GB
    and then I found that removing “-s” (small s) in /etc/jackdrc solves this distortion, but then I get the XRUNS which causes audio to cut from time to time, but audio is clean and not distorted which is great step so far…

Which of these parameters would you guys recommend me to change? Or add?
Did anyone had anything similar already?

Right now when using this config it’s fine most of the time, with some cuts in audio:
exec /usr/bin/jackd -v -t 1500 -P 75 -d alsa -d hw:USB -r 96000 -p 128 -n 3 -S 24
same with:
exec /usr/bin/jackd -R -v -t 1000 -P 99 -d alsa -d hw:USB -r 48000 -p 256 -n 3 -S 24

it’s weird that RPi 4 is acting weirder compared to RPi 3B+ tho.

But with these settings above I’m getting to the point that USB audio interface might be usable!
So, I’d like some help from you guys to get the best possible config.

Thanks a lot! :slight_smile:

1 Like

The buffer sizes you’re using are quite low for USB. Try -p 512, also keep -P parameter lower, so the system gets time to attend to other tasks.

How is that this settings works fine on RPi 3B+ (MODEP OS image) but not on RPi 4 or RPi 3B+ (Patchbox OS)?
ExecStart=/usr/bin/jackd -v -t 2000 -P 75 -d alsa -d hw:USB -r 48000 -p 128 -n 3 -X seq -s -S

There isn’t anything specific to Patchbox OS that would be slowing this down. You may try using Raspbian Lite or Desktop directly and see if that makes a difference. Maybe try different Jack versions.

I’ve now tested again the same scenario comparing RPi 3B+ with MODEP against RPi 4 4GB with RT kernel running Patchbox OS.
I noticed two different scenarios.
On RPi 4 I get not only distortion, but when it’s fine I get constant popping sound.
While on RPi 3B+ is constantly clear without any problems.
Tried using the same power supply too.
But mainly I’m using original RPi power supply for all RPi devices.

@Giedrius do you mean by manually building MODEP on Raspbian Lite or Desktop? Or?
How can I change Jack versions?

You can install modep on Raspbian Lite by setting up and running sudo apt install modep.

For Jack, you may see what versions are provided via apt show -a jackd2, in case multiple version are available, you can force installation of particular one by running sudo apt install jackd2=1.9.12~dfsg-2 or similar calls.

Are you using the same SD card on both Pi 3 and 4?

1 Like

I was facing the same problem (using Patchbox OS + Steinberg UR22C), but I was able to get clear sound by installing MODEP on Raspberry Pi OS Lite (bullseye).

Problems related to real-time kernel and USB audio? Thanks anyway!