[JW Lua] FCBeatChartElement(s) - Problems with v0.66
Jan Angermüller
jan at angermueller.com
Mon Mar 13 11:54:05 CET 2023
Robert,
in my further tests with v0.66 and Perfect Layout I noticed that the
*FCBeatChartElement *functionality has changed significantly.
My "insert space" function doesn't work anymore ... while it used to add
more space, it now reduces the space in some cases.
Attached is a test document and a code snippet.
However, the problem occurs in all sorts of documents.
The code simply prints the FCBeatChartElement properties from measure 4.
It seems that there is a problem with the MinimumPosition on
FCBeatChartElement 0.
function plugindef()
finaleplugin.LoadLuaSocket=true
return "Test","Test","Test"
end
pluginname=plugindef()
if finenv.IsRGPLua then require('mobdebug').start() end
local measure=finale.FCMeasure()
measure:Load(4)
local beatcharts= measure:CreateBeatChartElements()
local beatchart2
for beatchart2 in each(beatcharts) do
print("BC2",measure.ItemNo,beatchart2.ItemCmper,beatchart2.ItemInci,beatchart2.MeasurePos,beatchart2.HorizontalPosition,beatchart2.NextHorizontalPosition,beatchart2:CalcWidth(),beatchart2.MinimumPosition)
end
Before RGP Lua v0.66 (here JW Lua 0.54)
BC2 4 4 0 4096 336 0 0*641*
BC2 4 4 1 0 0 84 84 0
BC2 4 4 2 1024 84 116 32 64
BC2 4 4 3 1280 116 148 32 125
BC2 4 4 4 1536 148 200 52 177
BC2 4 4 5 2048 200 336 136 218
RGP Lua v0.66
"BC2" 4 4 0 4096 336 0 0 *0* -- 641 missing!
"BC2" 4 4 1 0 0 84 84 0
"BC2" 4 4 2 1024 84 116 32 64
"BC2" 4 4 3 1280 116 148 32 125
"BC2" 4 4 4 1536 148 200 52 177
"BC2" 4 4 5 2048 200 336 136 218
Any ideas?
Jan
Am 11.02.2023 um 18:01 schrieb Robert Patterson:
> Okay, I will leave it. I am adding some additional properties for clarity.
>
> The main concept that is missing is the concept of transitioning the
> beat chart from automatic to manual. This is a concept I discovered
> after extensive reverse-engineering of Finale behavior. Unfortunately,
> I didn't get the comments into the PDK before Jari withdrew from
> working on it.
>
> You basically cannot edit a beat chart unless you first transition it
> to a manual beat chart. Finale does this when the user manually edits
> it with the beat chart handles. I'm going to add a method on
> FCBeatChartElements to do it programmatically.
>
>
> On Sat, Feb 11, 2023 at 10:53 AM Jan Angermüller
> <jan at angermueller.com> wrote:
>
> Robert,
>
> I use both classes a lot in Perfect Layout.
> Though it still sometimes seems like a puzzle (or incomplete?) to
> me too.
> Adding more properties would be fine, but changing/splitting the
> whole thing would have massive impact on the spacing algorithms
> from Perfect Layout.
>
> If it really makes sense to you to change it, maybe you could keep
> FCBeatChartElement(s) and add an alternative implementation with a
> new name, so that the old one still can be used. Not so nice, but
> very pragmatic ;-)
>
> Jan
>
> Am 11.02.2023 um 16:46 schrieb Robert Patterson:
>> Hello,
>>
>> Does anyone use FCBeatChartElement or FCBeatChartElements? It
>> appears to be incomplete to me, and I would also like to split
>> the header out into its own class. This would be a breaking
>> change, so I am not sure I'll do it. But I thought I would poll
>> the group.
>>
>> Robert
>>
>>
>> _______________________________________________
>> JWLua mailing list
>> 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/20230313/fcbf808a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcbeatchart test.mus
Type: application/octet-stream
Size: 89330 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20230313/fcbf808a/attachment.obj>
More information about the JWLua
mailing list