The LV2 plugin in this repo is unusable, probably can be fixed but I don't want to.
You SHOULD build it using default-clang preset. Up to now only clang can build this. gcc fails with some gibberish. After that just run Carla (at Continuous Rack mode) and then run run.sh.
This thing is completely inspired by EasyEffects (and uses some code of it, thx @wwmm).
PWAFR_NAME can be unset or empty, in this case it should be iid0 (see code).
pwautofxroute_standalone does not route from the virtual sink to DSP. You have to do it yourself (as run.sh does it by pw-link).
Tested under clang 22.1.8.
This thing uses @Curve's rohrkabel and coco. They are great works, check out them (and other things Noah created)!
If you want to hack with this, try clice, a next-generation C++ language server for modern C++ which supports modules!
Below are written by LLM without edit. Words below are basically but not completely correct.
pwautofxroute is a PipeWire auto-routing tool written in modern C++ (C++23, using C++ modules).
It creates a virtual sink and automatically redirects every application audio output stream into a
DSP node (for example Carla) so that you can apply real-time
effects to all system audio at once.
It is distributed in two forms:
- A standalone executable that runs as a background service.
- An LV2 plugin that performs the same routing from inside any LV2 host (e.g. Carla, Ardour).
- On startup a
null-audio-sinkvirtual sink is created (stereo,FL/FR). - Every
Stream/Output/Audionode that appears on the PipeWire registry is inspected. Nodes that are not audio output streams, capture sinks, or that match a built-in blocklist (e.g. Easy Effects, pavucontrol, GNOME Shell) are skipped. - For each routable stream, the tool sets the
target.node/target.objectmetadata so the stream is routed into the virtual sink instead of the default output device. - The virtual sink's output ports are then connected to the DSP node owned by the same process (matched by PID), feeding the audio through your effects chain.
Routing is controlled by route rules (from → to). A rule matches a stream's target.object
exactly and redirects it to the chosen sink. The default rule routes everything into the virtual sink.
You can fine-tune which streams are routed using PipeWire node properties:
| Property | Value | Effect |
|---|---|---|
pwafr.filter |
include |
Always route this node. |
pwafr.filter |
exclude |
Never route this node. |
pwafr.<instance>.filter |
include / exclude |
Per-instance override of the above. |
- A C++23 compiler with C++ modules support (tested with Clang).
- CMake 4.0 or newer.
- Ninja (build generator).
- PipeWire development libraries.
- Qt6 (
Corecomponent). - LV2 development libraries (only required for the plugin target).
The following libraries are fetched automatically via CPM.cmake:
# Configure (Clang preset is recommended)
cmake --preset default-clang
# Build everything (standalone + LV2 plugin)
cmake --build --preset default-clangOther presets are available (default, release). Build artifacts land in the preset's binary
directory (e.g. cmake-build-debug-clang/).
cmake --install cmake-build-debug-clang --component lv2This installs pwautofxroute.so together with manifest.ttl and pwautofxroute.ttl into
lib/lv2/pwautofxroute, making the plugin discoverable by LV2 hosts.
The standalone binary reads the instance name from the PWAFR_NAME environment variable, creates the
virtual sink, and routes all audio output streams into it. The helper script run.sh launches it and
links the virtual sink to a Carla DSP instance:
PWAFR_NAME=carla ./cmake-build-debug-clang/standalone/pwautofxroute_standalonerun.sh additionally kills any previous instance (tracked via pwafr.pid), starts the binary, and
connects the virtual sink (pwafr-vsink-<name>) to a Carla instance using pw-link.
Load pwautofxroute into an LV2 host. The plugin exposes:
| Port | Type | Symbol | Range | Description |
|---|---|---|---|---|
| Input | Audio | input |
— | Audio passthrough input. |
| Output | Audio | output |
— | Audio passthrough output. |
| Gain | Control | gain |
0.0 – 10.0 | Output gain (default 1.0). |
| Enabled | Control | enabled |
0.0 – 1.0 | When on (>= 0.5), routing is active. |
When the Enabled control is turned on, the plugin creates the virtual sink and auto-routes system
audio into it; turning it off removes the route rule. The audio ports pass the signal through
unchanged (scaled by gain), so the plugin can sit anywhere in your graph without altering the audio
path itself.
lib/ Core routing library (C++ module `pwautofxroute`)
standalone/ Standalone executable entry point
lv2plug/ LV2 plugin wrapper, TTL metadata and manifest
cmake/ CPM.cmake and CMake helpers
CMakePresets.json Build presets (default / release / default-clang)
run.sh Convenience launcher for the standalone binary
GPL-3.0-or-later