mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Add click-free bypass/enable to ACE-Amp
This commit is contained in:
parent
73b903fd03
commit
c07353eeb4
1 changed files with 8 additions and 1 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue