When I enter articulations e.g. the breath sign or even a staccato, it would be absolutely helpful if I could not only move the position of the sign but dragging it with the mouse but entering numeric values. An example: I need to enter a breath sign in layer 1 and layer 2 and they should match horizontally within the bar.
Official comment
Hi All:
Yes, a property pane with an apply button would be swell. FIN-4311 is the ticket. Happy to see Jari's plug-in mentioned in the meantime.
Cheers,
Michael Johnson
VP, Professional Notation
MakeMusic
Hello Rapahel,
the JWLua script below features an Articulation Inspector Window where you can edit all positioning values to your needs. Select the region, launch the script and edit the horizontal/vertical values in the displayed table.
Schöne Weihnachten/Merry Christmas,
Harald
P.S.: MM, this forum lacks basic abilities to post scripts. Formatting is gone, files can't be uploaded. Ain't really fun.
function plugindef()
finaleplugin.RequireSelection = true
finaleplugin.MinFinaleVersion = "2010"
finaleplugin.Author = "Harald Schollmeyer"
finaleplugin.Version = "1.0"
finaleplugin.Date = "23.12.2016"
finaleplugin.AuthorEmail = "hschollm@gmx.net"
finaleplugin.CategoryTags = "Articulation"
return "Articulation Inspector", "Articulation Inspector", "Edit articulation positions in a table"
end
local str = finale.FCString()
-- Dialog Window
str.LuaString = "Articulation Inspector"
local dialog = finale.FCCustomLuaWindow()
dialog:SetTitle(str)
dialog:SetClientWidth(180)
-- Static Info Line
local static1 = dialog:CreateStatic(0,0)
static1:SetHeight(20)
static1:SetWidth(160)
-- Edit Field Descriptions
local static2 = dialog:CreateStatic(100,30)
static2:SetHeight(30)
static2:SetWidth(90)
str.LuaString = [[Enter new Vertical
and Horizontal values:]]
static2:SetText(str)
-- Edit Fields
local e1 = dialog:CreateEdit(105, 55)
local e2 = dialog:CreateEdit(130, 55)
e1:SetWidth(20)
e2:SetWidth(20)
-- Data List for Articulation Position Data
local datalist = dialog:CreateDataList(0, 30)
datalist:SetWidth(95)
str.LuaString = "Art.ID"
datalist:AddColumn(str, 30)
str.LuaString = "Vert."
datalist:AddColumn(str, 30)
str.LuaString = "Horiz."
datalist:AddColumn(str, 30)
-- Fill the datalist
local CountArticulations = 0
for noteentry in eachentry(finenv.Region()) do
local articulations = noteentry:CreateArticulations()
for a in each(articulations) do
local row = datalist:CreateRow()
row:GetItemAt(0).LuaString = a.ID
row:GetItemAt(1).LuaString = a.VerticalPos
row:GetItemAt(2).LuaString = a.HorizontalPos
CountArticulations = CountArticulations + 1
end
end
-- fill the static info line
str:SetInteger(CountArticulations)
str:AppendLuaString(" articulation(s) found in the selected region")
static1:SetText(str)
local OldLine = -1
-- callback function when datalist gets selected
local function handler( datalistctrl , lineindex )
local s = finale.FCString()
if (OldLine > (-1)) then
local datalistrow = datalistctrl:GetItemAt(OldLine)
s = e1:GetInteger()
datalistrow:GetItemAt(1).LuaString = s
s = e2:GetInteger()
datalistrow:GetItemAt(2).LuaString = s
end
-- After each click, the datalist gets unselected and the handler
-- gets called with lineindex = -1. So we have to check for that (bug?):
if (lineindex > (-1)) then
local datalistrow = datalistctrl:GetItemAt(lineindex)
s = datalistrow:GetItemAt(1)
e1:SetText(s)
s = datalistrow:GetItemAt(2)
e2:SetText(s)
OldLine = lineindex
end
end
dialog:RegisterHandleDataListSelect (handler)
-- OK/Cancel buttons
dialog:CreateOkButton()
dialog:CreateCancelButton()
-- Execute the dialog and, if OK, rewrite the datalist to all articulations
if dialog:ExecuteModal(nil) == 1 then
local n=0
for noteentry in eachentry(finenv.Region()) do
local articulations = noteentry:CreateArticulations()
for a in each(articulations) do
local row = datalist:GetItemAt(n)
a.VerticalPos = row:GetItemAt(1).LuaString
a.HorizontalPos = row:GetItemAt(2).LuaString
n = n+1
end
articulations:SaveAll()
end
end
Please sign in to leave a comment.
5 comments
Date Votes