[JW Lua] Wrong results with FCNote:CalcRightsidePlacement

Jan Angermüller jan at angermueller.com
Sat Aug 12 16:47:48 CEST 2017


Jari,

FCNote:CalcRightsidePlacement() sometimes returns incorrect results.
I have attached two identical looking first measures with one note on 
the left and on the right side, so I would expect a false and a true 
result when calling CalcRightsidePlacement().

But it doesn't:
the "OK" document return false / true while the "Error" document returns 
false / false.
The note flags look identical to me. (or did I overlook anything?)
The "OK" document was derived directly from the default document, the 
"Error" document is an excerpt from an orchestra score.

I don't see a workaround for this at the moment.
If I had direct access to the downstem 2nd and the upstem 2nd flag, I 
could write something.
But currently these flags are not available for reading/writing.

Code snippet:
local musicregion=finale.FCMusicRegion()
musicregion:SetFullDocument()
for entry in eachentry(musicregion) do
     for note in each(entry) do
         print(note:CalcRightsidePlacement())
     end
end

Running [Unnamed Script] ======> --OK document
false
true
<======= [Unnamed Script] succeeded (Processing time: 0.005 s).

Running [Unnamed Script] ======> --Error Document
false
false   --!!wrong!!
<======= [Unnamed Script] succeeded (Processing time: 0.005 s).

For file size reasons I have attached the files in Fin2012 format. They 
were originally Fin2014.5 files.

Best,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20170812/e118ea57/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calcrightside ok.mus
Type: application/octet-stream
Size: 34218 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20170812/e118ea57/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calcrightside error.mus
Type: application/octet-stream
Size: 34351 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20170812/e118ea57/attachment-0003.obj>


More information about the JWLua mailing list