diff options
author | Robin Gareus <robin@gareus.org> | 2017-02-17 11:19:15 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-17 11:19:15 +0100 |
commit | 64eb3bc7245e0a1d04fc1b281b7b28277adc498b (patch) | |
tree | 0d89540998ed1b66f0a33ef7d95d042e0a7bd4e8 /scripts/faders_to_trims.lua | |
parent | cded378e1756f985a920c44a2c04d7388c079959 (diff) |
Refine faders-to-trim script
Diffstat (limited to 'scripts/faders_to_trims.lua')
-rw-r--r-- | scripts/faders_to_trims.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/faders_to_trims.lua b/scripts/faders_to_trims.lua index 2d0ed44cae..3fd62833f2 100644 --- a/scripts/faders_to_trims.lua +++ b/scripts/faders_to_trims.lua @@ -19,6 +19,16 @@ function factory (params) for t in Session:get_tracks():iter() do 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) trim_gain = 20*v fader_pos = 0 @@ -53,6 +63,8 @@ function factory (params) --zero the fader gain t:gain_control():set_value(1, PBD.GroupControlDisposition.NoGroup) + ::skip:: + end --foreach track end --function |