<div dir="ltr">I believe ReferenceWidth is supported all the way back in JW Lua. Let me know if it isn't.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 13, 2023 at 10:00 AM Jan Angermüller <<a href="mailto:jan@angermueller.com">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>
Thank you very much, Robert, for this quick solution!<br>
<br>
Yes, replacing MinimumPosition with ReferenceWidth in the header
item seems to have solved the problem.<br>
Though I haven't run all my tests yet - only the one file.<br>
<br>
<b>And do I understand you correctly that it is safe to change this
for all versions prior to v0.66 as well?</b><br>
<br>
Or let me put the question the other way around:<br>
Is it really necessary to introduce incompatibility here?<br>
<br>
All scripts that use .MinimumPosition from element 0 won't work
anymore.<br>
I have never noticed that MinimumPosition could be replaced with
ReferenceWidth, because storing in MinimumPosition updated the value
in ReferenceWidth too - for whatever reason.<br>
<br>
I understand that it may be more clear to use ReferenceWidth
directly. <br>
However, it has worked fine so far in previous versions.<br>
According to the new documentation "SetMinimumPosition can't be
applied to the init beat chart element".<br>
So if MinimumPosition is not used in the header element anyway, then
it could still be used just for compatibility reasons.<br>
<br>
Currently I have only updated the Perfect Layout code. But I'll have
to check the other plug-ins too.<br>
I ask because the fix is a bit risky. <br>
When updating the code you have to make sure only that only the
0-index elements are affected and not the elements above index 0.<br>
<br>
Jan<br>
<br>
<br>
<div>Am 13.03.2023 um 13:01 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>For the header (item 0), use ReferenceWidth instead of
MinimumPosition. It might be worth reading the updated
documentation. Item 0 is a header and has different properties
than the rest of the items.</div>
<div><br>
</div>
<div>I have found that editing beat charts is a fool's game
unless you first transition them to manual mode. I added a new
function that does a version of this. Unfortunately, Finale's
algorithm for doing it is much more complicated, and it is too
difficult to reverse engineer. But the version I provided is
serviceable for most use cases.</div>
<div><br>
</div>
<div>That said, if your code doesn't require transition to
manual mode, and you are happy with it, it should continue to
work. You'll just need to use the ReferenceWidth field on item
0 instead of MinimumPosition. Be aware that the ReferenceWidth
is a scratch value and if Finale actually uses it, it has been
extremely difficult to figure out how. My contact at MakeMusic
says it is the minimum measure width that the chart can handle
without collisions.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Mar 13, 2023 at
5:55 AM Jan Angermüller <<a href="mailto:jan@angermueller.com" target="_blank">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>
<div> <br>
in my further tests with v0.66 and Perfect Layout I
noticed that the <b>FCBeatChartElement </b>functionality
has changed significantly.<br>
My "insert space" function doesn't work anymore ... while
it used to add more space, it now reduces the space in
some cases.<br>
<br>
Attached is a test document and a code snippet.<br>
However, the problem occurs in all sorts of documents.<br>
<br>
The code simply prints the FCBeatChartElement properties
from measure 4.<br>
It seems that there is a problem with the MinimumPosition
on FCBeatChartElement 0.<br>
<br>
function plugindef()<br>
finaleplugin.LoadLuaSocket=true<br>
return "Test","Test","Test"<br>
end<br>
pluginname=plugindef()<br>
if finenv.IsRGPLua then require('mobdebug').start() end<br>
local measure=finale.FCMeasure()<br>
measure:Load(4)<br>
local beatcharts= measure:CreateBeatChartElements()<br>
local beatchart2<br>
for beatchart2 in each(beatcharts) do<br>
print("BC2",measure.ItemNo,beatchart2.ItemCmper,beatchart2.ItemInci,beatchart2.MeasurePos,beatchart2.HorizontalPosition,beatchart2.NextHorizontalPosition,beatchart2:CalcWidth(),beatchart2.MinimumPosition)<br>
end<br>
<br>
Before RGP Lua v0.66 (here JW Lua 0.54)<br>
BC2 4 4 0 4096 336 0 0<b> 641</b><br>
BC2 4 4 1 0 0 84 84 0<br>
BC2 4 4 2 1024 84 116 32 64<br>
BC2 4 4 3 1280 116 148 32 125<br>
BC2 4 4 4 1536 148 200 52 177<br>
BC2 4 4 5 2048 200 336 136 218<br>
<br>
RGP Lua v0.66<br>
"BC2" 4 4 0 4096 336 0 0 <b>0</b>
-- 641 missing!<br>
"BC2" 4 4 1 0 0 84 84 0<br>
"BC2" 4 4 2 1024 84 116 32 64<br>
"BC2" 4 4 3 1280 116 148 32 125<br>
"BC2" 4 4 4 1536 148 200 52 177<br>
"BC2" 4 4 5 2048 200 336 136 218<br>
<br>
Any ideas?<br>
<br>
Jan<br>
<br>
<br>
<br>
<br>
<div>Am 11.02.2023 um 18:01 schrieb Robert Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Okay, I will leave it. I am adding some
additional properties for clarity.</div>
<div><br>
</div>
<div>The main concept that is missing is the concept
of transitioning the beat chart from automatic to
manual. This is a concept I discovered after
extensive reverse-engineering of Finale behavior.
Unfortunately, I didn't get the comments into the
PDK before Jari withdrew from working on it.</div>
<div><br>
</div>
<div>You basically cannot edit a beat chart unless you
first transition it to a manual beat chart. Finale
does this when the user manually edits it with the
beat chart handles. I'm going to add a method on
FCBeatChartElements to do it programmatically.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Feb 11, 2023
at 10:53 AM Jan Angermüller <<a href="mailto:jan@angermueller.com" target="_blank">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 use both classes a lot in Perfect Layout.<br>
Though it still sometimes seems like a puzzle (or
incomplete?) to me too.<br>
Adding more properties would be fine, but
changing/splitting the whole thing would have
massive impact on the spacing algorithms from
Perfect Layout.<br>
<br>
If it really makes sense to you to change it,
maybe you could keep FCBeatChartElement(s) and add
an alternative implementation with a new name, so
that the old one still can be used. Not so nice,
but very pragmatic ;-)<br>
<br>
Jan<br>
<br>
<div>Am 11.02.2023 um 16:46 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>Does anyone use FCBeatChartElement or
FCBeatChartElements? It appears to be
incomplete to me, and I would also like to
split the header out into its own class.
This would be a breaking change, so I am not
sure I'll do it. But I thought I would poll
the group.</div>
<div><br>
</div>
<div>Robert</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">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">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">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">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>