forked from mruby-zest/mruby-zest-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user-manual-screenshots.rb
331 lines (294 loc) · 9.26 KB
/
user-manual-screenshots.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
$delay = 10
$time = 0
$time += $delay
$filter_cat = "/part0/kit0/adpars/GlobalPar/GlobalFilter/Pcategory"
# type of offset
# | root event
# | | offset
# v v v
sched.active_event [:frame, $time, 0]
def bb_class(run, cls)
widgets = run.filter_widgets(nil) do |x|
x.class == cls
end
run.joint_bounding_box(widgets)
end
sched.add lambda {|run|
$remote.settf("/part0/kit0/Psubenabled", true)
$remote.settf("/part0/kit0/Ppadenabled", true)
$remote.seti($filter_cat, 0)
run.screenshot("doc/bank-read.png")
run.screenshot("doc/info-tray.png",
bb_class(run, Qml::LogWidget))
run.set_view_pos(:view, :add_synth)
run.set_view_pos(:subview, :global)
run.change_view
}
def capture_filter(sched)
puts "Capture Filter images..."
delay = $delay
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.screenshot("doc/add-synth.png",
bb_class(run, Qml::ZynAddSynth))
run.set_view_pos(:subsubview, :filter)
run.change_view
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.screenshot("doc/filter-analog.png",
bb_class(run,Qml::ZynAnalogFilter))
$remote.seti($filter_cat, 1)
run.set_view_pos(:vis, :filter)
run.change_view
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.screenshot("doc/filter-formant.png",
bb_class(run, Qml::ZynAnalogFilter))
# XXX something looks wrong with the formant visualization
run.screenshot("doc/filter-formant-vis.png",
bb_class(run, Qml::VisFormant))
$remote.seti($filter_cat, 2)
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.screenshot("doc/filter-svf.png",
bb_class(run, Qml::ZynAnalogFilter))
}
end
def capture_oscil(sched)
delay = $delay
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.set_view_pos(:view, :add_synth)
run.set_view_pos(:subview, :oscil)
run.change_view
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.screenshot("doc/osc-overall.png",
bb_class(run, Qml::ZynOscil))
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
widgets = run.filter_widgets(nil) do |x|
ret = false
if(x.parent.class == Qml::ZynOscil &&
x.parent.middle_panel == x)
ret = true
end
ret
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/osc-tight.png", bb)
}
end
def capture_settings(sched)
delay = $delay
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.set_view_pos(:view, :part)
run.change_view
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
widgets = run.filter_widgets(nil) do |x|
x.label == "part settings"
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/part-settings-button.png", bb)
widgets = run.filter_widgets(nil) do |x|
a = x.label == "part settings"
if(!a && x.parent.class == Qml::ZynSidebar)
a = x.parent.part == x
end
a
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/part-settings-selection.png", bb)
widgets = run.filter_widgets(nil) do |x|
ret = false
if(x.respond_to?(:extern))
ret ||= x.extern == "/part0/Penabled"
ret ||= x.extern == "/part15/Pname"
end
ret
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/part-settings-labelenable.png", bb)
$remote.sets("/part0/Pname", "supersaw")
run.screenshot("doc/part-settings-controllers.png",
bb_class(run, Qml::ZynControllers))
run.screenshot("doc/part-settings-portamento.png",
bb_class(run, Qml::ZynPortamento))
run.screenshot("doc/part-settings-instrument.png",
bb_class(run, Qml::ZynInstrumentSettings))
run.screenshot("doc/part-settings-scale.png",
bb_class(run, Qml::ZynScale))
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
widgets = run.filter_widgets(nil) do |x|
ret = false
if(x.respond_to?(:extern))
ret ||= x.extern == "/part0/Penabled"
ret ||= x.extern == "/part2/Pname"
end
ret
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/part-settings-labelenable-close.png", bb)
}
end
def capture_settings_global(sched)
delay = $delay
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.set_view_pos(:view, :settings)
run.change_view
}
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run|
run.screenshot("doc/logo.png",
bb_class(run,Qml::ZynLogo))
run.screenshot("doc/settings-global.png",
bb_class(run,Qml::Forms))
widgets = run.filter_widgets(nil) do |x|
x.children.length > 0 &&
x.children[0].label == "bank root"
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/settings-bank-roots.png", bb)
widgets = run.filter_widgets(nil) do |x|
x.children.length > 0 &&
x.children[0].label == "preset roots"
end
bb = run.joint_bounding_box(widgets)
run.screenshot("doc/settings-preset-roots.png", bb)
}
end
def capture_lfo(sched)
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.set_view_pos(:view, :add_synth)
run.set_view_pos(:subview, :global)
run.set_view_pos(:subsubview, :amp)
run.change_view
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/lfo.png",
bb_class(run, Qml::ZynLFO))
}
end
def capture_env(sched)
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.set_view_pos(:view, :add_synth)
run.set_view_pos(:subview, :global)
run.set_view_pos(:subsubview, :amp)
run.change_view
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/env.png",
bb_class(run, Qml::ZynAmpEnv))
}
end
def capture_add(sched)
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.set_view_pos(:view, :add_synth)
run.set_view_pos(:subview, :global)
run.set_view_pos(:vis, :env)
run.change_view
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/add-synth.png",
bb_class(run, Qml::ZynAddSynth))
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/amp-control.png",
bb_class(run, Qml::ZynAmpGeneral))
}
end
def capture_pad(sched)
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.set_view_pos(:view, :pad_synth)
run.set_view_pos(:subview, :harmonics)
run.change_view
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/pad-synth.png",
bb_class(run, Qml::ZynPadSynth))
}
end
def capture_sub(sched)
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.set_view_pos(:view, :sub_synth)
run.set_view_pos(:subview, :global)
run.change_view
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/sub-synth.png",
bb_class(run, Qml::ZynSubSynth))
}
end
def capture_kit(sched)
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.set_view_pos(:view, :kits)
run.change_view
}
$time += $delay
sched.active_event [:frame, $time, $delay]
sched.add lambda {|run|
run.screenshot("doc/kit.png",
bb_class(run, Qml::ZynKit))
}
end
capture_filter(sched)
capture_oscil(sched)
capture_settings(sched)
capture_settings_global(sched)
capture_lfo(sched)
capture_env(sched)
capture_add(sched)
capture_pad(sched)
capture_sub(sched)
capture_kit(sched)
delay = $delay
$time += delay
sched.active_event [:frame, $time, delay]
sched.add lambda {|run| exit }