# Raspberry PI, Sonic Pi 3.3.1 - no sound from USB card \[solved\]

**URL:** <https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091>\
**Category:** Support, Help & Resources\
**Created:** [February 2, 2021, 9:30am UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091 "2021-02-02T09:30:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![soxsa](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/soxsa/32/1669_2.png) [@soxsa](https://in-thread.sonic-pi.net/u/soxsa)\
**Post date:** [February 2, 2021, 9:30am UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/1 "2021-02-02T09:30:34Z")

</div>

Today I installed Sonic Pi 3.3.1 on my Raspberry Pi. I’ve been using QJackCtl to start my jackd to run audio to a USB card, which worked well with SPi 3.2.

But now I get no sound. I’ve tried commenting out the code to look for/start jackd in…

`/opt/sonic-pi/app/server/ruby/lib/sonicpi/scsynthexternal.rb`

…and start my own with QJackCtl before running SPi but still no sound. If however I switch to use the USB card in the Rpi top-right widget, then I do get sound. Problem is though that I’ve tuned my jackd settings for latency so that the sound from SPi is in sync with the sound from external midi devices.

Having embraced QJackCtl I’m keen to keep using it, as it gives the right level of control. So I don’t really want to go back to the default.

Can you help? Thanks!

---

<div class="post-metadata">

**Author:** ![soxsa](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/soxsa/32/1669_2.png) [@soxsa](https://in-thread.sonic-pi.net/u/soxsa)\
**Post date:** [February 2, 2021, 3:42pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/2 "2021-02-02T15:42:17Z")

</div>

It’s OK, I hacked the above file in the ‘Start on Raspberry Pi’ section with code from 3.2. Back in business. No idea what I’m doing, but I’m not above pasting in code that looks likely.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/b/b02f87d38162c4914c593b39942c051aaca50445.png)

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 2, 2021, 11:30pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/3 "2021-02-02T23:30:27Z")

</div>

The changes have been made to make SP work seamlessly with pulse-audio which is the default sound system in the new OS. We hope to add config settings to allow users to alter the configuration easily, as has been done for the scsynth startup parameters.

In the meantime I am finalising a script which will enable you to do so without having to alter Sonic Pi at all. Will publish tomorrow.

---

<div class="post-metadata">

**Author:** ![soxsa](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/soxsa/32/1669_2.png) [@soxsa](https://in-thread.sonic-pi.net/u/soxsa)\
**Post date:** [February 3, 2021, 7:54am UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/4 "2021-02-03T07:54:18Z")

</div>

Thanks Robin, I guessed that was the case and I see that making it work with pulse-audio was the right thing to do for most people.

I found that, using the default script and once SPi has started, I can hook up the SuperCollier outputs to the system using QJackCtl, which then shows the same out\_1/2 and system\_caputure\_1/2 nodes. Which is also a viable alternative.

But I’d welcome a script, thank you!

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 3, 2021, 3:54pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/5 "2021-02-03T15:54:07Z")

</div>

Here is a video showing how to use the script with a link to the script in the notes.

[![](https://img.youtube.com/vi/u7JtInemsJY/maxresdefault.jpg "Sonic Pi 3.3.1 audio config on Raspberry Pi") ](https://www.youtube.com/watch?v=u7JtInemsJY)

The script repository is at [GitHub - rbnpi/sonicpi-rpi-audioselect](https://github.com/rbnpi/sonicpi-rpi-audioselect)

---

<div class="post-metadata">

**Author:** ![soxsa](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/soxsa/32/1669_2.png) [@soxsa](https://in-thread.sonic-pi.net/u/soxsa)\
**Post date:** [February 3, 2021, 5:47pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/6 "2021-02-03T17:47:13Z")

</div>

Thank you so much @robin.newman that’s a great video - with all the bases covered. I’ll try the script, I’m also rather liking using QJackCtl ‘raw’ so to speak.

On that point, last week or so I’ve been looking again at PatchBox OS. I’ve bought a pisound, and although I’m wasn’t planning to use it for Sonic Pi particularly, I did want to try it so armed with this new jack power I’ve got SPi 3.3.1 running happily on that.

The latency reported is 5.3mS - if that number is true then that’s very satisfactory.

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 4, 2021, 4:13pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/7 "2021-02-04T16:13:29Z")

</div>

Hope the script worked for you. I’ve experimented further and find it is a good iead to unload the pulseaudio ports from QjackCtl before quitting it. This can be done by adding the commands below to the Execute script on Shutdown slot on the Options tab of the Setup window.

```ruby
pactl list short modules |grep "client_name=PulseAudio_to_JACK"| cut -f1 | xargs -L1 pactl unload-module;pactl list short modules |grep "client_name=JACK_to_PulseAudio" | cut -f1 | xargs -L1 pactl unload-module

```

This basically uses pactl list short mdules to display hemounted modules and you grep for the ones you want, extract theiir iindex number and use that to unoad the module.

 ![2021-02-04-161504_1871x590_scrot](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/4/4d9006811433aabc08d70f9fe939d1479b0c7a08.png)

---

<div class="post-metadata">

**Author:** ![soxsa](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/soxsa/32/1669_2.png) [@soxsa](https://in-thread.sonic-pi.net/u/soxsa)\
**Post date:** [February 4, 2021, 5:59pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/8 "2021-02-04T17:59:02Z")

</div>

Thanks Robin. Is this the same as disconnecting them from within QJackCtl’s ‘Connecttions’ form?

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [February 4, 2021, 8:13pm UTC](https://in-thread.sonic-pi.net/t/raspberry-pi-sonic-pi-3-3-1-no-sound-from-usb-card-solved/5091/9 "2021-02-04T20:13:45Z")

</div>

No, because using disconnect on the connect window still leave the ports there as you can see. This will actually remove the ports entirely.
