How to configure Pipewire/Carla so that it remembers the configuration?

I use Pipewire and Wireplumber.

I want to apply various audio effects for programs. I try to use Carla to do that.

However, the program changes, it sometimes has a certain output, and sometimes not. Every time when the output disappears, the effect is disconnected. When the output appears again, it is not connected again. The same thing happens, when I stop the program, and restart it.

How can I configure this, so that it remembers the connections?

Btw: It would be even better, if I could configure it in a way, that I’m still able to use the sound settings in the KDE Plasma panel to select whether the output should go to the speakers/headphones/etc.

That’s the coolest session manager in my view, you can save and restore configurations.

using the method of setting up config files in ~/.config/pipewire/pipewire.conf.d is the simplest method ive found but may not work if youre not comfortable with manually configuring things with txt files

easyeffects is also a good option for tinkering with pipewire and audio effects

EasyEffects can’t do different effects for different sources, that’s why I use Carla.

I’m a bit confused about how to use this. Would I use it instead of Carla?

Or would I use it instead of Wireplumber?

I believe you can use it instead of both, install it from yay and see for yourself :wink:

It’s basically Session manager + Patchbay in one solution, very intuitive.

you should be able to do a lot of it with config files and filter chains if youre comfortable with that though, you can assign effects to programs,ins/outs,etc. through the config files.

if youre looking for a GUI though beyond easyeffects im honestly not aware of the available GUIs. :man_shrugging:

Hm. I like it, but I think my problem is, that the output changes it’s name.

For example, at first, it’s called output FL-2553, and the next time it’s called output FL-2567.

Any ideas?

To give a bit more detail about what I want to achieve:

When I start Overwatch (a game that runs with wine), there is an output (FL + FR) on which I want to apply effect A. This output doesn’t change, and it behaves in the desired way during games. However, when I restart the game completely (quit the application, start it again), the output is connected to both, effect A, and my speakers.

When I start a game, two additional output channels appear (FL-<random_number1> + FR-<random_number2>). These output channels disappear after a game, and when I start a new game, they get different numbers. I want to apply effect B to these channels. However, when I start a new game, they are not connected to effect B, but to my speakers.

Furthermore, when I start a game, two input channels appear (FL + FR). I want to apply effect C to these channels. These channels also disappear after the game, but they are connected to effect C again when I start the next game. However, they are also connected to my microphone, which is not desired.

Well as i understand idea, you should first create a basic session importing all the stuff you need for this to wrok.

New session
Template: with JACK config memory

+ Add application to current session β†’ Add your effects or whatever you need for this to work, connect their outputs how you need it to work.

Save this session

Then basically what you need to do is to say:
Whenever program starting with β€œFL-” added - always by default connect it’s outputs to whatever-effect input. and Save session again, then test if it works.

That’s how it should work, manipulating defaults…I don’t remember exactly how to do that, and a bit busy to remember right now, but you should find it in manual :upside_down_face:

Yeah, that’s exactly what I want to do. But I couldn’t find anything about it in the manual.

1 Like

Weird…Well at least i know it should be definitely doable.
I’ll try to check out tomorrow when i’ll be a bit more free-timer!


P.S. In such moments i always facepalm myself to not make a notes :rofl:

1 Like

There’s probably several ways to do it. You could create a virtual sink; then use pavucontrol to set that sink as default for Overwatch. You might even be able to set it as default within Overwatch. Then patch your plugins after that sink.

You might be able to use pw-link in a script to launch Overwatch and then connect it with matching rules. Or run the script after Overwatch starts.

I use Carla as well instead of EasyEffects to EQ my speakers, headphones, and mics. I have more control with the audio chain. I never tried using a different audio chain for different apps though. But I did notice that my browser has a random number on the source nodes. Most likely due to the way pipewire creates and destroys nodes depending on if they’re actively being used. If I select a different sink specifically for my browser in the pavucontrol playback tab it seems to work for me at any rate.

For creating a virtual sink here’s an example of what mine looks like if the ones in the wiki I linked aren’t working/making sense.

➜ bat pipewire.conf.d/10-pw-effects-sink.conf
       β”‚ File: pipewire.conf.d/10-pw-effects-sink.conf
   1   β”‚ context.objects = [
   2   β”‚     {   factory = adapter
   3   β”‚         args = {
   4   β”‚        = support.null-audio-sink
   5   β”‚           = "pw-effects"
   6   β”‚             node.description = "pw-effects audio sink"
   7   β”‚             media.class      = Audio/Sink
   8   β”‚             #audio.format     = S16LE
   9   β”‚             audio.rate       = 48000
  10   β”‚             audio.channels   = 2
  11   β”‚             audio.position   = [ FL FR ]
  12   β”‚             object.linger    = true
  13   β”‚    = true
  14   β”‚             factory.mode     = merge
  15   β”‚
  16   β”‚         }
  17   β”‚     }
  18   β”‚ ]

Here’s a screenshot of my patchbay. I use a Carla Patchbay plugin for each of my audio devices that I have my eq plugins inside of to help with organization. The β€œpw-effects audio sink” is my virtual sink that I made my system default output using pavucontrol. I then saved this session and load it with my startup apps carla $HOME/Carla_Combined.carxp &

1 Like

Yes, that works really well. Thank you!

I can select the sinks in Wine config, that fixes the problem that the numbers change.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.