[JW Lua] Attaching a new entry-based custom smart line to a score
Chris
marcel.denio at gmail.com
Tue Jun 28 20:57:13 CEST 2016
Jan
Here is an example that works with 2 half-notes in the first measure.
There are 2 important things :
- LineID : that is the index of the smartline (it's possible to have
any line for glissando- but how do you know which one is right)
- NoteID : that is the position of the note in the chord
-----------------------------------------
local function createSmartShape(staff,measure,leftnoteentry,rightnoteentry)
local smartshape = finale.FCSmartShape()
smartshape.ShapeType = finale.SMARTSHAPE_GLISSANDO
smartshape.EntryBased = true
smartshape.MakeHorizontal = false
smartshape.BeatAttached= false
smartshape.PresetShape = true
smartshape.Visible = true
smartshape.LineID= 1
local leftseg = smartshape:GetTerminateSegmentLeft()
leftseg:SetMeasure(measure)
leftseg.Staff = staff
leftseg:SetEntry(leftnoteentry)
leftseg.NoteID = 1
local rightseg = smartshape:GetTerminateSegmentRight()
rightseg:SetMeasure(measure)
rightseg.Staff = staff
rightseg:SetEntry(rightnoteentry)
rightseg.NoteID = 1
smartshape:SaveNewEverything(NULL,NULL)
end
local noteentrycell = finale.FCNoteEntryCell(1, 1)
noteentrycell:Load()
local leftnoteentry = noteentrycell:FindEntryStartPosition(0,1)
local rightnoteentry = noteentrycell:FindEntryStartPosition(2048,1)
createSmartShape(1,1,leftnoteentry,rightnoteentry)
-----------------------------------------
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160628/4c9160cb/attachment.htm>
More information about the JWLua
mailing list