[JW Lua] Hairpin vertical adjustment...
Simon Leclerc
simon at prodsl.ca
Wed Jul 6 21:18:15 CEST 2016
Hi to all,
REALLY new to all this. I can totally appreciate all the efforts put on this programming venture. Bravo Jari :)
My question will probably sound quite naive to most of you, but here we go:
I want to modify the left side (vertically) of a hairpin. I managed pretty well with the vertical adjustments of text expressions and slurs, but it seems extremely different for hairpins.
In the example below, if you run it, you'll see that I can get a "read-out" of the actual left point of an existing hairpin. I just don't know how to modify that parameter. I also thought there was probably a parameter for adjusting the main handle position of a hairpin, but never found it.
You'll see that I "commented" the line where it states the way I thought it should be done. But with this line "enabled", I get a correct read-out in the Execution output window but nothing changes on the page of music. I believe it has to do with the way I save the object "smartshape".
Any help would be greatly appreciated. Thanks to all.
local region = finenv.Region()
local marks = finale.FCSmartShapeMeasureMarks()
marks:LoadAllForRegion(region)
for mark in each(marks) do
local leftpoint=finale.FCPoint(1, 1)
local smartshape = mark:CreateSmartShape()
if (smartshape:GetShapeType() == finale.SMARTSHAPE_CRESCENDO)
or (smartshape:GetShapeType() == finale.SMARTSHAPE_DIMINUENDO) then
smartshape: SetMakeHorizontal (true)
smartshape:CalcLeftCellMetricPos(leftpoint)
--leftpoint:SetX(675)
smartshape:Save()
print("Left:",leftpoint.X)
end
end
Simon Leclerc
60, Mirabelle
Ste-Agathe-des-Monts, Québec
J8C 0W9
simon at prodsl.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160706/40839bd8/attachment.htm>
More information about the JWLua
mailing list