Hi everyone. I'm completely new to audio in general as well as linux audio software.
I was trying to set up Jack to behave similar to software like Loopback or Blackhole in Mac. For software that is not compatible with Jack, I was thinking on creating virtual inputs and outputs with Pulseaudio, seems doable because Cadence already creates one input and one output device, but still reading about how this work to add some more. Also, I wanted to map some different inpouts and outputs with alsa_in alsa_out.
Nearest I got is using Cadence and Catia, but for some reason, even when I configure Cadence to start Jack linked to HW:2,0 , I can't alsa_out hw:0,1 to add a second output device, I suppose because it is because it is already picked by PulseAudio for some reasons. So I suppose the target is to PulseAudio to only detect/work with the vitual inputs and outputs, and manage the real inputs and outputs with Jack.
Doesn't seems to be a weird idea in my head, yet I can't find anyone talking about making a similar setup online, making me think I'm probably misunderstanding something. Anyone have experience with a similar setup and can suggest, or perhaps you have some links my google-fu failed to find?
Thanks for reading.
Newbie trying to emulate Loopback or Blackhole with JACK
Moderators: MattKingUSA, khz
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: Newbie trying to emulate Loopback or Blackhole with JACK
Hi madmalkav. There is a good chance you will at least be able to get close to what you want. At the moment I'm not sure what that is.
For me it would be easier if you provide a specific example of something you want to do and we could see how we go with that, dealing with each specific case.
I don't know what they are, or what they do.madmalkav wrote: I was trying to set up Jack to behave similar to software like Loopback or Blackhole in Mac.
Software that isn't JACK-ified often uses ALSA and there is an ALSA-JACK bridge in Cadence.madmalkav wrote:For software that is not compatible with Jack, I was thinking on creating virtual inputs and outputs with Pulseaudio,
alsa_in is for adding hardware inputs.madmalkav wrote:Also, I wanted to map some different inpouts and outputs with alsa_in alsa_out.
For me it would be easier if you provide a specific example of something you want to do and we could see how we go with that, dealing with each specific case.
-
- Established Member
- Posts: 8
- Joined: Fri Jul 31, 2020 2:05 pm
- Has thanked: 2 times
- Been thanked: 2 times
Re: Newbie trying to emulate Loopback or Blackhole with JACK
I was thinking in example to be able to mix the audio with some different colleagues by Skype or DIscord or similar while playing some other audio from my computer without causing a loop. I think that is called a "mix-minus", but definitively my head need a break, so I'm gonna grab a beer and not think about this for some hours
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: Newbie trying to emulate Loopback or Blackhole with JACK
I don't think JACK is relevant to this case. I've found this diagram useful :madmalkav wrote: I was thinking in example to be able to mix the audio with some different colleagues by Skype or DIscord or similar while playing some other audio from my computer without causing a loop.
JACK and Pulse are both sound servers. JACK is for pro audio and Pulse is for desktop audio. We need the server/client model so that multiple apps can access the sound hardware. A long time ago there was only ALSA and that meant in the default setup it was only possible to use one sound app at a time -- it wasn't possible to have sound output from e.g. a browser and a media player at the same time.
Using a server/client model allows multiple audio streams to be directed to the same audio hardware. For desktop audio I don't think there is anything to be gained by adding JACK.
-
- Established Member
- Posts: 8
- Joined: Fri Jul 31, 2020 2:05 pm
- Has thanked: 2 times
- Been thanked: 2 times
Re: Newbie trying to emulate Loopback or Blackhole with JACK
I more or less managed to do what I wanted, with Cadence, some command line, and some small annoyances. I still have to put it in practice though. So let's go with a fictional example. Imagine I'm meeting online with my two colleagues, I want to record the audio of all three of us plus some additional sounds on my computer with some software, but I will also output that mix to a hardware device. I want everyone to hear everything but themselves. So, I use this commands to create the virtual devices I need in PulseAudio:
pactl load-module module-jack-sink client_name=friend_A_audio
pactl load-module module-jack-sink client_name=friend_B_audio
pactl load-module module-jack-source client_name=friend_A_return
pactl load-module module-jack-source client_name=friend_B_return
pactl load-module module-jack-source client_name=Recording
And I add the second output through alsa_out:
alsa_out -j "External Recorder" -d hw:CODEC,0 2>&1 1> /dev/null &
But, for getting the audio to there, I need to "bridge" it. So , let's do:
pactl load-module module-jack-sink client_name=Bridge
And here we have the monster I created, as displayed by Catia:
You can easily make variations over this, like two persons in the same place recording and another person online, so perhaps you need to add an additional recording device with alsa_in and send the audio to this person to an additional device added with alsa_out, etc...
PS: forget about the Bridge part, that was killing the audio output to the device, I have to just make all the mappings directly to the device to get audio out:
pactl load-module module-jack-sink client_name=friend_A_audio
pactl load-module module-jack-sink client_name=friend_B_audio
pactl load-module module-jack-source client_name=friend_A_return
pactl load-module module-jack-source client_name=friend_B_return
pactl load-module module-jack-source client_name=Recording
And I add the second output through alsa_out:
alsa_out -j "External Recorder" -d hw:CODEC,0 2>&1 1> /dev/null &
But, for getting the audio to there, I need to "bridge" it. So , let's do:
pactl load-module module-jack-sink client_name=Bridge
And here we have the monster I created, as displayed by Catia:
You can easily make variations over this, like two persons in the same place recording and another person online, so perhaps you need to add an additional recording device with alsa_in and send the audio to this person to an additional device added with alsa_out, etc...
PS: forget about the Bridge part, that was killing the audio output to the device, I have to just make all the mappings directly to the device to get audio out:
-
- Established Member
- Posts: 1392
- Joined: Thu Oct 11, 2018 4:13 pm
- Has thanked: 168 times
- Been thanked: 247 times
Re: Newbie trying to emulate Loopback or Blackhole with JACK
It looks good anyway. I can't really follow the connections or have any idea what it is doing, but cool if that's what you wanted. I think you'll like PipeWire when it's available.
-
- Posts: 1
- Joined: Sat Jul 10, 2021 2:04 pm
Re: Newbie trying to emulate Loopback or Blackhole with JACK
So does anyone know how to achieve black hole / loopback functionality with pipewire? I just want to configure an input device that forwards the output from the main system audio.
ETA: didn't see the images loaded before I logged in, the posts above might be able to help me out.
ETA: didn't see the images loaded before I logged in, the posts above might be able to help me out.
Last edited by benwiley4000 on Sat Jul 10, 2021 2:08 pm, edited 1 time in total.