[JW Lua] Beat Chart anomaly
Mr.Pat
Mr.Pat at pdreditions.com
Tue Jun 28 05:58:53 CEST 2016
Hi All,
I've just about completed a couple of scripts that convert a single vocal
part into a mensural notation equivalent. One script combines all the
measures in a system into a single measure. The second script spaces the
notes with a really convoluted algorithm; rests get less space than notes
which are equally spaced unless they are part of a ligature in which case
they are butted up against one another. See the sample jpg. The problem I'm
having is in calculating the measure width in EPVUs.
Try this: In any measure in one of your parts, bring up the beat chart for
any note. The total width will be some number in EPVUs according the the
documentation. Now move any of the notes using the handles in the measure
tool. Now bring up the beat chart and look at the total width, again in
EPVUs supposedly. The measure width hasn't changed, but the value has. If I
use the former value in my script, the notes are scrunched together (see the
third line of the attached jpg). If I use the latter value, my script works
as intended. Here's what I use to get the width:
local bce = measure:CreateBeatChartElements()
local bc = finale.FCBeatChartElement()
bc = bce:GetItemAt(0)
width = bc.FullSpan
The width returned from bc.FullSpan matches the two values I get with the
beat chart test above.
Any ideas of what is happening?
My scripts work but I don't want to have to manually move a note in every
system to make it work.
Thanks for any insight.
Pat
I plan on posting my scripts soon. As of now they are 15 pages of code. As I
said, it's a weird algorithm.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160627/f6d0c689/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ligature test.jpg
Type: image/jpeg
Size: 118875 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160627/f6d0c689/attachment.jpg>
More information about the JWLua
mailing list