[JW Lua] Weird accidental behaviour

Jan Angermüller jan at angermueller.com
Wed Jul 8 18:49:49 CEST 2020


It doesn't work with the Finale test file from the first email (I have 
attached it again).
That one was created with Finale 2002a and probably is not compatible 
with current Finale versions.
See my two screenshot videos with these weird behaviours in the first email.

1.) This file returns false with LoadAt.
2.) But it actually seems to have a hidden value -54 EVPU (which can be 
seen in the Youtube videos)
3.) Through manual movement I can reproduce this -54 EVPU value.
4.) The anchor point of the accidental suddenly jumps when I click it -> 
see video. It seems that the hidden FCAccidentalMod used in this 
document had a different alignment option which is not available in 
Finale anymore and causes this weird behaviour  (as you said and as I 
guessed it probably has to do with a deprecated Finale option which is 
not correctly imported into Finale 2014)
5.) But I cannot get this value automatically: i.e. when I load the 
accidtest.musx document and run the script immediately, it will always 
return 0 EVPU and not -54 EVPU. So the FCAccidentalMod seems to be 
somehow hidden.
-> That's what my question is about.

As I said my Perfect Layout accidental placement script normally works. 
This is the first document where the automatic FCAccidentalMod reading 
doesn't work. The code snippet that I posted is just for testing 
purposes. The Perfect Layout script is much more complex, but it's not 
relevant here.

What I want is:
- Read the current horizontal position of the accidental (usually 0 EVPU 
as there is usually no FCAccidentalMod, if there is an FCAccidentalMod 
read this value). He
- Change the current position by adding a small value (e.g. 10 EVPU)
- Accidtest returns the wrong horizontal position by default

If I add a value to this accidtest.musx document, it moves the 
accidental to the wrong position.
Because 0 EVPU (which usually is the position before the notehead) is in 
this case the wrong reference position.
When I save an accidental mod with HorizontalPos=1 EVPU to this 
accidtest, it moves the accidental by 55 EVPU and not by 1 EVPU.

Jan






Am 08.07.2020 um 18:33 schrieb Robert Patterson:
> With your script, running on your file, FCAccidentalMod:LoadAt returns 
> true if there is an acci mod and false if there isn't one. What's the 
> issue?
>
> If the question is, "where did that -54 come from?", the answer is 
> Finale calculated it and put it there. I wouldn't worry about where it 
> came from. Instead, I would set the value you want and save it. Don't 
> forget to set the note detail flag on FCNoteEntry.
>
> If you are not seeing the results you think you should see after 
> running your script, use my plugin to compare the changes made by your 
> script to those identical changes done manually. That will show you 
> what your script is lacking.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20200708/df991ba8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: accidtest.musx
Type: application/octet-stream
Size: 40501 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20200708/df991ba8/attachment-0001.obj>


More information about the JWLua mailing list