falkTX / Carla

Audio plugin host
https://kx.studio/carla
1.57k stars 145 forks source link

Add option to name Carla Patchbays #1568

Open Bleuzen opened 2 years ago

Bleuzen commented 2 years ago

Hi, I want to use Carla-Patchbay as a plugin chain host for multiple "chains", so multiple instances are needed. But when I start new Carla-Patchbays, there is currently no option to set the name, so I end up with this:

image

Which is confusing, not really clear which is my mic processing chain here.

Some way to name the patchbay instances would help here, at least for console.

I start them with:

carla-patchbay -n ~/Carla/mic-patchbay.carxp 

There could be a new command line option for example:

carla-patchbay -n --name "MicFX" ~/Carla/mic-patchbay.carxp 
falkTX commented 2 years ago

why not simply use patchbay instances as plugins inside carla? then you can just rename the plugins.

Bleuzen commented 2 years ago

I want to load/unload any patchbay at any time from scripts/hotkeys, so each patchbay would need its own Carla instance, which means I end up with two Carla windows per fx chain, which is kinda ugly and can lead to worse overview. Also, a command line option makes it more flexible by being able to set adaptive names when launching.

falkTX commented 2 years ago

Well I dont have that implemented now, but env var is. So this will work just the same:

CARLA_CLIENT_NAME=testing carla-patchbay
Daniel-I-Am commented 11 months ago

I ran into a similar use case and noticed it only sometimes worked. I need predictable names for my inputs and outputs and would love the configuration ease of Carla.

I stumbled upon the env var before and when setting CARLA_CLIENT_NAME to some value, the pipewire inputs and outputs are properly registered with that name. However when starting it from a systemd unit file it no longer seems to work.

Some further debugging got me to this:
Running Carla-rack without a GUI --no-gui breaks this functionality.

Poking around in code leads me to believe it is set here, but this code is not called when the GUI is not rendered.

https://github.com/falkTX/Carla/blob/ecad5268e71faa9d9d8a5d40b7573a6936ad4b6e/source/frontend/carla_host.py#L212

Do you have any idea if there is a way to change the output names to be predictable when not using a GUI for Carla?


My minimal example

``` ➜ ~ pw-link -i Midi-Bridge:Midi Through:(playback_0) Midi Through Port-0 alsa_output.pci-0000_19_00.6.analog-stereo:playback_FL alsa_output.pci-0000_19_00.6.analog-stereo:playback_FR ➜ carla CARLA_CLIENT_NAME=Carla-output carla-rack ~/.config/carlaprofiles/outputprocessing.carxp & [1] 145141 ➜ ~ Carla 2.5.6 started, status: Python version: 3.11.5 Qt version: 5.15.8 PyQt version: 5.15.9 Binary dir: /usr/lib/carla Resources dir: /usr/share/carla/resources Frontend pixel ratio is 1.0 libjack.so.0 loaded successfully! [carla] Carla assertion failure: "newFrames > 0" in file CarlaEngineInternal.cpp, line 260 ➜ ~ pw-link -i Midi-Bridge:Midi Through:(playback_0) Midi Through Port-0 alsa_output.pci-0000_19_00.6.analog-stereo:playback_FL alsa_output.pci-0000_19_00.6.analog-stereo:playback_FR Carla-output:audio-in1 Carla-output:audio-in2 Carla-output:events-in ➜ ~ fg [1] + 145141 running CARLA_CLIENT_NAME=Carla-output carla-rack ^C% ➜ ~ CARLA_CLIENT_NAME=Carla-output carla-rack ~/.config/carlaprofiles/outputprocessing.carxp --no-gui & [1] 145505 ➜ ~ libjack.so.0 loaded successfully! [carla] Carla assertion failure: "newFrames > 0" in file CarlaEngineInternal.cpp, line 260 [carla] Will use LV2 X11 UI for 'LSP Parametric Equalizer x32 Stereo' [carla] Carla assertion failure: "newFrames > 0" in file CarlaEngineInternal.cpp, line 260 [carla] Will use LV2 X11 UI for 'LSP Compressor Stereo' Carla ready! ➜ ~ pw-link -i Midi-Bridge:Midi Through:(playback_0) Midi Through Port-0 alsa_output.pci-0000_19_00.6.analog-stereo:playback_FL alsa_output.pci-0000_19_00.6.analog-stereo:playback_FR Carla:audio-in1 Carla:audio-in2 Carla:events-in ➜ ~ fg [1] + 145505 running CARLA_CLIENT_NAME=Carla-output carla-rack --no-gui ```