[JW Lua] Problem with the new FCSmartShapeEntryConnectStyle: only first image updated and not affecting the slurs
Robert Patterson
robert at robertgpatterson.com
Sat Jun 3 14:03:34 CEST 2023
As near as I can tell, I believe the chief issue you have is that the slur
is beat-attached. This is a legacy slur mode, no longer well-supported in
the UI, though it has its uses. (For example, I use them as arpeggiation
ties and lv ties. I also use them when a measure is partially hidden with
alt notation, because note-attached slurs get hidden on the entire measure
if the first part of the measure is hidden.)
Finale v1, iirc, did not have smart shapes at all.
Finale v2 had smart shapes but only beat-attached smart shapes.
I'm guessing the file was imported from v2. If so, all slurs will be legacy
beat-attached slurs. The best tool I know of to convert beat-attached to
note-attached is one of the TGTools plugins. Of course, it should be
possible to write a lua script to do it.
On Sat, Jun 3, 2023 at 5:20 AM Jan Angermüller <jan at angermueller.com> wrote:
> Robert,
>
> I was just playing a bit the new FCSmartShapeEntryConnectStyle-stuff as I
> received an old Finale score where the slur placement wasn't setup yet (all
> values set to 0).
> I don't know what Finale version this score was created in, probably in
> Finale v1 or v2.
> The user wrote that he has been using Finale since v1.0.
> The file info lists creation date and application as "unknown".
> However, the score was imported into Finale 27 and sent to me as a Finale
> 27 document.
>
> When I run the script below in Finale 27, the default slur placement
> settings are correctly written into the slur placement dialog.
> However, the preview images in the slur placement dialog are not updated -
> except for the very first image (slur above downstem notes).
> And when I attach a new slur it still uses the old 0,0 values instead of
> the values written.
>
> It seems like only the images of the first dialog are updated (slur above
> downstem notes) and only the first four values are actually used from
> Finale - although all other values look fine in the Slur Placement dialog.
> Could it be that there is something missing in your code that actually
> writes the new values (after value 1-4) more deeply into Finale?
>
> Below is my test code.
> For trying to track down the problem I have reloaded the FCSmartShapePrefs
> for each value pair and immediately saved it.
> But it's the same result when I load it only once and save it after the
> loop.
>
> Attached is the file excerpt and here is a screencam video that shows the
> problem:
> https://www.youtube.com/watch?v=LPa0LeALXCs
> I have tested it both with RGP Lua v0.66 and v0.67. Same result.
>
> Any ideas?
>
> local defvalues=
> {0,12,0,12,
> 12,-24,-12,-24,
> 0,-12,0,-12,
> 12,24,-12,24,
> 12,-24,-12,-24,
> 6,4,-12,-48,
> 8,0,-6,48,
> 0,-3,-24,-3,
> 0,3,0,9,
> 0,12,0,12,
> 0,-12,0,-12,
> 24,-24,
> 24,-24,
> 24,24,
> 0,8,0,8,
> 0,-8,0,-8}
>
> local numentr=29
> local index=1
> local i
> for i=1,numentr do
> local prefs=finale.FCSmartShapePrefs()
> prefs:LoadFirst()
> local a
> =prefs:CreateEntryConnectStyle(finale.SSENTCNCTSTYLETYPE_SLURS,i-1)
> if a then
> a:SetHorizontalOffset(defvalues[index])
> a:SetVerticalOffset(defvalues[index+1])
> prefs:SaveEntryConnectStyle(a,finale.SSENTCNCTSTYLETYPE_SLURS,i-1
> )
> prefs:Save()
> end
> index=index+2
> end
>
> Jan
> _______________________________________________
> 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/20230603/7742a293/attachment.htm>
More information about the JWLua
mailing list