Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Linux

Reply
 
Thread Tools Display Modes
Old 03-25-2023, 09:10 AM   #1
mcoyle
Human being with feelings
 
mcoyle's Avatar
 
Join Date: Jan 2022
Location: Kalamazoo, MI
Posts: 285
Default How do I do this in Pipewire instead of Jack?

I need to hear my external editor and Reaper through my audio interface at low latency. I can easily do it in Jack (see attached image).

Can I do this in Pipewire with ALSA?

I can get it to work in Pipewire through Pulse, but the latency is too high.

I guess in a nutshell my question is: How to I route ALSA with Pipewire?

__________________
Audio Post Engineer: JennAudio.com
Adjunct Faculty: Columbia College Chicago - Retired!
mcoyle is offline   Reply With Quote
Old 03-25-2023, 10:42 AM   #2
/AND/
Human being with feelings
 
Join Date: Aug 2022
Posts: 717
Default

Hmm, ALSA should be automatically recognised and 'mounted' by PipeWire. Pulse works with an in-built workaround, while ALSA should work directly.

There might be some issue for PipeWire not recognising ALSA outputs/inputs. But I don't know what that might be, except try to choose Jack as audio engine in Reaper and Audacity. (Also, JACK is just the patching interface more or less.)
/AND/ is offline   Reply With Quote
Old 03-25-2023, 11:15 AM   #3
axel_ef
Human being with feelings
 
axel_ef's Avatar
 
Join Date: Jan 2007
Location: Erfurt
Posts: 784
Default

You can use qpwgraph with pipewire-jack.

https://wiki.debian.org/PipeWire#For_JACK

axel_ef is online now   Reply With Quote
Old 03-26-2023, 01:12 PM   #4
ForrestH
Human being with feelings
 
ForrestH's Avatar
 
Join Date: Mar 2022
Posts: 153
Default

You can also continue to use qjackctl, or so it seems (AppImage version shown here...)
Attached Images
File Type: png pipewire.png (253.2 KB, 52 views)
__________________
soundcloud.com/forrest-nd86

Last edited by ForrestH; 03-26-2023 at 01:21 PM.
ForrestH is offline   Reply With Quote
Old 03-26-2023, 02:19 PM   #5
axel_ef
Human being with feelings
 
axel_ef's Avatar
 
Join Date: Jan 2007
Location: Erfurt
Posts: 784
Default

Quote:
Originally Posted by ForrestH View Post
You can also continue to use qjackctl, or so it seems (AppImage version shown here...)
Are you sure you're using pipewire? I don't see pw in your image.
axel_ef is online now   Reply With Quote
Old 03-26-2023, 03:42 PM   #6
mcoyle
Human being with feelings
 
mcoyle's Avatar
 
Join Date: Jan 2022
Location: Kalamazoo, MI
Posts: 285
Default

Quote:
Originally Posted by axel_ef View Post
Are you sure you're using pipewire? I don't see pw in your image.
Pictured in my original post is qjackctl. I can do the same thing in pipewire, BUT the latency is unusable.
__________________
Audio Post Engineer: JennAudio.com
Adjunct Faculty: Columbia College Chicago - Retired!
mcoyle is offline   Reply With Quote
Old 03-26-2023, 03:57 PM   #7
ForrestH
Human being with feelings
 
ForrestH's Avatar
 
Join Date: Mar 2022
Posts: 153
Default

Definitely pw:

$ ps ax | grep -E "pipewire|jack"
6211 ? S<l 0:57 /usr/bin/pipewire
6212 ? S<l 0:00 /usr/bin/pipewire-pulse
7033 pts/5 Sl+ 0:11 qjackctl
7037 ? Ssl 0:00 qjackctl-0.9.10-54.1.x86_64.AppImage


On latency, what does REAPER say for it? I've got a business-class machine not really suited to audio but it seems fine at 5.33ms, which I set via environmental variable:

$ cat /etc/environment
PIPEWIRE_LATENCY=256/48000

I'm not even on an RT kernel, as the kernel.org kernels now have enough of the RT patches in them to do the job set to low-latency:

$ uname -a
Linux tf 6.2.8-alvin #1 SMP PREEMPT_DYNAMIC Sun Mar 26 15:43:56 EDT 2023 x86_64 GNU/Linux
__________________
soundcloud.com/forrest-nd86
ForrestH is offline   Reply With Quote
Old 03-26-2023, 04:19 PM   #8
ForrestH
Human being with feelings
 
ForrestH's Avatar
 
Join Date: Mar 2022
Posts: 153
Default

In terms of routing in plain ALSA, the only way I can think of to do that is via some fairly difficult modification of .asoundrc, the sort of thing seen here:

https://stackoverflow.com/questions/...s-and-asoundrc
https://forum.audacityteam.org/t/not...properly/37877
__________________
soundcloud.com/forrest-nd86

Last edited by ForrestH; 03-26-2023 at 05:08 PM.
ForrestH is offline   Reply With Quote
Old 03-26-2023, 04:54 PM   #9
ForrestH
Human being with feelings
 
ForrestH's Avatar
 
Join Date: Mar 2022
Posts: 153
Default

Here's an interesting graph showing Audacity outputting via Pipewire into REAPER as connected by qjackctl. The air loop adds a little echo, but when I add audacity>REAPER>headphones to audacity>headphones it just gets louder. I've been connecting and disconnecting while recording and have a total of 2(4) reported xruns.
Attached Images
File Type: png p2.png (86.1 KB, 44 views)
__________________
soundcloud.com/forrest-nd86

Last edited by ForrestH; 03-26-2023 at 05:06 PM.
ForrestH is offline   Reply With Quote
Old 03-26-2023, 08:58 PM   #10
mcoyle
Human being with feelings
 
mcoyle's Avatar
 
Join Date: Jan 2022
Location: Kalamazoo, MI
Posts: 285
Default

Quote:
Originally Posted by ForrestH View Post
Definitely pw:

$ ps ax | grep -E "pipewire|jack"
6211 ? S<l 0:57 /usr/bin/pipewire
6212 ? S<l 0:00 /usr/bin/pipewire-pulse
7033 pts/5 Sl+ 0:11 qjackctl
7037 ? Ssl 0:00 qjackctl-0.9.10-54.1.x86_64.AppImage


On latency, what does REAPER say for it? I've got a business-class machine not really suited to audio but it seems fine at 5.33ms, which I set via environmental variable:
Code:
> ps ax | grep -E "pipewire|jack"
   1490 ?        S<sl   0:10 /usr/bin/pipewire
   1493 ?        S<sl   0:16 /usr/bin/pipewire-pulse
  15557 pts/0    S+     0:00 grep --color=auto -E pipewire|jack
See the image below for my Pipewire setup. Reaper has four audio engine choices: Jack, ALSA, Dummy, and Pulseaudio.

Jack and ALSA have latency of 5.3 ms.
Pipewire's 190 ms.

Pipewire is the only option that allows Reaper to appear in qpwgraph.

To run multiple audio apps, Jack works.
For Reaper alone, ALSA works.

BUT, Pipewire was suppose to be this new cool way and I just can't get the latency low enough.

I'm open to suggestions.

__________________
Audio Post Engineer: JennAudio.com
Adjunct Faculty: Columbia College Chicago - Retired!
mcoyle is offline   Reply With Quote
Old 03-26-2023, 11:36 PM   #11
ForrestH
Human being with feelings
 
ForrestH's Avatar
 
Join Date: Mar 2022
Posts: 153
Default

Try starting reaper from the command line this way:

PIPEWIRE_LATENCY=256/48000 reaper

and see if the number changes from 190 to 5.3. If it does, become root and put PIPEWIRE_LATENCY=256/48000 into /etc/environment .
__________________
soundcloud.com/forrest-nd86
ForrestH is offline   Reply With Quote
Old 03-27-2023, 04:55 AM   #12
axel_ef
Human being with feelings
 
axel_ef's Avatar
 
Join Date: Jan 2007
Location: Erfurt
Posts: 784
Default

I've done the setup in ~/.config/pipewire/jack.conf and I'm getting 5.3ms as well

Code:
jack.properties = {
     node.latency       = 256/48000
     ....
axel_ef is online now   Reply With Quote
Old 03-27-2023, 06:30 AM   #13
mcoyle
Human being with feelings
 
mcoyle's Avatar
 
Join Date: Jan 2022
Location: Kalamazoo, MI
Posts: 285
Default

Thank you both for the comments and suggestions. I thought Pipewire was suppose to make things easier than Jack, but I'm not finding that to be true, and I clearly need to learn more and dig deeper into pipewire.

I'm in the middle of a couple projects and don't want to mess with my settings right now, but I have an experimental install of 22.10 and when I get a chance, I'll do some testing there.
__________________
Audio Post Engineer: JennAudio.com
Adjunct Faculty: Columbia College Chicago - Retired!
mcoyle is offline   Reply With Quote
Old 03-27-2023, 06:44 AM   #14
reaper38
Human being with feelings
 
Join Date: Jul 2016
Posts: 26
Default

Quote:
Originally Posted by mcoyle View Post
I thought Pipewire was suppose to make things easier than Jack, but I'm not finding that to be true, and I clearly need to learn more and dig deeper into pipewire.
I think that the developers of Pipewire need to make it A LOT more simpler to change sample rate and latency. Other than that I really like Pipewire. I have had four different audio interfaces running at 64 samples latency simultaneously without xruns and on my laptop's built in audio I can run much lower latency compared to when I used pure JACK. I amazes me how that is possible.
reaper38 is offline   Reply With Quote
Old 03-27-2023, 09:59 AM   #15
ForrestH
Human being with feelings
 
ForrestH's Avatar
 
Join Date: Mar 2022
Posts: 153
Default

I've got three hardware ins and two hardware outs; to connect them through JACK I have to run a script containing, among other things,

Code:
alsa_in -j NanoIn -r 48000 -d hw:Nano,0 &
#alsa_in -j "Capture 1" -r 48000 -d hw:PCH,0,0 &
alsa_in -j "Capture 2" -d hw:PCH,2,0 -r 48000 &
alsa_out -j MonitorSpeakers -r 48000 -d hw:HDMI,7 &
At the moment, Pipewire surfaces them all with no intervention from me. I think adding PIPEWIRE_LATENCY=256/48000 to /etc/environment was the only pipewire configuration I did the last time I installed Linux [pause to check contents of /etc/alsa/conf.d/ — nope, no edits there] which I don't find more onerous than setting up QJackCtl, or for that matter my startup script line:

Code:
JACK_NO_AUDIO_RESERVATION=1 /usr/bin/jackd -P 80 --silent -dalsa --device hw:CARD=PCH,DEV=0 -r48000 -p384 -n4 --softmode >/dev/null 2>&1 &
__________________
soundcloud.com/forrest-nd86
ForrestH is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.