From e02a02e499d9f368e1e30a8281973277b1bbdaca Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Thu, 21 Jun 2018 20:11:15 +0200 Subject: [PATCH] Automate Firefox JACK mapping Previously was doing 'by hand' (with LADISH), and each new connexion was associated to a special track in Non-Mixer. This was limiting, e.g. one tab = one channel in Non-Mixer, created manually. Now with jack-matchmaker, a regexp tells that all Firefox output goes into one channel in Non-Mixer. No need to mix each tab because usually, players have an individual volume control. --- .config/ardour5/config | 4 ++-- .config/i3/config | 14 ++++++++------ .config/jack-matchmaker/patterns | 13 +++++++++++-- .config/jack/conf.xml | 2 +- .config/nonmixer/Home/snapshot | 14 +------------- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.config/ardour5/config b/.config/ardour5/config index c6fd3f1..46c48b5 100644 --- a/.config/ardour5/config +++ b/.config/ardour5/config @@ -186,7 +186,7 @@ - + @@ -196,7 +196,7 @@ - + diff --git a/.config/i3/config b/.config/i3/config index 88c130d..c570aea 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -186,14 +186,16 @@ exec --no-startup-id redshift-gtk # Set ALSA initial volume exec-always --no-startup-id -# Start JACK server and session manager : -#- Cadence starts JACK, A2J and load Home LADISH studio -#- Claudia starts GUI -for_window [class="Claudia"] move container to workspace 3 +for_window [class="Claudia"] move container to workspace 4 for_window [class="Cadence"] floating enable; move container to workspace 3 -for_window [class="Non-Mixer"] move container to workspace 3 +for_window [class="Non-Mixer"] move container to workspace 4 for_window [class="Ardour"] move container to workspace 3 for_window [title="Pianoteq*"] move container to workspace 3 -exec --no-startup-id "sh -c 'cadence-session-start --start; sleep 3; Ardour5 /mnt/data/Documents/Ardour/Petrus;" +# Cadence will take care of all we need : +# - Config tells Cadence to start LADISH, export MIDI hw and start A2J ; +# - LADISH implies JACK starts, then it will starts needed apps (e.g. Non-Mixer) +exec --no-startup-id cadence-session-start --start + +# Automate port mapping for applications exec --no-startup-id jack-matchmaker -p ~/.config/jack-matchmaker/patterns \ No newline at end of file diff --git a/.config/jack-matchmaker/patterns b/.config/jack-matchmaker/patterns index 730bbe5..f40018a 100644 --- a/.config/jack-matchmaker/patterns +++ b/.config/jack-matchmaker/patterns @@ -1,7 +1,16 @@ # VLC Left vlc.*?1$ -.*:VLC/.*?1 +.*:VLC/in-1 # VLC Right vlc.*?2$ -.*:VLC/in.*?2 +.*:VLC/in-2 + +# == Firefox, all tabs mixed in one : volume per tab is managed through players directly == +# FF Left +.*?:AudioStream.*?0$ +.*:Firefox/in-1 + +# FF Right +.*?:AudioStream.*?1$ +.*:Firefox/in-2 \ No newline at end of file diff --git a/.config/jack/conf.xml b/.config/jack/conf.xml index 81ae6b4..fb8fec9 100644 --- a/.config/jack/conf.xml +++ b/.config/jack/conf.xml @@ -4,7 +4,7 @@ JACK settings, as persisted by D-Bus object. You probably don't want to edit this because it will be overwritten next time jackdbus saves. --> - + diff --git a/.config/nonmixer/Home/snapshot b/.config/nonmixer/Home/snapshot index 0e01551..81c266f 100644 --- a/.config/nonmixer/Home/snapshot +++ b/.config/nonmixer/Home/snapshot @@ -1,24 +1,12 @@ { Spatialization_Console 0x14 create :range 1.000000 :projection 1 :shown 0 Group 0xD create :name "Home" - Mixer_Strip 0x1 create :name "Firefox 1" :width "narrow" :tab "fader" :color 424238335 :gain_mode 0 :mute_mode 0 :group 0xD :auto_input "" :manual_connection 0 + Mixer_Strip 0x1 create :name "Firefox" :width "narrow" :tab "fader" :color 424238335 :gain_mode 0 :mute_mode 0 :group 0xD :auto_input "" :manual_connection 0 Chain 0x2 create :strip 0x1 :tab "controls" JACK_Module 0x3 create :parameter_values "0.000000:2.000000" :is_default 1 :chain 0x2 :active 1 Gain_Module 0x4 create :parameter_values "1.250000:0.000000" :is_default 1 :chain 0x2 :active 1 Meter_Module 0x5 create :is_default 1 :chain 0x2 :active 1 JACK_Module 0x6 create :parameter_values "2.000000:0.000000" :is_default 1 :chain 0x2 :active 1 - Mixer_Strip 0xE create :name "Firefox 2" :width "narrow" :tab "fader" :color 596516649 :gain_mode 0 :mute_mode 0 :group 0xD :auto_input "" :manual_connection 0 - Chain 0xF create :strip 0xE :tab "chain" - JACK_Module 0x10 create :parameter_values "0.000000:2.000000" :is_default 1 :chain 0xF :active 1 - Gain_Module 0x11 create :parameter_values "1.250000:0.000000" :is_default 1 :chain 0xF :active 1 - Meter_Module 0x12 create :is_default 1 :chain 0xF :active 1 - JACK_Module 0x13 create :parameter_values "2.000000:0.000000" :is_default 1 :chain 0xF :active 1 - Mixer_Strip 0x15 create :name "Firefox 3" :width "narrow" :tab "fader" :color 1025202362 :gain_mode 0 :mute_mode 0 :group 0xD :auto_input "" :manual_connection 0 - Chain 0x16 create :strip 0x15 :tab "chain" - JACK_Module 0x17 create :parameter_values "0.000000:2.000000" :is_default 1 :chain 0x16 :active 1 - Gain_Module 0x18 create :parameter_values "0.000000:0.000000" :is_default 1 :chain 0x16 :active 1 - Meter_Module 0x19 create :is_default 1 :chain 0x16 :active 1 - JACK_Module 0x1A create :parameter_values "2.000000:0.000000" :is_default 1 :chain 0x16 :active 1 Mixer_Strip 0x1B create :name "PianoTeq" :width "narrow" :tab "fader" :color 1350490027 :gain_mode 0 :mute_mode 0 :group 0xD :auto_input "" :manual_connection 0 Chain 0x1C create :strip 0x1B :tab "chain" JACK_Module 0x1D create :parameter_values "0.000000:2.000000" :is_default 1 :chain 0x1C :active 1