diff options
Diffstat (limited to 'examples/micscope/test/transport.script')
| -rw-r--r-- | examples/micscope/test/transport.script | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/examples/micscope/test/transport.script b/examples/micscope/test/transport.script new file mode 100644 index 0000000..f821a03 --- /dev/null +++ b/examples/micscope/test/transport.script @@ -0,0 +1,90 @@ +# 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 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 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. +key delete +expect takes 1 +expect selected 0 +# State that miscounts the takes is told by draw. +console set takes 0 +frames 2 +expect takes 1 +# 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 |
