[JW Lua] Slur metrics returns wrong values (from time to time)
Jan Angermüller
jan at angermueller.com
Tue Nov 15 20:10:39 CET 2016
Jari,
from time to time I get wrong results when calculating the metrics of
slur endpoints.
For example in this case:
The bottom of the last note is exactly *12 *EVPU vertically away from
the slur endpoint y (i.e. half a staff line distance) - as it is set in
the Slur Placements Prefs.
But when I calculate the bottom of the note I get (for example) 2602
EVPU and the slur endpoint equals 2583 EVPU, resulting in a difference
of *19 *EVPU.
When I calculate the BottomStaffLinePos I get 2588 EVPU (which is
correct compared to the bottom of the note, but not compared to the slur).
So although the slur visually ends in the middle of the staff line, it
returns a value of 5 EVPU below the staffline.
A workaround would be a "consistency check":
check what sort of "Slur Placement" is used and estimate where the slur
should end according to the "Slur Placement" settings.
If this is different, then use the estimated value instead of what JW
Lua returns.
The only problem is that the Slur Placement settings are not implemented
at the moment and there is also no method that tells me which "Slur
Placement" type is used, so they would need to be hard-coded).
In my tests the slur metrics deviated by up to 8 EVPU from what I
measured with other metrics (like notes or staff lines).
I tested many different scores.
Any idea ?
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20161115/365c7a08/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apiikpdhfjiipdki.jpg
Type: image/jpeg
Size: 13544 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20161115/365c7a08/attachment.jpg>
More information about the JWLua
mailing list