Pipewire system room correction plugin

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Pipewire system room correction plugin

Post by sunrat »

Currently trying to set up siduction (Debian Sid basically) with room correction in Pipewire. I have it working fine using Carla-Rack with LSP-PEQ LV2 and a saved config file. I would like the Carla GUI to be visible to change parameters but it is currently absent.
Set up exactly as described in the Arch wiki - https://wiki.archlinux.org/title/PipeWi ... ST_plugins . It starts at system startup using systemd service files and playing music with DeadBeef connects automatically to the default null sink. I tried Mixbus and can connect it successfully direct to Carla as the output.
Anyone know how to make the Carla GUI visible?

qpwgraph looks like this when DeadBeef is playing:

qpwgraph-0112.png
qpwgraph-0112.png (91.59 KiB) Viewed 2373 times

I also tried to modify a service file to load the standalone LSP-PEQ which would be ideal but no luck so far. If I manually start it I am able to connect it in qpwgraph and it works fine. :? In Bullseye I connect the LSP-PEQ with a line in Qjackctl Exec option.

User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Pipewire system room correction plugin

Post by LAM »

sunrat wrote: Wed Nov 30, 2022 2:11 pm

Currently trying to set up siduction (Debian Sid basically) with room correction in Pipewire. I have it working fine using Carla-Rack with LSP-PEQ LV2 and a saved config file. I would like the Carla GUI to be visible to change parameters but it is currently absent.
Set up exactly as described in the Arch wiki - https://wiki.archlinux.org/title/PipeWi ... ST_plugins . It starts at system startup using systemd service files and playing music with DeadBeef connects automatically to the default null sink. I tried Mixbus and can connect it successfully direct to Carla as the output.
Anyone know how to make the Carla GUI visible?

qpwgraph looks like this when DeadBeef is playing:
qpwgraph-0112.png

I also tried to modify a service file to load the standalone LSP-PEQ which would be ideal but no luck so far. If I manually start it I am able to connect it in qpwgraph and it works fine. :? In Bullseye I connect the LSP-PEQ with a line in Qjackctl Exec option.

I don't know why you should complicate your linux audio life. :wink:

Anyway, you could very well use the same technique I suggested to you a while ago (viewtopic.php?p=132162#p132162), that is using the standalone LSP EQ, adapted to the Archwiki systemd example:

~/.config/systemd/user/lsp-eq.service

Code: Select all

[Unit]
Description=Load LSP EQ

[Service]
PassEnvironment="PIPEWIRE_LINK_PASSIVE=true"
Type=exec
ExecStart=lsp-plugins-para-equalizer-x16-stereo

[Install]
WantedBy=default.target

~/.config/systemd/user/lsp-eq.service.d/override.conf

Code: Select all

[Service]
Environment="LSP_CONFIG_FILE=/home/user/room-correction.cfg"
ExecStart=
ExecStart=lsp-plugins-para-equalizer-x16-stereo -c $LSP_CONFIG_FILE

... if you manage to run a graphical application on startup with systemd.
I would still suggest to launch it with an autostart mechanism of your DE/WM that is much safer to assume it gets all the needed env variables of your graphical session.

AFAIK there's isn't a way to to use Carla to show the plugins GUI at startup, unless you use carla-single but then I'm not sure you can specify a config file/savestate. A possible workaround, if you absolutely want to avoid the standalone JACK app, is to use a plugin host like jalv and launching lsp-eq with a LV2 preset.

in mix, nobody can hear your screen

User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Pipewire system room correction plugin

Post by LAM »

As a side note LSP standalones have also an headless mode:

Code: Select all

-hl, --headless       Launch in console only, without UI

Not useful in your case since you want a GUI, but could be useful for others who don't care having an UI and want to just launch it with a config file.

in mix, nobody can hear your screen

User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Pipewire system room correction plugin

Post by sunrat »

LAM wrote: Wed Nov 30, 2022 3:01 pm

I don't know why you should complicate your linux audio life. :wink:

Anyway, you could very well use the same technique I suggested to you a while ago (viewtopic.php?p=132162#p132162), that is using the standalone LSP EQ, adapted to the Archwiki systemd example:

I'm all about complicating my Linux life. "Break it till it works!" :lol:

Thanks for the .service file examples. I'm in a different Linux atm but I think it's almost exactly what I used. Will check when back in siduction. It appeared to start but didn't show up in graph like Carla did. Was very late when I posted so was a final call for help.

... if you manage to run a graphical application on startup with systemd.
I would still suggest to launch it with an autostart mechanism of your DE/WM that is much safer to assume it gets all the needed env variables of your graphical session.

Still investigating methods. I have it working perfectly in Bullseye without PW or systemd units. In previous testing with PW I remember a gotcha in that the audio application would disconnect from the plugin when transport stopped and reconnect on transport start directly to system_out bypassing plugin. That now works fine by creating the default-null-sink.

AFAIK there's isn't a way to to use Carla to show the plugins GUI at startup, unless you use carla-single but then I'm not sure you can specify a config file/savestate. A possible workaround, if you absolutely want to avoid the standalone JACK app, is to use a plugin host like jalv and launching lsp-eq with a LV2 preset.

I'd prefer to use the standalone LSP-PEQ and suspect jalv would be worth a try, have used it before. IIRC it needs the plugin URL rather than the executable path so may also be less easy to load a config file. carla-single may be different but I don't recall.

It does work currently in carla-rack with an existing plugin config file but I can't change the config on the fly without the plugin GUI. I can accept the current if there is no other option, but having the GUI available would be optimal.
It seems my quest is a lonely one as the only doc I could find that explains it clearly is the Arch one and I haven't heard of anyone else trying to insert plugins in the PW chain. More testing soon! :mrgreen:
Thanks for your help @LAM ! :wink:

User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Pipewire system room correction plugin

Post by sadko4u »

One good idea has visited me about standalone versions of plugins, so I have added the feature request to the github:

https://github.com/sadko4u/lsp-plugins/issues/281

LSP (Linux Studio Plugins) Developer and Maintainer.
User avatar
wjl
Established Member
Posts: 224
Joined: Fri Mar 17, 2017 12:27 pm
Location: near Frankfurt, Germany
Has thanked: 48 times
Been thanked: 26 times
Contact:

Re: Pipewire system room correction plugin

Post by wjl »

In Debian Bullseye and with Jack, Pulse, and Alsa I have something similar to you (using Sonarworks instead of the LSP-PEQ):
https://www.flickr.com/photos/wjlonien/52537787319/
I load that setup automatically during login, using Claudia as a Ladish frontend:
https://www.flickr.com/photos/wjlonien/52537787384/
And within Claudia, it looks like this:
https://www.flickr.com/photos/wjlonien/52537497656/

In Carla (or Carla-Rack) I can see the plugin if I go on the 'Rack' tab, and opening the plugin with the wrench symbol shows me its GUI, like this:

https://www.flickr.com/photos/wjlonien/52538048198/

In Arch, and with Pipewire, I wasn't using Sonarworks but the same LSP-PEQ you are using (not a big difference if you ask me). I used the LSP parametric eq within Easyeffects, so that was my connector instead of Carla and all the other stuff. That was way easier, but sadly I don't have that older system anymore, so I can't show you screenshots of it.

Hope this helps anyway?
Cheers,
Wolfgang

more about me on my blog
User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Pipewire system room correction plugin

Post by sunrat »

sadko4u wrote: Fri Dec 02, 2022 11:48 am

One good idea has visited me about standalone versions of plugins, so I have added the feature request to the github:

https://github.com/sadko4u/lsp-plugins/issues/281

Excellent idea! Defining in/out inside the plugin would be an excellent solution.
I was also wondering if it would be simple to add "Minimise to tray" for the standalone. I can open an enhancement issue on Github if it's feasible.

@wjl Thanks. I have it working perfectly in Debian Bullseye and with Jack, Pulse, and Alsa without a plugin host, and have the GUI.
I had it working OK in Sid (also without a plugin host IIRC) when I first tried it over a year ago except for the disconnection on transport stop issue. It now works fine under Carla but I'm just trying to get the GUI to show, and possibly use it without a host again.
I'll try EasyEffects, but from using its predecessor PulseEffects I seem to recall it was fairly heavy on resources.

User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Pipewire system room correction plugin

Post by sadko4u »

sunrat wrote: Fri Dec 02, 2022 8:21 pm

I was also wondering if it would be simple to add "Minimise to tray" for the standalone. I can open an enhancement issue on Github if it's feasible.

Adding support of system tray icon seems to be not pretty hard but time-consuming job. That requires to add such support to the lsp-ws-lib for both Windows and Linux, lsp-tk-lib and then integrate into the JACK wrapper of lsp-plugin-fw.

LSP (Linux Studio Plugins) Developer and Maintainer.
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Pipewire system room correction plugin

Post by LAM »

sadko4u wrote: Fri Dec 02, 2022 9:49 pm
sunrat wrote: Fri Dec 02, 2022 8:21 pm

I was also wondering if it would be simple to add "Minimise to tray" for the standalone. I can open an enhancement issue on Github if it's feasible.

Adding support of system tray icon seems to be not pretty hard but time-consuming job. That requires to add such support to the lsp-ws-lib for both Windows and Linux, lsp-tk-lib and then integrate into the JACK wrapper of lsp-plugin-fw.

One alternative path to the system tray could be giving LSP standalones NSM support. Through NSM you can control the UI showing/hiding: https://new-session-manager.jackaudio.o ... tional_gui

I think it could be a cleaner solution compared to a system tray, just think about the case of having 2 or more LSP standalones running and each one with its own system tray icon.

in mix, nobody can hear your screen

User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Pipewire system room correction plugin

Post by LAM »

sadko4u wrote: Fri Dec 02, 2022 11:48 am

One good idea has visited me about standalone versions of plugins, so I have added the feature request to the github:

https://github.com/sadko4u/lsp-plugins/issues/281

Having more features is always good. :D

However, from an UNIX philosophy standpoint, we already have tools that deal with connections: jack_connect, pw-link, jackpatch, etc.

in mix, nobody can hear your screen

User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Pipewire system room correction plugin

Post by sadko4u »

LAM wrote: Sat Dec 03, 2022 9:43 am

However, from an UNIX philosophy standpoint, we already have tools that deal with connections: jack_connect, pw-link, jackpatch, etc.

This is also useful feature for me as a developer: I don't need to connect the plugin on each run while developing it. And, as you probably know, the developer needs to perform many launches of the plugin until he realizes that all is done well ;).

LSP (Linux Studio Plugins) Developer and Maintainer.
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 140 times
Been thanked: 348 times

Re: Pipewire system room correction plugin

Post by LAM »

sadko4u wrote: Sun Dec 04, 2022 3:40 pm
LAM wrote: Sat Dec 03, 2022 9:43 am

However, from an UNIX philosophy standpoint, we already have tools that deal with connections: jack_connect, pw-link, jackpatch, etc.

This is also useful feature for me as a developer: I don't need to connect the plugin on each run while developing it. And, as you probably know, the developer needs to perform many launches of the plugin until he realizes that all is done well ;).

That's why I use RaySession ( and NSM support for LSP standalone version would be great :D ):

Image

in mix, nobody can hear your screen

User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Pipewire system room correction plugin

Post by lilith »

Since Sonarworks quit Linux Support I stopped using it.

Another option is using DRC and REW as explained here: https://www.audiosciencereview.com/foru ... 894/page-2 (best read the whole thread)

No difference to Sonarworks.

Wasn´t Raysessions in the KX repos? I don´t find it anymore.

I´m going to make I new install and I´m thinking about switching from UbuntuStudio to MXLinux + KXStudio.

User avatar
sunrat
Established Member
Posts: 915
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 242 times

Re: Pipewire system room correction plugin

Post by sunrat »

lilith wrote: Thu Dec 08, 2022 10:32 pm

Another option is using DRC and REW as explained here: https://www.audiosciencereview.com/foru ... 894/page-2 (best read the whole thread)

I think I read that a while back. Gets quite technical. I've used REW to measure the room and created filters in LSP PEQ to closely match. LSP can load filters created in REW, and LSP IR can load IR files created in REW. REW is excellent, haven't tried DRC.

It's not quite the point of the topic though which is how to create persistent plugin inserts in Pipewire. I'm not using PW in my daily system but have a test install of Debian Sid to try to work out the best approaches to it for when I have to (or want to) use PW as default.
I have it working well with Carla but still would like to make it work without Carla, and with LSP GUI active; haven't worked out a way yet but have ideas. RaySession looks promising, that's next on the test list. (thanks @LAM :wink:

lilith wrote: Thu Dec 08, 2022 10:32 pm

Wasn´t Raysessions in the KX repos? I don´t find it anymore.

I´m going to make I new install and I´m thinking about switching from UbuntuStudio to MXLinux + KXStudio.

Raysession appears to be in Arch AUR and a Ubuntu PPA. I just built it from Github source which was painless on Debian Bullseye.
If you are interested in MX, the next version of AVL-MXE (due soon) will be using Xfce desktop same as MX, and they are progressively adding a lot of audio applications to the default MX repo and are very responsive to new package requests.

houston4444
Established Member
Posts: 78
Joined: Mon Apr 02, 2018 6:53 pm
Has thanked: 3 times
Been thanked: 25 times

Re: Pipewire system room correction plugin

Post by houston4444 »

My RaySession ppa https://launchpad.net/~houston44/+archi ... raysession is very old, I should remove it, and it is now in ubuntu packages directly.
It is also present and up to date in LibraZiK4 (based on debian bullseye).
There is an AUR package, but this is connected to git master version (raysession-git), and not to the last release, this could be unsafe.

Of course, every new distribution package is welcome.

Indeed, normally, it is easy to build it from sources.

Post Reply