No sound in sonic pi

Perhaps I could chip in here. First I would strongly advise using a fresh install of Raspberry Pi OS if you have a spare micro-sd card, or means of copying off any stuff you want to keep from your existing card. I have done sudo apt update && sudo apt full-upgrade but there can be some tweaks afterwards that may be necessary to get things going properly. Its worth looking at upgrade comments in this thread
However there is another important change with the latest OS in that it now bases the sound system on pulse audio. This is more convenient to allow the use of sound with a range of programs including Chromium browser and VLC, but unfortunately does not sit so comfortably with Sonic Pi, which uses Jack becuase that is the sound system utilised on linux by the scsynth synthesiser engine of SuperCollider which sonic pi uses.
The previous method that Sonic Pi used to selecti the sound output device was to read data from the file .asoundrc but with the new pulse audio setup this file is no longer utilised, and sonic pi 3.1 (still bundled with the OS) and my sonic pi 3.2.2 will both default to using HDMI as the sound output device.

I have worked on modifications to sonic pi 3.2.2 to enable it to utilise the new pulseaudio setup and to be able to select other sound devices such as a usb connected audio device and indeed over the weekend built a new .deb file for version 3.3.0-beta4 which seems to work fine, and hope to release a new .deb when version 3.3.0 is released hopefully within the next few weeks.

The basis of the changes can be applied to version 3.2.2 are here
Raspberry Pi, Pulse Audio Workaround with USB soundcard - #10 by robin.newman. This works quite well, although the latency will be inferior to just using jack directly.

One final thing. If you have installed sonic -pi with a .deb then you can find details using
dpkg -l | grep sonic-pi

you can list the installed files using
dpkg -L sonic-pi but this will give a long list so you may want to put it into a text file before examining eg
dpkg -L sonic-pi > spfiles.txt
and then inspect the resulting file spfiles.txt

my .deb file installs sonic pi in location /opt/sonic-pi

2 Likes