Skip to content

Conversation

@noonker
Copy link

@noonker noonker commented Jul 23, 2025

I'm using PipeWire under Linux and need to use pw-jack to start sclang to ensure that we're using PipeWire's implementation of Jack instead of Jack's own implementation.

This patch adds the custom variable

sclang-use-pw-jack. When it's non-nil- sclang-start will load pw-jack instead of sclang-program and instead add sclang-program to the first argument generated by sclang-make-options

Let me know what you think :)

@jamshark70
Copy link

jamshark70 commented Jul 23, 2025

In principle I suppose this is OK, although, on my Ubuntu Studio system, it's not necessary to preface sc executables with pw-jack. However it may be necessary in some system configurations? But I think the intent with pipewire is for it to Just Work transparently (and it does, on my system at least -- even qjackctl just shows the pipewire-jack status). I.e., it's not been stated here whether the lack of pw-jack in the command definitively causes SC to connect to a non-pw JACK server, or whether you've always been using pw-jack in the command and aren't sure what will happen without it.

@noonker
Copy link
Author

noonker commented Sep 19, 2025

Apologies for the delays!

pw-jack just modifies LD_LIBRARY_PATH to make sure that PipeWire's implementation of Jack is used.

In most cases where PipeWire is the default system implementation scsynth will probably just work without issue. However I've decided to make my life complicated.

I'm using Guix and setting up PipeWire which sets it up for the system. However, I think since this is not the default guix audio service a lot of packages are still packaged with the non-PipeWire version of Jack.

The supercollider package defined in the package repository is still using an older implementation of Jack which means that by-default it's not working on my system.

I /could/ either try to figure out how to get this changed upstream (which may break supercollider for non pipewire users) or I could just maintain my own build definition for supercollider. However, I think right now as I'm getting used to supercollider I would prefer to just use the much simpler pw-jack shim.

This already works if I wanted to use the supercollider ide (e.g. pw-jack scide) but of course if Emacs can't be my DAW what is the point ;)

@jamshark70
Copy link

One other thought -- wouldn't it work just to write Server.program = "pw-jack scsynth" into your sclang startup.scd file?

That is: emacs launches sclang, but sclang doesn't connect to audio anything (unless you're using the internal server, which is almost never done anymore). Then sclang launches scsynth, and the executable name string is already configurable in sclang.

It may still be legit to add the scel variable in case someone needs the internal server. Just pointing out that scsynth's audio connection is external to the relationship between scel and sclang.

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

Successfully merging this pull request may close these issues.

2 participants