Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no sound coming from sonic pi on linux #3409

Closed
HappyPotat opened this issue Aug 12, 2024 · 7 comments
Closed

no sound coming from sonic pi on linux #3409

HappyPotat opened this issue Aug 12, 2024 · 7 comments

Comments

@HappyPotat
Copy link

HappyPotat commented Aug 12, 2024

I installed sonic pi v4.5.1 from Flathub but there appears to be no sound coming from the program.
I have looked online for any solutions to my problem. however, none of them worked.

here's what I tried to play if it helps:

use_synth :tech_saws

use_bpm 120

play_pattern_timed [:a4, :g7, :e3], [0.5, 0.5, 0.5]

@idommason
Copy link

Hi

Which flavour of linux?

There are a couple of issues that most linux distros need

You need to be a member of the audio group

and sonic-pi later than 4.50 use pipewire for sound, not pulseaudio

For the first one, you need really to do a couple of things

In a terminal, this adds you to the audio group

sudo usermod -aG audio $USER

And there are also some issues with giving the the audio group realtime priority. To do this
assuming a debian based install,

sudo apt-get install jackd2
If that is already installed, then do

sudo dpkg-reconfigure jackd2

and when it asks if you want to enable RT Priority, answer yes

Because the above have made changes to the group membership, you have to logout and login again

You also need to disable pulseaudio for the user account, as pipewire is required

systemctl --user disable pulseaudio pulseaudio.socket
Make sure you have pipewire installed, and also qpwgraph, and wireplumber

If you are using a linuxmint based install, then have a read of this:

https://github.com/sonic-pi-net/sonic-pi/issues/3396

But note that the instructions for installing elixir seem to be different now, they might still work for the latest mint, but they didn't work on the debian bookworm based Peppermint OS

NB I am not connected with sonic-pi in any way. Just a linux tinkerer

@HappyPotat
Copy link
Author

Hi

Which flavour of linux?

There are a couple of issues that most linux distros need

You need to be a member of the audio group

and sonic-pi later than 4.50 use pipewire for sound, not pulseaudio

For the first one, you need really to do a couple of things

In a terminal, this adds you to the audio group

sudo usermod -aG audio $USER

And there are also some issues with giving the the audio group realtime priority. To do this assuming a debian based install,

sudo apt-get install jackd2 If that is already installed, then do

sudo dpkg-reconfigure jackd2

and when it asks if you want to enable RT Priority, answer yes

Because the above have made changes to the group membership, you have to logout and login again

You also need to disable pulseaudio for the user account, as pipewire is required

systemctl --user disable pulseaudio pulseaudio.socket Make sure you have pipewire installed, and also qpwgraph, and wireplumber

If you are using a linuxmint based install, then have a read of this:

https://github.com/sonic-pi-net/sonic-pi/issues/3396

But note that the instructions for installing elixir seem to be different now, they might still work for the latest mint, but they didn't work on the debian bookworm based Peppermint OS

NB I am not connected with sonic-pi in any way. Just a linux tinkerer

I am using arch linux.
It seems like there is no jackd2 package from pacman. maybe it's under a different name?
pulseaudio is not on my system.

@kootenpv
Copy link

It might be jack2

@HappyPotat
Copy link
Author

It might be jack2

I reinstalled jack2 but there is still no audio from the program

@kootenpv
Copy link

I am now also stuck at no sound, no matter what I try

@idommason
Copy link

@HappyPotat

Use qpwgraph to look at the audio ouputs and see if SonicPI is trying to output to HDMI

Bear in mind that Sonic Pi is really written for a raspberry pi and the latest versions of those tend to have HDMI as their default sound output

if you have wireplumber and qpwgraph installed then you should be able to see if SuperCollider is outputting sound to your HDMI monitor, rather than your headphones / speakers

See https://in-thread.sonic-pi.net/t/no-sound-in-sonic-pi-4-5-raspberry-pi-bookworm/8469 for advice on changing the default output

and @kootenpv 's post #3413 who had similar issues with Arch linux

@HappyPotat
Copy link
Author

@HappyPotat

Use qpwgraph to look at the audio ouputs and see if SonicPI is trying to output to HDMI

Bear in mind that Sonic Pi is really written for a raspberry pi and the latest versions of those tend to have HDMI as their default sound output

if you have wireplumber and qpwgraph installed then you should be able to see if SuperCollider is outputting sound to your HDMI monitor, rather than your headphones / speakers

See https://in-thread.sonic-pi.net/t/no-sound-in-sonic-pi-4-5-raspberry-pi-bookworm/8469 for advice on changing the default output

and @kootenpv 's post #3413 who had similar issues with Arch linux

Sonic pi was trying to output to hdmi but I couldn't hear anything because there aren't any speakers plugged in to my monitor.

I was able to fix it in qpwgraph.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants