[JW Lua] Calculating the slur metrics when a slur goes over several staff systems
Jan Angermüller
jan at angermueller.com
Mon Jul 31 10:05:44 CEST 2017
Thank you very much Jari, for the info!
It's really a pity that MM doesn't give out the Finale PDK anymore, so
that we can't help you finding it out.
As a pretty cumbersome, but possible workaround it would be great if you
could supply FCSlurContours and FCSmartShapePlacement. Currently I am
using an estimation of where the slurs are. But if the slur settings
don't use the default values, I have to manually update all these
parameters.
Best,
Jan
Am 27.07.2017 um 19:59 schrieb Jari Williamsson:
> Jan,
>
> Smartshapes over multiple systems creates additional data objects of
> the FCSmartShapeSegment class.
>
> I don't have good documentation on smartshapes on my end, so it's lots
> of trial-and-error for me.
>
>
> Best regards,
>
> Jari Williamsson
>
>
> On 2017-07-26 12:24, Jan Angermüller wrote:
>> Jari et al,
>>
>> when calculating the metrics of a slur that goes over several staff
>> systems, the metrics are only calculated correctly for the first
>> staff system.
>> This was reported as a bug in 2014 (mail from 2014-06-28), but has
>> never been replied.
>>
>>
>>
>> The test script below returns these metric values for the slur start
>> positions in measure 3 and 4.
>>
>> Running [Unnamed Script] ======>
>> Measure: 3 Calculation ok? true X: 2020 Y: 2976
>> Measure: 4 Calculation ok? true X: 2020 Y: 2976 ---> wrong values,
>> it's not from measure 3, but from measure 4.
>> <======= [Unnamed Script] succeeded (Processing time: 0.001 s).
>>
>> Has anybody found a workaround?
>> Or, Jari, have you had time to look in this issue? Is it a bug in the
>> Finale PDK?
>>
>> Best,
>> Jan
>>
>> function GetEntryToSmartshape(id,measure,staff)
>> local notecell=finale.FCNoteEntryCell(measure,staff)
>> notecell:Load()
>> for e in each(notecell) do
>> if (e.EntryNumber == id)then
>> return e,e.EntryNumber
>> end
>> end
>> return nil,-1
>> end
>>
>> local region = finale.FCMusicRegion()
>> region:SetFullDocument()
>> local marks = finale.FCSmartShapeMeasureMarks()
>> marks:LoadAllForRegion(region)
>> for mark in each(marks) do
>> local smartshape = mark:CreateSmartShape()
>> if smartshape:IsSlur() then
>> local leftpoint=finale.FCPoint(1,1)
>> local leftseg=smartshape:GetTerminateSegmentLeft()
>> local
>> entry=GetEntryToSmartshape(leftseg.EntryNumber,leftseg.Measure,leftseg.Staff)
>> print("Measure:",mark.Measure,"Calculation
>> ok?",smartshape:CalcLeftEntryMetricPos(entry,leftpoint),
>> "X:",leftpoint.X,
>> "Y:",leftpoint.Y)
>> end
>> end
>>
>>
>> _______________________________________________
>> JWLua mailing list
>> 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/20170731/26a24a95/attachment.html>
More information about the JWLua
mailing list