<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
We should think about a fix:<br>
I have just noticed that RGP Lua in Finale 25 returns -125 and only
in Finale 26/27 returns -3.<br>
JW Lua returns -125 in all Finale versions.<br>
<br>
Jan<br>
<br>
<br>
<div class="moz-cite-prefix">Am 19.08.2022 um 12:00 schrieb Jan
Angermüller:<br>
</div>
<blockquote type="cite"
cite="mid:411f659e-3e83-5cc6-0f3d-7a79226a0bb4@angermueller.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hi Robert et al.,<br>
<br>
I noticed an undocumented difference in RGP Lua/JW Lua.<br>
<br>
FCStemMod.HorizontalUpOffset returns wrong values in JW Lua
(signed byte problem) and RGP Lua returns the correct values.<br>
It might have be fixed automaticaly because of a fix in the Fin26+
PDK. <br>
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.<br>
<br>
Test script which works with the attached file:<br>
<br>
if finenv.IsRGPLua then require('mobdebug').start() end<br>
local region=finale.FCMusicRegion()<br>
region:SetFullDocument()<br>
for entry in eachentry(region) do<br>
if entry and entry.StemDetailFlag then<br>
local stemmod=finale.FCStemMod()<br>
stemmod:SetNoteEntry(entry)<br>
if stemmod:LoadFirst() then<br>
print(stemmod.HorizontalUpOffset) --probably the
same with HorizontalDownOffset<br>
end<br>
end<br>
end<br>
<br>
In Finale 27 JW Lua returns: -125<br>
In Finale 27 RGP Lua returns: -3 (which is correct)<br>
<br>
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.<br>
<br>
function jalib_CorrectStemOffsetForJWLua(offset)<br>
if not finenv.IsRGPLua then<br>
if offset<0 then<br>
offset=-offset-128<br>
elseif offset>128 then<br>
offset=-(256-offset)<br>
end<br>
end<br>
return offset<br>
end<br>
<br>
I don't know if it makes sense to correct this in RGP Lua - maybe
for compatibility reasons? <br>
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.<br>
<br>
Jan<br>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a class="moz-txt-link-abbreviated" href="http://www.elbsound.studio">www.elbsound.studio</a></pre>
</body>
</html>