diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 00:15:15 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 9bd77e54943d954291b5faef287ccca5dcebd7a4 (patch) | |
| tree | 3f2d628781441568620b8108fab920713f26f649 /examples/spheres/test | |
| parent | e997fc3e6b312b30f5af90012fc22365bab701d4 (diff) | |
| download | sketchbook-9bd77e54943d954291b5faef287ccca5dcebd7a4.tar.gz sketchbook-9bd77e54943d954291b5faef287ccca5dcebd7a4.zip | |
examples: micscope and spheres come home, as they were, building
Both lived outside any repository, beside sketchbook, with manifests that
pointed at ../01-drat-meout/lib/sketchbook, which no longer exists. They
are copied into examples/micscope and examples/spheres (their sources,
shaders, tests, test material and web icons; not their caches, builds,
packages, state files or .gitignore, which the root's covers), their
manifests depend on "../.." as the other examples do, and their
READMEs link sketchbook there. Nothing else changed: both build against
today's library and pass their own zig build test (micscope 62/62 steps,
11/11 tests, its transport, record, render and tuner scripts; spheres
75/75 steps, 3/3 tests, its play script). The originals are untouched.
micscope's test/reference.flac (3.7 MiB, CC BY-SA 3.0, credited in its
test/README.md) is the rendering reference its render script opens. The
README lists both examples.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'examples/spheres/test')
| -rw-r--r-- | examples/spheres/test/play.script | 58 |
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 |
