[JW Lua] Different results in RGP Lua/JW Lua with FCStemMod.HorizontalUpOffset, more
Jan Angermüller
jan at angermueller.com
Fri Aug 19 12:06:16 CEST 2022
We should think about a fix:
I have just noticed that RGP Lua in Finale 25 returns -125 and only in
Finale 26/27 returns -3.
JW Lua returns -125 in all Finale versions.
Jan
Am 19.08.2022 um 12:00 schrieb Jan Angermüller:
> Hi Robert et al.,
>
> I noticed an undocumented difference in RGP Lua/JW Lua.
>
> FCStemMod.HorizontalUpOffset returns wrong values in JW Lua (signed
> byte problem) and RGP Lua returns the correct values.
> It might have be fixed automaticaly because of a fix in the Fin26+ PDK.
> We (Robert and I) had talked about FCStemMod issues some time ago and
> I wrote that I assume that there must have been some changes as
> another FCStemMod problem didn't occur anymore in Fin64bit either.
>
> Test script which works with the attached file:
>
> if finenv.IsRGPLua then require('mobdebug').start() end
> local region=finale.FCMusicRegion()
> region:SetFullDocument()
> for entry in eachentry(region) do
> if entry and entry.StemDetailFlag then
> local stemmod=finale.FCStemMod()
> stemmod:SetNoteEntry(entry)
> if stemmod:LoadFirst() then
> print(stemmod.HorizontalUpOffset) --probably the same
> with HorizontalDownOffset
> end
> end
> end
>
> In Finale 27 JW Lua returns: -125
> In Finale 27 RGP Lua returns: -3 (which is correct)
>
> In JW Lua I used this correction function, but it took quite some
> time to find out, it wasn't necessary in RGP Lua anymore.
>
> function jalib_CorrectStemOffsetForJWLua(offset)
> if not finenv.IsRGPLua then
> if offset<0 then
> offset=-offset-128
> elseif offset>128 then
> offset=-(256-offset)
> end
> end
> return offset
> end
>
> I don't know if it makes sense to correct this in RGP Lua - maybe for
> compatibility reasons?
> But as it is already like it and it actually fixes something, I think
> we should keep it and know that this leads to problems only in JW Lua.
>
> Jan
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
www.elbsound.studio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20220819/9822f8a3/attachment.htm>
More information about the JWLua
mailing list