-- Use a-Fluid Synth, parameter Output Level to test local region = nil for r in Editor:get_selection().regions:regionlist():iter() do if region == nil then region = r end end -- Bail out if no region was selected if region == nil then LuaDialog.Message("Automation issue", "Please select a region first!", LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run() return end -- Identify the track the region belongs to. There really is no better way?! local track = nil for route in Session:get_tracks():iter() do for r in route:to_track():playlist():region_list():iter() do if r == region then track = route:to_track() end end end -- Get automation of first parameter for first plugin on selected track proc = track:nth_plugin(0) local al, _, pd = ARDOUR.LuaAPI.plugin_automation(proc, 0) -- Add a new automation point at the beginning of the region al:add(region:position() - region:start(), -36, false, false)