Cadence icon indicating copy to clipboard operation
Cadence copied to clipboard

Feature Request: Configurable Pulse2Jack Sink/Sources (multiple)

Open markjfisher opened this issue 5 years ago • 13 comments

I've locally changed cadence-pulse2jack to read from a local configuration file to setup multiple sink/sources in pulse2jack bridges.

The config file looks something like:

#type|Name|channels|connect
source|PulseAudio JACK Source|2|yes
sink|PulseAudio JACK Sink|2|yes
source|Discord Input|2|no
sink|Discord Output|2|no
sink|Music Output|2|no

and then cadence-pulse2jack sources this into a copy of /usr/share/cadence/pulse2jack/play+rec.pa (or in the case of it running, directly into pactl commands) when starting up the bridge, so I end up with multiple sink/sources available in jack, that are also available to applications that you can set input/output, and which then allows me to load different effects on each channel, rather than everything on the global "PulseAudio JACK Source/Sink".

Is this something that would be useful to contribute as a pull request? If so, how would you like the configuration done? I've currently got a simple text file in a known location. Also, is this possible in a different way? I'm copying a similar setup on my linux box from my Windows machine, where I was able to create multiple loopback devices to achieve the same thing, but this seemed to be missing in the linux setup, hence why I've added it.

Example look after startup in Claudia: image

Mark Fisher

markjfisher avatar Oct 29 '18 23:10 markjfisher

+1000

@markjfisher I was about to create an issue for this precise feature (the ability to have multiple pulse sinks and sources),

@falkTX please accept this pull request !

max-l avatar Dec 03 '18 16:12 max-l

I've been working on it over last few weeks in my spare time and will have something to show soon, with configuration done directly from within cadence.

Here's how it currently looks.

image

markjfisher avatar Dec 03 '18 19:12 markjfisher

@markjfisher brilliant !

I volunteer for beta testing ! ;-)

max-l avatar Dec 03 '18 20:12 max-l

Hello @markjfisher I wonder if you've made any progress with this test, or if you're willing to push the changes to git to give it a spin. I'm trying to achieve this on my side and any work done would help me get jumpstarted on it greatly.

Lars avatar May 01 '19 20:05 Lars

+100000 even here can you create a pull request/patch?

nicola-lunghi avatar Aug 11 '19 22:08 nicola-lunghi

I'm sorry I haven't pushed this yet. My linux dev machine went problematic several months ago and I switched back to a Mac, so this got left behind. I still have the code, and will be getting a new Linux machine soon, so intend to bring it back up to date. The bits that were missing are: 1) the interaction with GUI is not the best, I've never done QT dev before. 2) Amending the startup shell script needs some tweaking. It's not far off, I will definitely finish this.

markjfisher avatar Aug 12 '19 05:08 markjfisher

Hi Thanks for your response. If you push it in a branch somewhere I can have a look. Cheers Nick

On Mon 12 Aug 2019, 06:47 Mark Fisher, [email protected] wrote:

I'm sorry I haven't pushed this yet. My linux dev machine went problematic several months ago and I switched back to a Mac, so this got left behind. I still have the code, and will be getting a new Linux machine soon, so intend to bring it back up to date. The bits that were missing are: 1) the interaction with GUI is not the best, I've never done QT dev before. 2) Amending the startup shell script needs some tweaking. It's not far off, I will definitely finish this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/falkTX/Cadence/issues/234?email_source=notifications&email_token=AGB6YTCGTYCV5QKVWRG67L3QED2NZA5CNFSM4GADNGAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4BTQYA#issuecomment-520304736, or mute the thread https://github.com/notifications/unsubscribe-auth/AGB6YTEXI5VUWJT6JN5PSHTQED2NZANCNFSM4GADNGAA .

nicola-lunghi avatar Aug 12 '19 08:08 nicola-lunghi

i use a bash script for 2 sinks and 1 source with additional options to rename Pulseaudio JACK Sinks/Sources

pactl load-module module-jack-sink sink_name=aux_out client_name=aux2jack channels=2 connect=0
pactl load-module module-jack-sink sink_name=voip_out client_name=voip2jack channels=2 connect=0
pactl load-module module-jack-source source_name=voip_in client_name=jack2voip channels=2 connect=0
pactl set-default-sink aux_out
pactl set-default-source voip_in

audio playback in Pulseaudio uses default sink aux2jack. VOIP calls must be manually assigned to voip_out in pavucontrol --tab=1

nik-gnomic avatar Apr 23 '20 15:04 nik-gnomic

I'm quite interested in this, but @nik-gnomic's workaround works for me atm.

GraithTiger avatar May 07 '20 07:05 GraithTiger

This would be much appreciated. Another workaround I use to disconnect it is to put this in my audio startup script:

#!/bin/bash
jack_disconnect "PulseAudio JACK Sink:front-left"  "system:playback_1"
jack_disconnect "PulseAudio JACK Sink:front-right" "system:playback_2"

I don't want to disable self-connect throughout the entire jack server, so this was my only option that works with cadence atm.

shiro avatar May 11 '20 12:05 shiro

I've made a PR for this UI change, see #290

markjfisher avatar Jun 10 '20 19:06 markjfisher

If anyone's interested, the PR I just added can be used as a workaround for this in the meantime. It allows you to specify a configuration file in ~/.config or via an environment variable.

mead0w0 avatar Feb 12 '21 14:02 mead0w0

I'm using the Non Session Manager, with this script to add sinks and sources.

You can easily adapt it to your own wishes, and of course you can use any other session manager you want, or run the script in other ways.

Not to diminish the efforts of people who actually contribute to the program. Just to bridge the time until the PR is merged.

Ghostbird avatar Mar 22 '21 20:03 Ghostbird