[JW Lua] Adding a slur

Jan Angermüller jan at angermueller.com
Mon Oct 29 13:40:07 CET 2018


 >2. smartshape:SaveNewEverything( NULL, NULL ) saves the smartshape as 
well as smartshape:SaveNewEverything( >StartEntry,EndEntry ) although 
according to the documentation, only the second version would be correct

I have already seen some Finale documents that only had a valid 
StartEntry value and a nil value as EndEntry. But I don't know if this 
was valid or if those were all corrupt documents. At least you can't 
rely on that a slur smart shape will return valid start and end entries. 
I'd second that the second version is correct for slur smartshapes.

Also note that this only valid for note-attached smartshapes, for 
measure-attached smartshapes (hairpins) the documentation says: 
"pFirstEntry and pLastEntry should be NULL."



 >3. the FCSmartShape:SaveNewEverything documentation says: "For 
note-attached smart shapes, the frame collection that >contains the 
entries need to be saved after the successful return from this method.". 
How do I save a frame collection?
Frames are the collection of note entries in a measure. E.g. ctrl-click 
a measure while Speedy Entry is selected, then the "Edit Frame" dialog 
opens in Finale. To save a frame:

for e in eachentrysaved( .... )

or

for e in each( noteentrycell )
...
end
noteentrycell :Save()

So the best idea is to start the creation of the smartshape within such 
a for-loop on note entries.
I assume that this will also set the slur flags for the note entry.
Note: You might need a nested loop if the slur spans two measures to be 
able to save both the start and end frame.
FCNoteEntry.SmartShapeFlag is (or should be) true when the entry has a 
slur. BTW, the Edit Frame doesn't have a "SmartShape" attribute, but 
only a "Slur" attribute. I think JW Lua's SmartShapeFlag actually means 
this slur attribute.

Jan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20181029/ee419b49/attachment.htm>


More information about the JWLua mailing list