44
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 19 Apr 2024
44 points (95.8% liked)
Linux
48317 readers
750 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
I do exactly this using
rofi
to select a clip, pipe it toplay
(part of SoX), have a qpwGraph profile route the output to a null pw node (along with my mic input), then route that to discord or whatever.Understood most of the words in that comment individually
What does PW stand for?
Hah, pipewire, sorry.
I was describing my setup from memory, here's what I actually have:
I then have this bound to a key combo in my qtile config which will pop up a menu so I can fuzzy search for a clip to play. However, this alone will just play the clip. To get it to go through discord, I also have a file
~/.config/pipewire/pipewire.conf.d/50-null-sinks.conf
with this in it:This creates two new nodes that I can use to combine audio into a single source. I then use a combination of the
pavucontrol
andqpwgraph
GUIs to control what audio streams go where. I wire my actual microphone along with the output ports of "Mic Loopback" to the input ports of "Input Mix". Then whatever app I want to play back through my mic, I wire up to the input ports of "Mic Loopback". To wire SoX up to Mic Loopback, I play a clip that's long enough for me to make the switch, and then it tends to remember that for the next time SoX launches. Finally, I wire Input Mix up to discord or whatever program I'm using.The
rofi
/play
combo is rock solid, I really like that. The pipewire/qpwgraph/pavucontrol part could probably be improved. It can feel a little non-deterministic, but really I think I don't fully understand what each app involved is doing to manipulate the pipewire graph, or how to configure them so they don't try to override each other when a pw node is added/removed.Edit: quick note. You might be wondering, what's the point of having both Mic Loopback and Input Mix? Couldn't I just have applications go directly to Input Mix? Yes, but generally you want to also hear the sound yourself, without hearing your own mic, and you want to be able to pick a single output device from within the app (most apps don't let you choose more than one). Having two separate nodes lets you split off the output of Mic Loopback to both Input Mix and the output associated with your headphones/speakers, that way you don't hear yourself too.
Ah fantastic, will have a look at this properly tomorrow
Turns out I am using pipewire with the pulse module so this should work