summaryrefslogtreecommitdiff
path: root/examples/micscope/test/transport.script
blob: 20156823632f966aaa3970ea4664e472baed5353 (plain) (blame)
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
# Opens a file as a take and plays it both ways: a 2 s log sweep (40 Hz to
# 16 kHz) over a quiet 440 Hz tone.
console open test/sweep.wav
frames 2
expect takes.len 1
expect selected 0
expect transport.value stopped
key right
expect transport.value forward
frames 30
expect-audio 1
screenshot .zig-cache/micscope/forward.png
key left
expect transport.value backward
expect backward true
frames 20
key space
expect transport.value stopped
# Space resumes the way it last went.
key space
expect transport.value backward
key space
# Seeking: keys, and a click on the take's timeline.
key end
expect seek.value 1
click 400 150
expect seek.serial 2
# Ctrl+wheel (or a pinch) on a take's timeline zooms its time around the
# pointer; Z zooms back out.
hold left_ctrl
wheel 400 150 3
release left_ctrl
key z
key right
frames 30
screenshot .zig-cache/micscope/played.png
# A second take goes under the first and is selected; up is older.
console open test/sweep.wav
expect takes.len 2
expect selected 1
key up
expect selected 0
key down
expect selected 1
# A click on the first take selects it.
click 400 150
expect selected 0
frames 2
screenshot .zig-cache/micscope/two-takes.png
# Deleting it leaves the second. Its file stays: going back to before the
# deletion reads it again.
console save two
key delete
expect takes.len 1
expect selected 0
console load two
frames 2
expect takes.len 2
key delete
expect takes.len 1
# A counter that names a take file already written (--fresh keeps the
# files; a seek back finds the future's) is moved past it by draw.
console set next_id 1
frames 2
expect next_id 3
# More takes than fit: the camera follows the bottom until the wheel pans
# it, then 0 shows the whole strip.
console open test/sweep.wav
console open test/sweep.wav
console open test/sweep.wav
expect follow true
wheel 400 400 2
expect follow false
frames 2
screenshot .zig-cache/micscope/panned.png
key 0
expect follow true
frames 2
screenshot .zig-cache/micscope/overview.png
# Ctrl+wheel off the timelines zooms the view.
hold left_ctrl
wheel 1150 400 1
release left_ctrl
frames 2
screenshot .zig-cache/micscope/zoomed-view.png
# The buttons on top do what the keys do, for touch screens.
click 832 18
expect transport.value recording
click 832 18
expect transport.value stopped
click 890 18
expect transport.value forward
click 890 18
expect transport.value stopped
click 1238 18
expect a4 441
frames 2
screenshot .zig-cache/micscope/buttons.png