<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Jari,<br>
<br>
in version 0.53 you changed the handling of pitch reading <br>
("Fixed a bug where FCNote::GetString() and FCNote::CalcOctave()
returned wrong values on very low notes.").<br>
It somehow must have introduced a new error, because other pitches
that worked fine before now return the wrong value.<br>
Attached is a very simple score, no transposition, no key sigs and
the script below now messes up the octave.<br>
<br>
for e in eachentry(finenv.Region()) do<br>
local str=finale.FCString()<br>
if not e:IsRest() then<br>
e:GetItemAt(0):GetString(str,nil)<br>
print(str.LuaString)<br>
end<br>
end<br>
<br>
Correct result until v0.52<br>
Running [Unnamed Script] ======><br>
C4<br>
<======= [Unnamed Script] succeeded (Processing time: 0.001 s).<br>
<br>
Incorrect result in v.0.53 and 0.54<br>
Running [Unnamed Script] ======><br>
C0<br>
<======= [Unnamed Script] succeeded (Processing time: 0.000 s).<br>
<br>
It seems to be related to the second parameter of GetString which is
nil in the example code above.<br>
Your function description says:<br>
<b>pKey: If this is NULL, the key signature from the current entry's
position will be used.<br>
</b>This used to work fine until 0.52. Seems like "nil" isn't
supported anymore in 0.53.<br>
<br>
If I add the key parameter and update the script as below, it seems
to work - <br>
though I have only tested a few measures and can't say that it
always works like this.<br>
<br>
for e in eachentry(finenv.Region()) do<br>
local str=finale.FCString()<br>
if not e:IsRest() then<br>
local measure=finale.FCMeasure()<br>
measure:Load(e.Measure)<br>
local key=measure:GetKeySignature()<br>
e:GetItemAt(0):GetString(str,key)<br>
print(str.LuaString)<br>
end<br>
end<b><br>
</b><br>
Maybe it's only the function description that is not valid anymore?<br>
I don't know. At least the first script above worked fine until
v0.52.<br>
<br>
Best,<br>
Jan<b><br>
<br>
</b>
</body>
</html>