Update Lua VAMP scripts to show a progress dialog
[ardour.git] / scripts / mixer_settings_store.lua
index 0236e820bf1249ef2698456500254a526614b79e..699b92105f7d72384f97976048325aeb1e588d60 100644 (file)
@@ -230,15 +230,16 @@ function factory () return function ()
                        local order_nmbr = 0
                        local tmp_order_str, tmp_cache_str = "", ""
                        for p in order:iter() do
+                               local ptype
                                if not(p:to_insert():isnil()) then
-                                       type = p:to_insert():plugin(0):get_info().type
+                                       ptype = p:to_insert():plugin(0):get_info().type
                                else
-                                       type = 99
+                                       ptype = 99
                                end
                                local pid = p:to_stateful():id():to_s()
                                if not(string.find(p:display_name(), "latcomp")) then
                                        tmp_order_str = tmp_order_str .. string.format(proc_order_string, order_nmbr, pid)
-                                       tmp_cache_str = tmp_cache_str .. string.format(proc_cache_string, pid, p:display_name(), type)
+                                       tmp_cache_str = tmp_cache_str .. string.format(proc_cache_string, pid, p:display_name(), ptype)
                                end
                                order_nmbr = order_nmbr + 1
                        end
@@ -271,16 +272,16 @@ function factory () return function ()
                                local active = proc:active()
                                local id = proc:to_stateful():id():to_s()
                                local plug = proc:to_insert ():plugin (0)
-                               local type = proc:to_insert():plugin(0):get_info().type
+                               local ptype = proc:to_insert():plugin(0):get_info().type
                                local n = 0 -- count control-ports
                                for j = 0, plug:parameter_count () - 1 do -- iterate over all plugin parameters
                                        if plug:parameter_is_control (j) then
                                                local label = plug:parameter_label (j)
                                                if plug:parameter_is_input (j) and label ~= "hidden" and label:sub (1,1) ~= "#" then
-                                                       local _, _, pd = ARDOUR.LuaAPI.plugin_automation(proc, n)
+                                                       --local _, _, pd = ARDOUR.LuaAPI.plugin_automation(proc, n)
                                                        local val = ARDOUR.LuaAPI.get_processor_param(proc, j, true)
                                                        print(r:name(), "->", proc:display_name(), label, val)
-                                                       params[n] = val
+                                                       params[j] = val
                                                end
                                                n = n + 1
                                        end
@@ -295,7 +296,7 @@ function factory () return function ()
                                local proc_str = string.format(
                                                processor_string,
                                                id,
-                                               type,
+                                               ptype,
                                                proc:display_name(),
                                                r:name(),
                                                r:to_stateful():id():to_s(),