[JW Lua] Page-relative Units

Jan Angermüller jan at angermueller.com
Fri Jan 26 07:59:31 CET 2018


To check which functions are really available in JW Lua, look into the 
class browser.
It also holds sample code for many functions.



Jan
https://elbsound.studio/jw-lua-scripts.php

Am 26.01.2018 um 00:31 schrieb M. R. Miller:
> 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/20180126/8db8f8c9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnklbgnefaalkefd.jpg
Type: image/jpeg
Size: 31089 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180126/8db8f8c9/attachment.jpg>


More information about the JWLua mailing list