Hi,
I can not help with the Raspberry, but I assume this is very similar to Linux, because as Sam notes both use Jack. I have a Focusrite Scarlett 2i2 (USB), which I can use without any hassle with Sonic Pi. You don’t have to configure Sonic Pi to use your USB-Audio-Interface, you configure Jack to do so and then Sonic Pi uses what Jack supplies.
Here is what you could try:
arecord -l
**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC269VC Analog [ALC269VC Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: USB [Scarlett 2i2 USB], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
(Sorry, output is partly in German). Plug in your audio interface and use e. g. arecord
to find out your sound cards. I then have a simple bash script which either uses my USB-Interface …
#! /bin/bash
pulseaudio --kill &
jackd -d alsa --device hw:USB --rate 48000 --period 512 --nperiods 3
sleep 1
qjackctl --start &
sleep 1
sonicpi &
or the internal soundcard
pulseaudio --kill &
jackd -d alsa --device hw:0 --rate 44100 --period 1024 &
# instead of "hw:0", "hw:PCH" should also work but I didn't try
sleep 1
qjackctl --start &
sleep 1
sonicpi &
Actually I have some more things going on, which have to do with my specific setup. What I posted should be enough; of course you will have to find out which Jack settings work best for you.
I am sure this can be done more elegantly, but it does the trick for me.
Let me know, if this is of any help.