Skip to content

Commit 486904b

Browse files
chore: autopublish 2024-08-12T13:04:09Z
1 parent c3d4ada commit 486904b

File tree

6 files changed

+169
-151
lines changed

6 files changed

+169
-151
lines changed

dist/measure_span.lua

Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5299,8 +5299,8 @@ function plugindef()
52995299
finaleplugin.Author = "Carl Vine"
53005300
finaleplugin.AuthorURL = "https://carlvine.com/lua/"
53015301
finaleplugin.Copyright = "https://creativecommons.org/licenses/by/4.0/"
5302-
finaleplugin.Version = "0.94"
5303-
finaleplugin.Date = "2024/04/30"
5302+
finaleplugin.Version = "0.95b"
5303+
finaleplugin.Date = "2024/07/29"
53045304
finaleplugin.CategoryTags = "Measure, Time Signature, Meter"
53055305
finaleplugin.MinJWLuaVersion = 0.70
53065306
finaleplugin.AdditionalMenuOptions = [[
@@ -5409,8 +5409,8 @@ local function dialog_save_position(dialog)
54095409
configuration.save_user_settings(script_name, config)
54105410
end
54115411
local function user_options()
5412-
local x_grid = { 15, 70, 190, 210, 305, 110 }
5413-
local i_width = 142
5412+
local x_grid = { 15, 70, 193, 210, 305, 110 }
5413+
local i_width = 138
54145414
local y = 0
54155415
local dlg = mixin.FCXCustomLuaWindow():SetTitle(finaleplugin.ScriptGroupName)
54165416
local function yd(diff)
@@ -5424,98 +5424,104 @@ local function user_options()
54245424
if chigh then stat:SetHeight(chigh) end
54255425
end
54265426
local function ccheck(cx, cy, cname, cwide, check, ctext, chigh)
5427-
cx = x_grid[cx]
5427+
cx = (type(cx) == "string") and tonumber(cx) or x_grid[cx]
54285428
local chk = dlg:CreateCheckbox(cx, cy, cname):SetWidth(cwide)
54295429
:SetText(ctext):SetCheck(check)
54305430
if chigh then chk:SetHeight(chigh) end
54315431
end
54325432
local function chl(cx, cy, cwide)
54335433
dlg:CreateHorizontalLine(cx, cy, cwide)
54345434
end
5435-
cstat(1, y + 1, "DIVIDE EACH MEASURE INTO TWO:", x_grid[4], nil, "div1")
5435+
cstat("0", y + 1, "DIVIDE", 50, nil, "div1")
5436+
cstat("43", y + 1, "Every Measure Into Two:", x_grid[3], nil, nil)
54365437
yd(20)
5437-
cstat(1, y, "Halve the numerator:", x_grid[3])
5438+
cstat(1, y, "Halve the Numerator:", x_grid[3])
54385439
ccheck(3, y, "1", i_width, (config.halve_numerator and 1 or 0), " [6/4] → [3/4][3/4]")
54395440
yd()
54405441
cstat(2, y, "OR")
54415442
yd()
5442-
cstat(1, y, "Double the denominator:", x_grid[3])
5443+
cstat(1, y, "Double the Denominator:", x_grid[3])
54435444
ccheck(3, y, "2", i_width, (config.halve_numerator and 0 or 1), " [6/4] → [6/8][6/8]")
54445445
yd(25)
54455446
chl(1, y, x_grid[5])
54465447
yd(10)
5447-
cstat(1, y, "If halving a numerator with an ODD number of beats:", x_grid[5])
5448+
cstat(1, y, "If Halving a Numerator With an Odd Number of Beats:", x_grid[5])
54485449
yd(17)
5449-
cstat(1, y, "More beats in first measure:", x_grid[4] + 20)
5450+
cstat(1, y, "More Beats in First Measure:", x_grid[4] + 20)
54505451
ccheck(3, y, "3", i_width, (config.odd_more_first and 1 or 0), " 3 → 2 + 1 etc.")
54515452
yd()
54525453
cstat(2, y, "OR")
54535454
yd()
5454-
cstat(1, y, "More beats in second measure:", x_grid[4] + 20)
5455+
cstat(1, y, "More Beats in Second Measure:", x_grid[4] + 20)
54555456
ccheck(3, y, "4", i_width, (config.odd_more_first and 0 or 1), " 3 → 1 + 2 etc.")
54565457
yd(27)
54575458
chl(0, y, x_grid[3] + i_width)
54585459
chl(0, y + 2, x_grid[3] + i_width)
54595460
chl(0, y + 3, x_grid[3] + i_width)
54605461
yd(13)
5461-
cstat(1, y + 1, "JOIN PAIRS OF MEASURES:", x_grid[3], nil, "div2")
5462+
cstat("0", y + 1, "JOIN", 35, nil, "div2")
5463+
cstat("33", y + 1, "Each Pair of Measures:", x_grid[3])
54625464
yd(20)
5463-
cstat(1, y, "If both measures have the same time signature ...", x_grid[5])
5465+
cstat(1, y, "If Both Measures Have the Same Time Signature:", x_grid[5])
54645466
yd(17)
5465-
cstat(1, y, "Double the numerator:", x_grid[3])
5466-
ccheck(3, y, "5", i_width, (config.double_join and 1 or 0), " [3/8][3/8] → [6/8]")
5467+
cstat("30", y, "Halve the Denominator:", x_grid[3])
5468+
ccheck(3, y, "6", i_width, (config.double_join and 0 or 1), " [6/8][6/8] → [6/4]")
54675469
yd()
5468-
cstat(2, y, "OR")
5470+
cstat("85", y, "OR")
54695471
yd()
5470-
cstat(1, y, "Halve the denominator:", x_grid[3])
5471-
ccheck(3, y, "6", i_width, (config.double_join and 0 or 1), " [3/8][3/8] → [3/4]")
5472+
cstat("30", y, "Double the Numerator:", x_grid[3])
5473+
ccheck(3, y, "5", i_width, (config.double_join and 1 or 0), " [6/8][6/8] → [12/8]")
54725474
yd(25)
54735475
chl(1, y, x_grid[5])
54745476
yd(5)
5475-
cstat(1, y, "otherwise ...", x_grid[2])
5477+
cstat(1, y, "Else if They Have Different Time Signatures:", x_grid[5])
54765478
yd(17)
5477-
cstat(1, y, "Consolidate time signatures:", x_grid[4])
5479+
cstat("30", y, "Consolidate Time Signatures:", x_grid[4])
54785480
ccheck(3, y, "8", i_width, (config.composite_join and 0 or 1),
5479-
" [2/4][3/8] → [7/8]\n (lose beaming groups)", 30)
5481+
" [2/4][3/8] → [7/8]\n (Lose Beam Groups)", 30)
54805482
yd(17)
5481-
cstat(2, y, "OR")
5483+
cstat("85", y, "OR")
54825484
yd(17)
5483-
cstat(1, y, "Composite time signatures:", x_grid[3])
5485+
cstat("30", y, "Composite Time Signatures:", x_grid[3])
54845486
ccheck(3, y, "7", i_width, (config.composite_join and 1 or 0),
5485-
" [2/4][3/8] → [2/4+3/8]\n (keep beaming groups)", 30)
5487+
" [2/4][3/8] → [2/4+3/8]\n (Keep Beam Groups)", 30)
54865488
yd(35)
5487-
ccheck(1, y, "display_meter", x_grid[5] + 10, (config.display_meter and 1 or 0),
5488-
" Create \"display\" time signature when compositing\n "
5489-
.. "[2/4][3/8] → [2/4+3/8] displaying \"7/8\" )", 30
5489+
ccheck("30", y, "display_meter", x_grid[5] + 10, (config.display_meter and 1 or 0),
5490+
" Create \"Display\" Time Signature When Compositing\n "
5491+
.. " ([2/4][3/8] → [2/4+3/8] Displaying \"7/8\")", 32
54905492
)
54915493
yd(36)
54925494
chl(0, y, x_grid[3] + i_width)
54935495
chl(0, y + 2, x_grid[3] + i_width)
54945496
chl(0, y + 3, x_grid[3] + i_width)
54955497
yd(12)
5496-
cstat("0", y, "Preserve smart shapes within\n(Larger spans take longer)", x_grid[3], 30)
5498+
cstat("0", y, "Preserve Smart Shapes Within\n(Larger Spans Take Longer)", x_grid[3], 32)
54975499
local popup = dlg:CreatePopup(x_grid[3] - 27, y - 1, "shape_extend")
54985500
:SetWidth(40):SetSelectedItem(config.shape_extend - 2)
54995501
for i = 2, 10 do
55005502
popup:AddString(i)
55015503
end
5502-
cstat("206", y, "measure span")
5504+
cstat("204", y, "- Measure Span")
55035505
yd(38)
55045506
cstat("0", y, "ON COMPLETION:", i_width, nil, "div3")
5505-
ccheck(6, y, "note_spacing", i_width, (config.note_spacing and 1 or 0), "Respace notes")
5507+
ccheck(6, y, "note_spacing", i_width, (config.note_spacing and 1 or 0), "Respace Notes")
55065508
dlg:CreateButton(x_grid[5], y, "q"):SetText("?"):SetWidth(20)
55075509
:AddHandleCommand(function()
55085510
utils.show_notes_dialog(dlg, "About " .. finaleplugin.ScriptGroupName)
55095511
refocus_document = true
55105512
end)
55115513
yd(18)
5512-
ccheck(6, y, "rebeam", i_width + 40, (config.rebeam and 1 or 0), "Rebeam note groups")
5514+
ccheck(6, y, "rebeam", i_width + 20, (config.rebeam and 1 or 0), "Rebeam Note Groups")
55135515
yd(18)
5514-
ccheck(6, y, "repaginate", i_width, (config.repaginate and 1 or 0), "Repaginate entire score")
5516+
ccheck(6, y, "repaginate", i_width + 20, (config.repaginate and 1 or 0), "Repaginate Entire Score")
55155517

55165518
local function radio_change(id, check)
55175519
local toggle = (id % 2 == 0) and (id - 1) or (id + 1)
55185520
dlg:GetControl(tostring(toggle)):SetCheck((check + 1) % 2)
5521+
if id > 6 then
5522+
local state = check == ((id == 7) and 1 or 0)
5523+
dlg:GetControl("display_meter"):SetEnable(state)
5524+
end
55195525
end
55205526
for id = 1, 8 do
55215527
dlg:GetControl(tostring(id))
@@ -5537,13 +5543,12 @@ local function user_options()
55375543
config.shape_extend = (self:GetControl("shape_extend"):GetSelectedItem() + 2)
55385544
end)
55395545
dlg:RegisterCloseWindow(function(self) dialog_save_position(self) end)
5540-
dlg:RegisterInitWindow(function()
5541-
local div1 = dlg:GetControl("div1")
5542-
local bold = div1:CreateFontInfo():SetBold(true)
5543-
div1:SetFont(bold)
5544-
dlg:GetControl("div2"):SetFont(bold)
5545-
dlg:GetControl("div3"):SetFont(bold)
5546-
dlg:GetControl("q"):SetFont(bold)
5546+
dlg:RegisterInitWindow(function(self)
5547+
local bold = self:GetControl("div1"):CreateFontInfo():SetBold(true)
5548+
for _, v in ipairs{"div1", "div2", "div3", "q"} do
5549+
dlg:GetControl(v):SetFont(bold)
5550+
end
5551+
self:GetControl("display_meter"):SetEnable(config.composite_join)
55475552
end)
55485553
return (dlg:ExecuteModal(nil) == finale.EXECMODAL_OK)
55495554
end
@@ -5573,8 +5578,8 @@ local function repaginate()
55735578
gen_prefs:Save()
55745579
end
55755580
function copy_measure_values(measure_1, measure_2)
5576-
for _, v in ipairs({ "PositioningNotesMode", "Barline",
5577-
"SpaceAfter", "SpaceBefore", "UseTimeSigForDisplay" }) do
5581+
for _, v in ipairs{ "PositioningNotesMode", "Barline",
5582+
"SpaceAfter", "SpaceBefore", "UseTimeSigForDisplay" } do
55785583
measure_2[v] = measure_1[v]
55795584
end
55805585
measure_1.Barline = finale.BARLINE_NORMAL

0 commit comments

Comments
 (0)