summaryrefslogtreecommitdiff
path: root/examples/spheres/test/play.script
diff options
context:
space:
mode:
Diffstat (limited to 'examples/spheres/test/play.script')
-rw-r--r--examples/spheres/test/play.script58
1 files changed, 58 insertions, 0 deletions
diff --git a/examples/spheres/test/play.script b/examples/spheres/test/play.script
new file mode 100644
index 0000000..1b06372
--- /dev/null
+++ b/examples/spheres/test/play.script
@@ -0,0 +1,58 @@
+# Plays each preset and synthesis mode headless; screenshots land in
+# .zig-cache/spheres/ for review.
+frames 120
+expect running true
+expect preset figure_eight
+screenshot .zig-cache/spheres/figure-eight.png
+expect mode additive
+key s
+key s
+key s
+expect mode fm
+frames 30
+key p
+key p
+expect preset pythagorean
+frames 240
+screenshot .zig-cache/spheres/pythagorean.png
+# Time backwards, then paused.
+key left
+expect backward true
+frames 30
+key space
+expect running false
+frames 10
+key space
+key right
+expect backward false
+key tab
+expect focus 1
+key p
+frames 200
+screenshot .zig-cache/spheres/lagrange.png
+# The buttons do what the keys do: pause, a random system, the figure eight.
+click 727 18
+expect running false
+click 1087 18
+expect preset random
+expect running true
+frames 60
+screenshot .zig-cache/spheres/random.png
+click 1015 18
+expect preset figure_eight
+# As an instrument: the look-ahead finds chords, a grid button sends the sky
+# to the nearest time its chord plays, and the sky holds still there.
+key c
+expect instrument true
+frames 200
+# 7 is the number row's C column: C major (bits 0, 4, 7).
+key 7
+expect chord.value 145
+frames 90
+screenshot .zig-cache/spheres/chords.png
+# U is QWERTY's C column, a row down: C minor (bits 0, 3, 7).
+key u
+expect chord.value 137
+frames 60
+key escape
+expect instrument false