From fd74e7d8dc856779ea7f34bd0ca8e102884d6d6f Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 13 Nov 2023 16:19:44 +0100 Subject: [PATCH] fix volume issue with ecasound kits in edrumulus_gui --- tools/edrumulus_gui.py | 11 ++--------- tools/settings/pearlmmx_natural.ecs | 18 +++++++++--------- tools/settings/pearlmmx_rock.ecs | 16 ++++++++-------- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/tools/edrumulus_gui.py b/tools/edrumulus_gui.py index d2589f15..7ddd02ae 100755 --- a/tools/edrumulus_gui.py +++ b/tools/edrumulus_gui.py @@ -487,23 +487,16 @@ def ecasound_switch_chains(do_increment): chain_index = chain_index % len(chain_setups) selected_kit = chain_setups[chain_index] ecasound_socket.sendall("engine-halt\r\ncs-select {0}\r\ncs-connect {0}\r\nengine-launch\r\nstart\r\n".format(selected_kit).encode("utf8")) - ecasound_socket.recv(4096) # clear input buffer - kit_vol_str = "" # invalidate on new kit + ecasound_socket.sendall("c-select Master\r\ncop-set 1,1,{0}\r\n".format(kit_volume).encode("utf8")) # update kit volume + kit_vol_str = str(kit_volume) + " dB" def ecasound_kit_volume(do_increment): global kit_volume, kit_vol_str if ecasound_connect_try_cnt == 0: - # first, query current volume value - ecasound_socket.sendall("c-select Master\r\ncop-get 1,1\r\n".encode("utf8")) - data = ecasound_socket.recv(4096) - for substr in str(data).split("\\r\\n"): - if "." in substr: - kit_volume = int(float(substr)) # now modify and apply new volume value kit_volume = kit_volume + 1 if do_increment else kit_volume - 1 kit_volume = max(min(kit_volume, 30), -30) ecasound_socket.sendall("c-select Master\r\ncop-set 1,1,{0}\r\n".format(kit_volume).encode("utf8")) - ecasound_socket.recv(4096) # clear input buffer kit_vol_str = str(kit_volume) + " dB" diff --git a/tools/settings/pearlmmx_natural.ecs b/tools/settings/pearlmmx_natural.ecs index fd2afe8c..442ba6bf 100755 --- a/tools/settings/pearlmmx_natural.ecs +++ b/tools/settings/pearlmmx_natural.ecs @@ -3,31 +3,31 @@ -n:PearlMMX_Natural -a:KDrum -f:,1, -i jack,DrumGizmo:0-KDrum,0-KDrum --a:KDrum -chcopy:1,2 -eadb:4 -epp:50 +-a:KDrum -chcopy:1,2 -eadb:14 -epp:50 -a:Snare -f:,1, -i jack,DrumGizmo:1-Snare,1-Snare --a:Snare -chcopy:1,2 -eadb:-1 -epp:50 +-a:Snare -chcopy:1,2 -eadb:9 -epp:50 -a:Hihat -f:,1, -i jack,DrumGizmo:2-Hihat,2-Hihat --a:Hihat -chcopy:1,2 -eadb:-5 -epp:30 +-a:Hihat -chcopy:1,2 -eadb:5 -epp:30 -a:Tom1 -f:,1, -i jack,DrumGizmo:3-Tom1,3-Tom1 --a:Tom1 -chcopy:1,2 -eadb:4 -epp:40 +-a:Tom1 -chcopy:1,2 -eadb:14 -epp:40 -a:Tom2 -f:,1, -i jack,DrumGizmo:4-Tom2,4-Tom2 --a:Tom2 -chcopy:1,2 -eadb:4 -epp:60 +-a:Tom2 -chcopy:1,2 -eadb:14 -epp:60 -a:Tom3 -f:,1, -i jack,DrumGizmo:5-Tom3,5-Tom3 --a:Tom3 -chcopy:1,2 -eadb:4 -epp:70 +-a:Tom3 -chcopy:1,2 -eadb:14 -epp:70 -a:OHLeft -f:,1, -i jack,DrumGizmo:6-OHLeft,6-OHLeft --a:OHLeft -chcopy:1,2 -eadb:-4 -epp:0 +-a:OHLeft -chcopy:1,2 -eadb:6 -epp:0 -a:OHRight -f:,1, -i jack,DrumGizmo:7-OHRight,7-OHRight --a:OHRight -chcopy:1,2 -eadb:-4 -epp:100 +-a:OHRight -chcopy:1,2 -eadb:6 -epp:100 -a:all -f:,2, -o loop,master --a:Master -eadb:16 -i loop,master +-a:Master -eadb:0 -i loop,master -a:Master -o jack,system diff --git a/tools/settings/pearlmmx_rock.ecs b/tools/settings/pearlmmx_rock.ecs index 0967069c..b41a6bb5 100755 --- a/tools/settings/pearlmmx_rock.ecs +++ b/tools/settings/pearlmmx_rock.ecs @@ -7,36 +7,36 @@ #-a:KDrum -elv2:urn:ardour:a-comp,22,70,0,7,-27,4.3,0,1 #-a:KDrum -eca:69,0.07,0.25,0.5 -a:KDrum -elv2:urn:ardour:a-eq,80,6,65,10.9,1.230,6147,12.6,1.2,256,-15.7,0.766,909,-9.3,0.622,8088,-7.4,2.5,1,1,1,1,1,1,1 --a:KDrum -chcopy:1,2 -eadb:3 -epp:50 +-a:KDrum -chcopy:1,2 -eadb:-3 -epp:50 -a:Snare -f:,1, -i jack,DrumGizmo:1-Snare,1-Snare -a:Snare -elv2:urn:ardour:a-eq,28,-20,86,3.1,1,194,-4.9,0.38,2500,0,1,660,-3.5,0.32,1947,1.9,1.5,1,1,1,1,1,1,1 --a:Snare -chcopy:1,2 -eadb:5 -epp:50 +-a:Snare -chcopy:1,2 -eadb:-1 -epp:50 -a:Snare -elv2:urn:ardour:a-reverb,0.3,0.5,1 -a:Hihat -f:,1, -i jack,DrumGizmo:2-Hihat,2-Hihat -a:Hihat -elv2:urn:ardour:a-eq,315,-20,300,0,1,1000,0,1,2500,0,1,6000,0,1,9664,18.6,-6.0,1,1,1,1,1,1,1 --a:Hihat -chcopy:1,2 -eadb:-5 -epp:30 +-a:Hihat -chcopy:1,2 -eadb:-11 -epp:30 -a:Tom1 -f:,1, -i jack,DrumGizmo:3-Tom1,3-Tom1 -a:Tom1 -elv2:urn:ardour:a-eq,160,0,300,0,1,106,11.5,0.9,829,-3.1,2.26,5204,13.6,1,9000,0,1.5,1,1,1,1,1,1,1 --a:Tom1 -chcopy:1,2 -eadb:-5 -epp:40 +-a:Tom1 -chcopy:1,2 -eadb:-11 -epp:40 -a:Tom2 -f:,1, -i jack,DrumGizmo:4-Tom2,4-Tom2 -a:Tom2 -elv2:urn:ardour:a-eq,160,0,251,0,1,95,10.5,1.12,829,0,2.26,4676,13,1.08,9000,0,-1.0,1,1,1,1,1,1,1 --a:Tom2 -chcopy:1,2 -eadb:-5 -epp:60 +-a:Tom2 -chcopy:1,2 -eadb:-11 -epp:60 -a:Tom3 -f:,1, -i jack,DrumGizmo:5-Tom3,5-Tom3 -a:Tom3 -elv2:urn:ardour:a-eq,160,0,300,0,1,86,11.5,1.04,829,-3.5,2.26,4355,14.6,1.55,9000,0,2.0,1,1,1,1,1,1,1 --a:Tom3 -chcopy:1,2 -eadb:-5 -epp:70 +-a:Tom3 -chcopy:1,2 -eadb:-11 -epp:70 -a:OHLeft -f:,1, -i jack,DrumGizmo:6-OHLeft,6-OHLeft -a:OHLeft -elv2:urn:ardour:a-eq,160,0,300,0,1,100,0,1,2500,0,1,6000,0,1,3321,6,-12.0,1,1,1,1,1,1,1 --a:OHLeft -chcopy:1,2 -eadb:0 -epp:0 +-a:OHLeft -chcopy:1,2 -eadb:-6 -epp:0 -a:OHRight -f:,1, -i jack,DrumGizmo:7-OHRight,7-OHRight -a:OHRight -elv2:urn:ardour:a-eq,160,0,300,0,1,100,0,1,2500,0,1,6000,0,1,3321,6,-12.0,1,1,1,1,1,1,1 --a:OHRight -chcopy:1,2 -eadb:0 -epp:100 +-a:OHRight -chcopy:1,2 -eadb:-6 -epp:100 -a:all -f:,2, -o loop,master #-a Master -elv2:urn:ardour:a-reverb,0.2,0.5,1