[JW Lua] createAccidentalMods method does not exist
Robert Wildling
robertwildling at gmail.com
Mon May 30 22:41:07 CEST 2016
Hi, Pat, hi, Jan,
thanks so much for your tips!
This is what I have put together within the last days. It is close to what
you suggest, but the accMods:LoadAll() won't recognize any accidentals. Any
ideas? It shouldn't matter that I use FCNoteEntryLayer, right?
(My intention is to check for backwards-tied, altered notes on each system
breaks and add courtesy accidentals to them. That part works fine and is
not listed here. Afterwards I would like to get the positions of those
accidentals to check somehow, if there is additional space necessary at the
beginning of the measure. This part is shown below, at least what exists so
far. The test entry has 3 grace notes, each with accidentals.)
function firstEntryOfMeasureIsAPitchClassSet()
-- Test: first layer (=0), 9th instr (Hrn 1), measure 5-5
local entrylayer = finale.FCNoteEntryLayer(0, 9, 5, 5)
entrylayer:Load()
-- Get first entry (because that's all we need)
local entry = entrylayer:GetItemAt(0)
print(entry:ClassName()) -- returns FCNoteEntry
if (entry:IsNote()) then
checkAccidentals(entry)
end
end --// end function firstEntryOfMeasureIsAPitchClassSet
function checkAccidentals(noteEntry)
print("noteEntry.ClassName =", noteEntry:ClassName()) -- yields
FCNoteEntry
print("noteEntry.Count =", noteEntry.Count) -- yields 3
-- check, if there are accidentals
for note in each (noteEntry) do
print(note:CalcAccidental(), "|", note:CalcAccidental() ) --
returns true | true
end
local accMods = finale.FCAccidentalMods(noteEntry)
accMods:LoadAll()
print("accMods.Count:", accMods.Count) -- yields 0
end
firstEntryOfMeasureIsAPitchClassSet()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160530/d85d948f/attachment.htm>
More information about the JWLua
mailing list