<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Thank you again, Robert, for your explanation.<br>
Yes, I can confirm that it seems to work old Finale v3 documents,
but not in Finale v2 documents.<br>
<br>
But are you sure that the placement values are not sorted?<br>
<br>
In my code below I didn't use your indices
(SSENTCNCTSTYLE_HEAD_LEFT_TOP, SSENTCNCTSTYLE_HEAD_RIGHT_TOP,
SSENTCNCTSTYLE_HEAD_RIGHT_BOTTOM ...), because they seemed to be
irritating for me: <br>
they don't reflect the order of the images in the Smart Shape
Placement dialog.<br>
<br>
For example to get the values from the second image from the Smart
Shape Placement dialog (slur below head, default values 0/-12) which
I would refer to as "Head Left Bottom/Head Right Bottom" in your
naming convention is index 4 / 5.<br>
But index 4/5 is called "STEM_LEFT_TOP / STEM_RIGHT_TOP" in your
enum.<br>
<br>
Instead I ran a loop that printed me all default values from Finale
27 like this:<br>
local numentr=29<br>
local i<br>
for i=1,numentr do<br>
local prefs=finale.FCSmartShapePrefs()<br>
prefs:LoadFirst()<br>
local a
=prefs:CreateEntryConnectStyle(finale.SSENTCNCTSTYLETYPE_SLURS,i-1)<br>
if a then<br>
print(a.HorizontalOffset,a.VerticalOffset)<br>
end<br>
end<br>
<br>
With this list it was easy to reproduce the order of the indices. <br>
I just had to compare them with the values from the images.<br>
<br>
Jan<br>
<br>
<div class="moz-cite-prefix">Am 03.06.2023 um 14:56 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite"
cite="mid:CAACnceu_f06ZvWO5f1cUOCQpAVp-eeqF+mPPAPfwsAs8dXFXfw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>On further review, it seems the conversion from Finale v2
is not complete. The connection indices aren't set/ Currently,
the only way to fix the issue is manually hit the reset button
for each of the slur contours. Adding a mechanism to do this
in RGP Lua is problematic because the contour values do not
appear to be sorted in any particular way. Only the app knows
how to do it.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Jun 3, 2023 at 7:35 AM
Jan Angermüller <<a href="mailto:jan@angermueller.com"
moz-do-not-send="true" class="moz-txt-link-freetext">jan@angermueller.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Thanks, Robert.<br>
<br>
Sorry, maybe I was a bit unclear. This was not the problem
that I meant.<br>
I know that that the slur won't update as it is
beat-attached.<br>
And yes, the next step would be the TG Tools tool to make it
note-attached (However, it has a number of problems with
more complex slurs like the ones used in this score).<br>
<br>
I meant the problem with the "Smart Shape Placement" dialog
not being correctly updated.<br>
It won't update when I apply the RGP Lua script - except for
the very first image (top slur).<br>
<br>
So any new (note-attached) slur that I create afterwards
still uses the old offsets, although the "Smart Shape
Placement" dialog shows the correct new values that the RGP
Lua script has created.<br>
<br>
Looks like some internal thing is not updated through RGP
Lua - only for the first "Slur Placement" image, but not for
the following images.<br>
Only after I click on "Reset" in the Smart Shape Placement
dialog, the values won't change - as they are already the
correct default values.<br>
But the image will update and also the (note-attached) slurs
in the score.<br>
<br>
Attached is another file with two additional note-attached
slurs.<br>
Here is another short video: <a
href="https://www.youtube.com/watch?v=lqcz6Fe4nh0"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.youtube.com/watch?v=lqcz6Fe4nh0</a><br>
1.) after I apply the "Update slur placement script" (code
from my first email), the "Under" slur in the last measure
still starts directly on the notehead instead of -12 EVPU
away from it.<br>
However, the "Over" slur in the second bar is correctly
updated (the first preview image in the Smart Shape
Placement dialog is also correct - it's only all other
images that are not correct)<br>
2.) When I enter the Smart Shape Placement dialog, it show
the correct -12 EVPU value for the "Under" slur, but the
preview image doesn't display -12.<br>
3.) Only after I click on "Reset" in the "Smart Shape
Placement" dialog, Finale actually seems to write the
existing -12 EVPU value into its memory and update the slur.
The -12 EVPU doesn't change by clicking "Reset", but the
preview image (and the slurs in the score) are updated.<br>
<br>
Jan<br>
<br>
<br>
<div>Am 03.06.2023 um 14:03 schrieb Robert Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>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.)</div>
<div><br>
</div>
<div>Finale v1, iirc, did not have smart shapes at all.</div>
<div>Finale v2 had smart shapes but only beat-attached
smart shapes.</div>
<div><br>
</div>
<div>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.<br>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Jun 3, 2023 at
5:20 AM Jan Angermüller <<a
href="mailto:jan@angermueller.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">jan@angermueller.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> Robert,<br>
<br>
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).<br>
I don't know what Finale version this score was
created in, probably in Finale v1 or v2. <br>
The user wrote that he has been using Finale since
v1.0.<br>
The file info lists creation date and application as
"unknown". <br>
However, the score was imported into Finale 27 and
sent to me as a Finale 27 document.<br>
<br>
When I run the script below in Finale 27, the
default slur placement settings are correctly
written into the slur placement dialog. <br>
However, the preview images in the slur placement
dialog are not updated - except for the very first
image (slur above downstem notes).<br>
And when I attach a new slur it still uses the old
0,0 values instead of the values written.<br>
<br>
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.<br>
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? <br>
<br>
Below is my test code.<br>
For trying to track down the problem I have reloaded
the FCSmartShapePrefs for each value pair and
immediately saved it.<br>
But it's the same result when I load it only once
and save it after the loop.<br>
<br>
Attached is the file excerpt and here is a screencam
video that shows the problem:<br>
<a
href="https://www.youtube.com/watch?v=LPa0LeALXCs"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://www.youtube.com/watch?v=LPa0LeALXCs</a><br>
I have tested it both with RGP Lua v0.66 and v0.67.
Same result.<br>
<br>
Any ideas?<br>
<br>
local defvalues=<br>
{0,12,0,12,<br>
12,-24,-12,-24,<br>
0,-12,0,-12,<br>
12,24,-12,24,<br>
12,-24,-12,-24,<br>
6,4,-12,-48,<br>
8,0,-6,48,<br>
0,-3,-24,-3,<br>
0,3,0,9,<br>
0,12,0,12,<br>
0,-12,0,-12,<br>
24,-24,<br>
24,-24,<br>
24,24,<br>
0,8,0,8,<br>
0,-8,0,-8}<br>
<br>
local numentr=29<br>
local index=1<br>
local i<br>
for i=1,numentr do<br>
local prefs=finale.FCSmartShapePrefs()<br>
prefs:LoadFirst()<br>
local a
=prefs:CreateEntryConnectStyle(finale.SSENTCNCTSTYLETYPE_SLURS,i-1)<br>
if a then<br>
a:SetHorizontalOffset(defvalues[index])<br>
a:SetVerticalOffset(defvalues[index+1])<br>
prefs:SaveEntryConnectStyle(a,finale.SSENTCNCTSTYLETYPE_SLURS,i-1
) <br>
prefs:Save()<br>
end<br>
index=index+2<br>
end<br>
<br>
Jan<br>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a><br>
<a
href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a href="http://www.elbsound.studio" target="_blank" moz-do-not-send="true">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a class="moz-txt-link-abbreviated" href="http://www.elbsound.studio">www.elbsound.studio</a></pre>
</body>
</html>