1
1
function plugindef ()
2
2
finaleplugin .RequireSelection = true
3
3
finaleplugin .Author = " Carl Vine"
4
- finaleplugin .AuthorURL = " https://carlvine.com/?cv= lua"
4
+ finaleplugin .AuthorURL = " https://carlvine.com/lua/ "
5
5
finaleplugin .Copyright = " https://creativecommons.org/licenses/by/4.0/"
6
- finaleplugin .Version = " 0.68 "
7
- finaleplugin .Date = " 2023/06/12 "
6
+ finaleplugin .Version = " 0.70 "
7
+ finaleplugin .Date = " 2023/07/25 "
8
8
finaleplugin .MinJWLuaVersion = 0.60
9
- finaleplugin .Notes = [[ "Meter Set Numeric" provides rapid entry of simple or complex
10
- time signatures with a few keystrokes.
11
- It supports composite numerators like [3+2+3/16] and can join
12
- with further composites (e.g. [3+2+3/16]+[1/4]+[5+4/8]).
13
- "Display only" time signatures can be equally complex and set without using a mouse.
14
- At startup the time signature of the first selected measure is shown.
15
- Click the "Clear All" button to revert to a simple 4/4 with no other options.
9
+ finaleplugin .Notes = [[
10
+ This script provides rapid entry of simple or complex
11
+ time signatures with a few keystrokes.
12
+ It supports composite numerators like [3+2+3/16] and can join
13
+ with further composites (e.g. [3+2+3/16]+[1/4]+[5+4/8]).
14
+ "Display only" time signatures can be equally complex and set without using a mouse.
15
+ At startup the time signature of the first selected measure is shown.
16
+ Click the "Clear All" button to revert to a simple 4/4 with no other options.
16
17
17
- All measures in the current selection will be assigned the new time signature.
18
- If just one measure is selected only it will be changed.
18
+ All measures in the current selection will be assigned the new time signature.
19
+ If just one measure is selected only it will be changed.
19
20
20
- "Bottom" numbers (denominators) are the usual "note" numbers: 2, 4, 8, 16, 32, 64.
21
- "Top" numbers (numerators) are integers, optionally joined by '+' signs for composite meters.
22
- Multiples of 3 automatically convert to compound signatures so [9/16] will
23
- convert to three groups of dotted 8ths.
24
- To prevent automatic compounding, instead of the bottom 'note' number enter its EDU value
25
- (quarter note = 1024; eighth note = 512 etc).
21
+ "Bottom" numbers (denominators) are the usual "note" numbers: 2, 4, 8, 16, 32, 64.
22
+ "Top" numbers (numerators) are integers, optionally joined by '+' signs for composite meters.
23
+ Multiples of 3 automatically convert to compound signatures so [9/16] will
24
+ convert to three groups of dotted 8ths.
25
+ To prevent automatic compounding, instead of the bottom 'note' number enter its EDU value
26
+ (quarter note = 1024; eighth note = 512 etc).
26
27
27
- Empty and zero "Top" numbers will be ignored.
28
- If "Secondary" numbers are zero then "Tertiary" values are ignored.
28
+ Empty and zero "Top" numbers will be ignored.
29
+ If "Secondary" numbers are zero then "Tertiary" values are ignored.
29
30
]]
30
31
return " Meter Set Numeric" , " Meter Set Numeric" , " Set the Meter Numerically"
31
32
end
@@ -113,8 +114,9 @@ function user_chooses_meter(meter, rgn)
113
114
cstat (1 , y , x [3 ], " DISPLAY SIGNATURE" )
114
115
cstat (3 , y , 150 , " (set to '0' for none)" )
115
116
dialog :CreateButton (x [5 ] + 60 , y ):SetText (" ?" ):SetWidth (20 )
116
- :AddHandleCommand (function () finenv .UI ():AlertInfo (finaleplugin .Notes :gsub (" \n " , " " ), " INFO: Meter Set Numeric" ) end )
117
-
117
+ :AddHandleCommand (function ()
118
+ finenv .UI ():AlertInfo (finaleplugin .Notes :gsub (" %s+" , " " ), " About " .. plugindef ())
119
+ end )
118
120
-- USER EDIT BOXES
119
121
y = 0
120
122
local box = {} -- user's edit-box entry responses
@@ -127,7 +129,7 @@ function user_chooses_meter(meter, rgn)
127
129
:SetText (join (t_sig .top [group ])):SetWidth (65 )
128
130
box [id + 3 ] = dialog :CreateEdit (x [4 ], y - offset , tostring (id + 3 ))
129
131
:SetInteger (t_sig .bottom [group ] or 0 ):SetWidth (65 )
130
- cstat (x [2 ] + label_off [group ], y , 95 , label [group ])
132
+ cstat (x [2 ] + label_off [group ], y , 56 - label_off [ group ] , label [group ])
131
133
end
132
134
y = y_middle
133
135
end
@@ -154,6 +156,7 @@ function user_chooses_meter(meter, rgn)
154
156
for group = 1 , 3 do
155
157
local id = count + group
156
158
choices [id ] = self :GetControl (tostring (id )):GetText () or " 0"
159
+ if choices [id ] == " " then choices [id ] = " 0" end
157
160
choices [id + 3 ] = math.abs (self :GetControl (tostring (id + 3 )):GetInteger ()) or 0
158
161
end
159
162
end
0 commit comments