Lua - Setting all session faders to a specific value

Greetings Ardour friends,
I’m trying my hand at writing a Lua script that will set all session faders to a certain value. Looking at the Lua section in the Ardour manual, I can’t seem to find “how” to actually set a fader value. Any guidance would be much appreciated.

Thank you,
Steve

The Fader is the main gain_control of each Track. So to set all faders to -6dB (gain coefficient 0.5):

for t in Session:get_tracks():iter() do
    t:gain_control():set_value (0.5, PBD.GroupControlDisposition.NoGroup)
end

I suggest to look at examples. The following two seem pertinent:


Hi Robin,

Thank you so much for helping me with this. It worked!
And I am so glad there is a quick script access under the Edit menu. Awesome.
Thank you,
Steve

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.