[JW Lua] Hairpins
Martin Marris
mmarris at notecraft.com
Thu Dec 24 17:24:35 CET 2020
>>However, for files created before Fin14 the 80 EDU fudge factor makes sense.<<
The files were created in Finale 98. Mind you, I’ve been using Finale since 1.1 so these files are spring chickens!
>>If you really want to be complete, you could also check for hairpins that span systems and adjust their left continuation points as well.<<
Really not an issue at all for this project, but in most projects, it would be. If it becomes an issue later I will do as you suggest.
>>Another check I would consider for a general solution is only to do this if there is actually a group barline. But that may be overkill for your purposes.<<
It would be relatively easy to implement, I think. However the exploded scores have a minimum of 18 staves an only two of those do not have a group barline below the staff. It’s band stuff and all the WW is grouped, then all of the Brass, then all of the Percussion. Some of the scores have 50+ staves and those are duets or trios (top staves Flute 1, Flute 2, Flute 3 and then Oboe 1, …. etc.). In those cases there is a group for each of the instruments stands. It kinda makes sense that the hairpins should be the same length for all of them, even if the bottom staff of that group does not have a barline under it….. (I hope this makes sense, my head hurts just trying to explain it.)
Basically we are talking industrial-scale part explosion of many hundred conductor scores, and consistency between all the instruments makes a lot of sense, without worrying about the subtleties.
Automation is about the only way to preserve sanity in a project like this. Otherwise we would be at it until Doomsday.
Martin
From: JWLua <jwlua-bounces at jwmusic.nu> On Behalf Of Robert Patterson
Sent: Thursday, December 24, 2020 16:02
To: The JW Lua script plug-in. <jwlua at jwmusic.nu>
Subject: Re: [JW Lua] Hairpins
For Fin14 or higher, I would only modify hairpins where hairpinMeasurePos = measureDuration. However, for files created before Fin14 the 80 EDU fudge factor makes sense.
If you really want to be complete, you could also check for hairpins that span systems and adjust their left continuation points as well. (The "left continuation point" is actually the right side of the left/first chunk of a system-spanning smart shape. I haven't researched the nomenclature for this in the PDK Framework, however. It may be different)
Another check I would consider for a general solution is only to do this if there is actually a group barline. But that may be overkill for your purposes.
On Thu, Dec 24, 2020 at 9:13 AM Martin Marris <mmarris at notecraft.com <mailto:mmarris at notecraft.com> > wrote:
So here is the slightly more sophisticated version, which only adjusts hairpin end-points if they come close to a barline. I think I am mixing a lot of apples with a lot of oranges, but it seems to work. The numbers are pretty arbitrary and would not work except in this tightly controlled project where I already know what the scores generally look like. So that’s it for now (crossing fingers!).
musicregion = finale.FCMusicRegion()
musicregion:SetFullDocument()
local marks = finale.FCSmartShapeMeasureMarks()
marks:LoadAllForRegion(musicregion, true)
for mark in each(marks) do
local smartshape = mark:CreateSmartShape()
if smartshape:IsHairpin() then
local segment = smartshape:GetTerminateSegmentRight()
measureID = segment.Measure
measure = finale.FCMeasure()
measure:Load(measureID)
measureDuration = measure:GetDuration()
hairpinMeasurePos = segment.MeasurePos
if measureDuration - hairpinMeasurePos < 80 then --test for hairpin ending close to barline
segment.EndpointOffsetX = segment.EndpointOffsetX - 30 --pull it back a bit
smartshape:Save()
end
end
end
Martin
_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu <mailto:JWLua at jwmusic.nu>
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20201224/3c79d6a4/attachment.htm>
More information about the JWLua
mailing list