From cb341b2adaf14c48d6bc936dd4807bc6040496b1 Mon Sep 17 00:00:00 2001 From: Teo-CD Date: Sun, 26 Feb 2023 19:06:33 +0000 Subject: [PATCH 1/2] Basic script for mic chain This new script sets up a sink for the mic chain and loads the proper configuration. --- Perso/auto_audio.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 Perso/auto_audio.sh diff --git a/Perso/auto_audio.sh b/Perso/auto_audio.sh new file mode 100755 index 0000000..3422eeb --- /dev/null +++ b/Perso/auto_audio.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +module=$(pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name=Virt_Mic channel_map=front-left,front-right) + +if [ ! $? ]; then + notify-send -a "$0" -i microphone "Failed to set-up null sink" + exit -1 +else + notify-send - "$0" -i microphone "Null sink set-up" +fi + +carla ~/Projects/Audio/Carla/Basic\ Setup.carxp + +pactl unload-module $module From f8ce7759c81230d9c56747881e8f1063c121d95a Mon Sep 17 00:00:00 2001 From: Teo-CD Date: Sun, 26 Feb 2023 19:19:56 +0000 Subject: [PATCH 2/2] Update audio chain script Add two new sinks to be allow a sidechain compressor of the system audio controlled by discord output, which doesn't get compressed itself. --- Perso/auto_audio.sh | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/Perso/auto_audio.sh b/Perso/auto_audio.sh index 3422eeb..c597b88 100755 --- a/Perso/auto_audio.sh +++ b/Perso/auto_audio.sh @@ -1,14 +1,34 @@ #!/bin/bash -module=$(pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name=Virt_Mic channel_map=front-left,front-right) +mic_sink=$(pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name=Virt_Mic channel_map=front-left,front-right) if [ ! $? ]; then notify-send -a "$0" -i microphone "Failed to set-up null sink" exit -1 -else - notify-send - "$0" -i microphone "Null sink set-up" fi -carla ~/Projects/Audio/Carla/Basic\ Setup.carxp +discord_sink=$(pactl load-module module-null-sink media.class=Audio/Sink sink_name=Discord channel_map=stereo) + +if [ ! $? ]; then + notify-send -a "$0" -i microphone "Failed to set-up discord sink" + pactl unload-module $mic_sink + exit -1 +fi + +default_sink=$(pactl load-module module-null-sink media.class=Audio/Sink sink_name=Other channel_map=stereo) + +if [ ! $? ]; then + notify-send -a "$0" -i microphone "Failed to set-up discord sink" + pactl unload-module $mic_sink + pactl unload-module $discord_sink + exit -1 +fi + +notify-send - "$0" -i microphone "All sinks set-up" + +carla ~/Projects/Audio/Carla/Sidechain\ comp\ Setup.carxp + +pactl unload-module $mic_sink +pactl unload-module $discord_sink +pactl unload-module $default_sink -pactl unload-module $module