diff options
Diffstat (limited to 'examples/micscope/test')
| -rw-r--r-- | examples/micscope/test/record.script | 10 | ||||
| -rw-r--r-- | examples/micscope/test/transport.script | 22 |
2 files changed, 20 insertions, 12 deletions
diff --git a/examples/micscope/test/record.script b/examples/micscope/test/record.script index 2750a18..843d802 100644 --- a/examples/micscope/test/record.script +++ b/examples/micscope/test/record.script @@ -1,9 +1,9 @@ # Records (from whatever microphone the host gives a headless run) into a # new take, stops, and plays it back. -expect takes 0 +expect takes.len 0 key r expect transport.value recording -expect takes 1 +expect takes.len 1 frames 60 screenshot .zig-cache/micscope/recording.png key r @@ -13,11 +13,11 @@ expect transport.value forward frames 10 # Each recording is another take; opening a file while recording ends it. key r -expect takes 2 +expect takes.len 2 expect selected 1 console open test/sweep.wav expect transport.value stopped -expect takes 3 +expect takes.len 3 frames 2 -expect takes 3 +expect takes.len 3 screenshot .zig-cache/micscope/strip.png diff --git a/examples/micscope/test/transport.script b/examples/micscope/test/transport.script index f821a03..2015682 100644 --- a/examples/micscope/test/transport.script +++ b/examples/micscope/test/transport.script @@ -2,7 +2,7 @@ # 16 kHz) over a quiet 440 Hz tone. console open test/sweep.wav frames 2 -expect takes 1 +expect takes.len 1 expect selected 0 expect transport.value stopped key right @@ -36,7 +36,7 @@ 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 takes.len 2 expect selected 1 key up expect selected 0 @@ -47,14 +47,22 @@ click 400 150 expect selected 0 frames 2 screenshot .zig-cache/micscope/two-takes.png -# Deleting it leaves the second. +# Deleting it leaves the second. Its file stays: going back to before the +# deletion reads it again. +console save two key delete -expect takes 1 +expect takes.len 1 expect selected 0 -# State that miscounts the takes is told by draw. -console set takes 0 +console load two frames 2 -expect takes 1 +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 |
