[JW Lua] Some staff system metrics

Charles O. Lawrence charlesolawrence at bellsouth.net
Sat Oct 24 04:46:55 CEST 2015


Thanks Jari,

The CellMetrics was the only way I have found to determine the height of the
individual staves in a system, particularly the top most staff.  I have been
looking at so many properties and methods that I'm blue in the face, as they
say.  I'm not sure how StaffHeight and Resize would get this info.

Charles



-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Friday, October 23, 2015 7:35 PM
To: The JW Lua script plug-in. <jwlua at jwmusic.nu>
Subject: Re: [JW Lua] Some staff system metrics

Charles,

The FCCellMetrics class has the top and bottom staff line positions in page
coordinates. However, it might be more efficient for your purpose to use the
StaffHeight and Resize properties in FCStaffSystem, if it's a standard
5-line staff.


Best regards,

Jari Williamsson


On 2015-10-24 01:10, Charles O. Lawrence wrote:
> Jari,
>
> Thanks for the information, but I am still not getting what I need.  I 
> never saw before the correlation between a StaffSystem and a 
> SystemStaff (somewhat confusing since the words are in the opposite 
> order in the names).  Am I correct in thinking that a given 
> StaffSystem contains SystemStaff(s)?  That nesting seems to me to be 
> what I am seeing.  But staffSystem:CalcStaveSpan() reports the same as 
> systemStaff.Distance, which appears to be the distance in EVPUs 
> between the top line of the top staff in a system to the top line of 
> the bottom staff in the same system.  What I really need is the distance
between the top line of the top staff and the bottom line of the same staff.
> Is there such a parameter available or can it be calculated?  That is 
> why I asked about the line spacing in a staff.  You did not address 
> that in your response.  If I had such a distance, I could calculate 
> the exact span of the white space between the staves in a system.
>
> I would also like to have the height and width of the bounding box of 
> a text expression, but I think before you have said that it is not 
> directly available from the PDK.  Any progress on MM providing it?  At 
> present I just have to empirically determine it based on the font/size 
> chosen for the expression and the available length of a string.
>
> Any help is greatly appreciated.
>
> Thanks again for JW Lua and all that you do, Charles
>
>
>
> -----Original Message-----
> From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari
Williamsson
> Sent: Friday, October 23, 2015 5:42 PM
> To: The JW Lua script plug-in. <jwlua at jwmusic.nu>
> Subject: Re: [JW Lua] Some staff system metrics
>
> Charles,
>
> Use the FCSystemStaves collection class for each system, which contains
the
> available staves (and their distances) for a specific system. If you
already
> have a FCStaffSystem object, you can use
> FCStaffSystem:CreateSystemStaves() to automatically load/create the
> FCSystemStaves collection.
>
> The Distance property in FCSystemStaff is what you're looking for.
>
>
> Best regards,
>
> Jari Williamsson
>
>
> On 2015-10-23 14:09, Charles O. Lawrence wrote:
>> Jari and JW Lua fans;
>>
>> Does anyone know the metrics on how to calculate the distance between
>> the bottom line of one staff and the top line of the next staff below
>> it, all within a system, not between systems?  Also, is the metric for
>> set/get the line spacing available, i.e. what you can do from the
>> "Staff Setup" dialog box, "Score Manager->Staff->Other."?  I really
>> need these metrics to be able to get the height of a given staff, and
>> to center an expression between two staves in a system.  I am struggling
> with this.
>> Any help will be greatly appreciated.  Maybe there is a way that I am
>> overlooking.
>>
>> Thanks,
>>
>> Charles
>>
>> UPDATE, I have found FCStaffSystems:CalcStaveSpan(), but need to be
>> able to calculate a given staff height, something like
>> (4*linespacing), for normal 5 line staff.
>>
>>
>>
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>



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





More information about the JWLua mailing list