Refine faders-to-trim script
This commit is contained in:
parent
cded378e17
commit
64eb3bc724
@ -19,6 +19,16 @@ function factory (params)
|
|||||||
for t in Session:get_tracks():iter() do
|
for t in Session:get_tracks():iter() do
|
||||||
|
|
||||||
fader_value = t:gain_control():get_value()
|
fader_value = t:gain_control():get_value()
|
||||||
|
if fader_value == 1 then
|
||||||
|
goto skip
|
||||||
|
end
|
||||||
|
if t:gain_control():automation_state() ~= ARDOUR.AutoState.Off then
|
||||||
|
goto skip
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO: skip MIDI tracks without or with a post-fader synth
|
||||||
|
-- (fader is MIDI-velocity)
|
||||||
|
|
||||||
v = math.log(fader_value, 10)
|
v = math.log(fader_value, 10)
|
||||||
trim_gain = 20*v
|
trim_gain = 20*v
|
||||||
fader_pos = 0
|
fader_pos = 0
|
||||||
@ -53,6 +63,8 @@ function factory (params)
|
|||||||
--zero the fader gain
|
--zero the fader gain
|
||||||
t:gain_control():set_value(1, PBD.GroupControlDisposition.NoGroup)
|
t:gain_control():set_value(1, PBD.GroupControlDisposition.NoGroup)
|
||||||
|
|
||||||
|
::skip::
|
||||||
|
|
||||||
end --foreach track
|
end --foreach track
|
||||||
|
|
||||||
end --function
|
end --function
|
||||||
|
Loading…
Reference in New Issue
Block a user