Two other problems:
1)
local NoteLengths = { "16th" = 48, "32th" = 24, "4th" = 192, "64th" = 12, "8th" = 96, "Half" = 384, "Whole" = 768 }
gives this error: '}' expected near '='
2)local function ShowVar(name, var)
if Testing then
nwcut.warn(name.." ==> ", var, "\n")
end -- if
end -- ShowVar
local line = item:__tostring()
ShowVar("line", line)
local durs = item.Opts.Dur
ShowVar("#durs",#durs)
for i = 1 , #durs do
ShowVar("dur"..i , durs[i])
end -- for
I expected 'durs' to be a string = "Half", but when I treated it as a string I got an error stating that it was a table. So I included the ShowVar() calls, with following result:
What did I do wrong?