type is a protected word.

This commit is contained in:
Nikolaus Gullotta 2019-01-04 11:14:23 -06:00
parent ff0ee75a56
commit b05cabe700

View file

@ -230,15 +230,16 @@ function factory () return function ()
local order_nmbr = 0 local order_nmbr = 0
local tmp_order_str, tmp_cache_str = "", "" local tmp_order_str, tmp_cache_str = "", ""
for p in order:iter() do for p in order:iter() do
local ptype
if not(p:to_insert():isnil()) then 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 else
type = 99 ptype = 99
end end
local pid = p:to_stateful():id():to_s() local pid = p:to_stateful():id():to_s()
if not(string.find(p:display_name(), "latcomp")) then if not(string.find(p:display_name(), "latcomp")) then
tmp_order_str = tmp_order_str .. string.format(proc_order_string, order_nmbr, pid) 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 end
order_nmbr = order_nmbr + 1 order_nmbr = order_nmbr + 1
end end
@ -271,7 +272,7 @@ function factory () return function ()
local active = proc:active() local active = proc:active()
local id = proc:to_stateful():id():to_s() local id = proc:to_stateful():id():to_s()
local plug = proc:to_insert ():plugin (0) 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 local n = 0 -- count control-ports
for j = 0, plug:parameter_count () - 1 do -- iterate over all plugin parameters for j = 0, plug:parameter_count () - 1 do -- iterate over all plugin parameters
if plug:parameter_is_control (j) then if plug:parameter_is_control (j) then
@ -295,7 +296,7 @@ function factory () return function ()
local proc_str = string.format( local proc_str = string.format(
processor_string, processor_string,
id, id,
type, ptype,
proc:display_name(), proc:display_name(),
r:name(), r:name(),
r:to_stateful():id():to_s(), r:to_stateful():id():to_s(),