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

how do setJack, setJackConnect work with pipewire? #66

Open
jwaldmann opened this issue Nov 25, 2021 · 8 comments
Open

how do setJack, setJackConnect work with pipewire? #66

jwaldmann opened this issue Nov 25, 2021 · 8 comments

Comments

@jwaldmann
Copy link

On Fedora 35, with pipewire for audio routing:
I wanted to apply #61 (comment) but is does no longer work.

Standard operation is fine: When I just run dac $ osc 300, output ports csound:output_FL csound:output_FR do appear (visible with jack_lsp, and in qjackctl). I can connect them manually from the command line jack_connect 'csound:output_FL' 'Firefox:input_FL'.

But when I try this connection from within c-s-e, I get

Prelude Csound.Base> dacBy (setJackConnect [("csound:output_FL","Firefox:input_FL")]) $ osc 300
ERROR csound:output_FL not a valid port
^C

same with extra single quotes, and your suggested at (delaySig 1).

When I try to just re-name the output,

Prelude Csound.Base> dacBy (setJack "cse") $ osc 300

I expect it to produce sound as in the standard case, just with renamed csound ports. But I hear no sound at all, and there are no ports visible.


Hi Anton, I am again using csound-expression in my lecture. Because COVID, we switch to remote teaching, right this week, and all sorts of technical problems re-appear ... This thing here is not a blocker, as I can connect the ports manually, but that's quite inconvenient. What can I do to debug the above behaviour?

@anton-k
Copy link
Contributor

anton-k commented Jan 12, 2022

Sorry for late reply, thanks for reaching out. I've tried your example on Manjaro with JACK setup over Cadence. And it works fine:

Prelude Csound.Base> bwsPort1 = "'Bitwig Studio:Stereo In-L'"
Prelude Csound.Base> bwsPort2 = "'Bitwig Studio:Stereo In-R'"
Prelude Csound.Base> csPort1 = "cse:output1"
Prelude Csound.Base> csPort2 = "cse:output2"
Prelude Csound.Base> connect = setJackConnect [(csPort1, bwsPort1), (csPort2, bwsPort2)]
Prelude Csound.Base>  dacBy (setJack "cse" <> connect) $ fromMono $ uosc 0.5 * sqr 300

Here I connect it to BitwigStudio DAW. My Csound is v6.16

@anton-k
Copy link
Contributor

anton-k commented Jan 12, 2022

I can not help with pipewire since it's not installed on my PC. I've tried it once out of curiocity and could not make it work.
The general rule for config problems is to ask on Csound forum and then render simple sound (osc 200) and try to find csound flags that work as raw string invoking Csound directly and then adapt that with Haskell dacBy routine flags

@anton-k
Copy link
Contributor

anton-k commented Jan 12, 2022

Your question stirred an idea for me to read runtime jack info and setup that for user.
For example samplerate can be set only in the way that jack uses. If the user does not provide that over daBy we probably should query jack instance for that info. As it's tedious to match them up

@georgefst
Copy link
Contributor

I'm running Manjaro with Pipewire, and the pedalboard example crashed until I removed setJack completely (and connected an amp, in my case Guitarix with default settings, to make levels audible).

It shows up like this in Helvum:
image

@jwaldmann
Copy link
Author

I think I worked around by using the patchbay of qjackctrl
( https://www.rncbc.org/drupal/node/76 )

But still it'd be nice to be able to set things programmatically, instead of manually.

@georgefst
Copy link
Contributor

But still it'd be nice to be able to set things programmatically, instead of manually.

Indeed. My current solution is to spin up a parallel thread that waits 0.1 seconds, then runs a shell script consisting of a load of calls to pw-link. But obviously, that's horrible.

@jwaldmann
Copy link
Author

to clarify: patchbay needs manual config just once, to make a "profile", that can be set as default, and then works for each instance of csound running. (depends on the condition that ports always have the same name.)

@georgefst
Copy link
Contributor

Yes, unfortunately Helvum (basically the new, PipeWire-native, equivalent of the Qjackctl patchbay) doesn't yet persist anything: https://gitlab.freedesktop.org/pipewire/helvum/-/issues/55

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