[JW Lua] Spacings within a measure
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Tue Aug 12 09:43:06 CEST 2014
Chris,
If you're going to center a single note, all you would basically need is
the FCMeasure:Width, since the note positioning is at 0 and the note
uses the same coordinate system as the measure.
However, that would get the note a bit too far to the right, since the
note positioning is left-aligned. To get it truly optically centered,
you should look the note width and use FCCellMetrics.HorizontalStretch
to get a good notehead adjustment within measure coordinates.
This code could also give a good starting point:
---
local m = finale.FCMeasure()
m:Load(1)
if m.SpaceBefore == 0 then
m.SpaceBefore = m.Width / 2
m:Save()
end
---
Best regards,
Jari Williamsson
On 2014-08-12 07:17, Chris wrote:
> Jari
>
> I understood it (and I wanted included in my calculations)
> but the question was whether the parameters follow well like that.
>
> I would center whole note inside a measure, and I think I need all these
> parameters, but maybe there is another way.
>
> Thanks
>
> Chris
>
> (Sorry for my english)
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
More information about the JWLua
mailing list