Bug or wrong documentation at nwcItem:HasDuration()
The documentation says:
But the following tool,
local f = nwcut.loadFile()
for i = 1, #f.Staff do
for j = 1, #f.Staff[i].Items do
local item = f.Staff[i].Items[j]
nwcut.warn(i ..'/'..j ..' --> '..(item:HasDuration() and 'true' or 'false')..'\n')
end
end
nwcut.status = nwcut.const.rc_Report
when called on a new staff with two grace notes, outputs
1/1 --> true
1/2 --> true
I'll use
item:HasDuration() and not item.Opts.Dur.Grace
instead - I think this is what the documentation means ...
H.M.