[JW Lua] Page-relative Units

M. R. Miller mike at mrmiller.net
Fri Jan 26 00:31:55 CET 2018


Thanks for the quick response, Jan! That works perfectly.

I had ignored it because of the documentation. Not sure if there's a place to file documentation issues, but FCArticulation::CalcMetricPos should be marked as Lua-supported. Metric position also made me think musical position within the measure rather than graphical position, despite the FCPoint* argument. A more clear doc text could maybe be something like:

"Calculate the coordinates of the articulation's handle in page-relative EVPU."

- Mike
________________________________
From: JWLua <jwlua-bounces at jwmusic.nu> on behalf of Jan Angermüller <jan at angermueller.com>
Sent: Thursday, January 25, 2018 3:17 PM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Page-relative Units

CalcMetricPos() is the method which exists for both FCArticulation and FCExpression.
In FCSmartShape it's similar: CalcLeft/RightCellMetricPos for measure-attached, CalcLeft/RightEntryMetricPos for note-attached smart shapes.

Jan

Am 25.01.2018 um 20:53 schrieb M. R. Miller:
Hey all,

Is there a good way to get an articulation's position relative to the page? I see FCArticulation::GetVerticalPos but this appears to be an offset relative to different anchors based on the articulation definition's AutoPosSide.

Same question for FCExpression which has a different alignment scheme but similarly only gives offsets. And I can't seem to find any positioning info about smart shapes.

For context, I'm writing a Lua script to draw a bounding box that encompasses all the elements in a region. I've got it working with notes and rests using FCEntryMetrics and FCCellMetrics but can't seem to find a convenient way to get the articulation and expression placement in the same page-relative coordinates.

Any suggestions?

Thanks!
- Mike





_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu<mailto:JWLua at jwmusic.nu>
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180125/8bfb29a6/attachment.html>


More information about the JWLua mailing list