From c07353eeb4fb9d48e8e2868cf2949d11b3ccfcea Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 28 Sep 2025 12:53:22 +0200 Subject: [PATCH] Add click-free bypass/enable to ACE-Amp --- share/scripts/amp5.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/share/scripts/amp5.lua b/share/scripts/amp5.lua index dfd2061f0e..307d480283 100644 --- a/share/scripts/amp5.lua +++ b/share/scripts/amp5.lua @@ -20,6 +20,7 @@ function dsp_params () return { { ["type"] = "input", name = "Gain", min = -20, max = 20, default = 0, unit="dB"}, + { ["type"] = "input", name = "Enable", min = 0, max = 1, default = 1, bypass = true, toggled = true }, } end @@ -42,7 +43,13 @@ function dsp_runmap (bufs, in_map, out_map, n_samples, offset) ARDOUR.DSP.process_map (bufs, n_out, in_map, out_map, n_samples, offset) local ctrl = CtrlPorts:array() -- get control port array - local target_gain = ARDOUR.DSP.dB_to_coefficient (ctrl[1]) -- 10 ^ (0.05 * ctrl[1]) + local target_gain; + if ctrl[2] <= 0 then -- when disabled + target_gain = 1.0 + else + target_gain = ARDOUR.DSP.dB_to_coefficient (ctrl[1]) -- 10 ^ (0.05 * ctrl[1]) + end + local current_gain = cur_gain -- start with the same for all channels cur_gain = target_gain -- use target gain if no channel is mapped.