[JW Lua] Help Adding Articulation
Bryan Higgins
bryan at motet.com
Sat Sep 29 18:33:40 CEST 2018
Thanks. Unfortunately, that didn't help. I'm not even sure I'm attaching
the articulation in the right way. I'm amazed you've been able to do
your elaborate plug-ins with such a lack of information.
On 2018-09-29 00:16, Jan Angermüller wrote:
> Instead of fermata:Save() use fermata:SaveNew().
> All new objects must be saved as SaveNew() in JW Lua.
>
> Am 29.09.2018 um 02:42 schrieb Bryan Higgins:
>
>> function plugindef()
>> -- This function and the 'finaleplugin' namespace
>> -- are both reserved for the plug-in definition.
>> return "Fermatas", "", ""
>> end
>> local fermatadef = finale.FCArticulationDef()
>> local metatools = finale.FCMetatoolAssignments()
>> metatools:SetMode(2)
>> metatools:LoadAll()
>> for metatool in each(metatools) do
>> if metatool.Keystroke == 70 then
>> fermatadef:Load(metatool:GetDefID())
>> break
>> end
>> end
>>
>> for m, s in eachcell(finenv.Region()) do
>> local cell = finale.FCCell(m, s)
>> notecell = finale.FCNoteEntryCell(m, s)
>> notecell:Load()
>> if notecell:IsEmpty() then
>> entry = notecell:AppendEntriesInLayer(1, 1)
>> if entry then
>> entry.Duration = finale.WHOLE_NOTE
>> entry.Legality = true
>> entry:MakeRest()
>> local fermata = finale.FCArticulation()
>> fermata:SetArticulationDef(fermatadef)
>> fermata:SetNoteEntry(entry)
>> fermata:Save()
>> notecell:Save()
>> end
>> end
>> end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180929/e21fbe75/attachment.htm>
More information about the JWLua
mailing list