aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-09 16:48:40 +0200
committerThomas White <taw@physics.org>2023-04-09 16:54:32 +0200
commit4cba109a73fd00ee2ae91649b5f84663454b678e (patch)
treeaaccd800cf93fb107827ba5469de85f0147c3317
parent31bf264191d69b7a05e40c749088cca63a5d9c38 (diff)
Fuss over documentation
-rw-r--r--docs/basic-control.rst25
-rw-r--r--docs/patching.rst4
2 files changed, 21 insertions, 8 deletions
diff --git a/docs/basic-control.rst b/docs/basic-control.rst
index dea5ece..3c4654c 100644
--- a/docs/basic-control.rst
+++ b/docs/basic-control.rst
@@ -18,7 +18,7 @@ The available parameters are determined by the fixture definition (see
(at my-moving-light tilt 70)
(at my-moving-light zoom 60)
-Not all fixtures accept a single number. For example, ``'colour`` takes a
+Not all fixtures accept a single number. For example, ``colour`` takes a
colour object, which can be constructed using ``rgb`` or ``cmy``. Starlet (or
rather, the fixture definition code) is responsible for converting the colour
to the native representation used by the fixture::
@@ -49,8 +49,8 @@ fixture name each time by using the selection. To select a fixture, call
(sel all-spots my-moving-light)
If the fixture name is left out from subsequent calls to ``at``, they will
-apply to the currently selected fixture(s). To clear the selection, simply
-call ``(sel #f)`` or simply ``(sel)``::
+apply to the currently selected fixture(s). To clear the selection, use
+``(sel #f)`` or simply ``(sel)``::
(sel my-moving-light)
(at 100)
@@ -75,12 +75,25 @@ state. You can examine the contents using ``state-source``, which returns
the Scheme code corresponding to the state's contents::
(state-source programmer-state)
+ scheme@(guile-user)> (state-source programmer-state)
+ $6 = (lighting-state (at ledLL colour (cmy 77.0 100.0 100.0)) (at ledRR colour (cmy 77.0 100.0 100.0)) (at washR intensity 85) (at washL intensity 85) (at ledLL intensity 40) (at ledRR intensity 40) (at washM intensity 85))
+ scheme@(guile-user)>
You can also use ``print-state``, which just pretty-prints the output of
``state-source``. To reduce typing, you can use ``ps`` as a synonym for
``programmer-state``::
(print-state ps)
+ scheme@(guile-user)> (print-state ps)
+ (lighting-state
+ (at ledLL colour (cmy 77.0 100.0 100.0))
+ (at ledRR colour (cmy 77.0 100.0 100.0))
+ (at washR intensity 85)
+ (at washL intensity 85)
+ (at ledLL intensity 40)
+ (at ledRR intensity 40)
+ (at washM intensity 85))
+ scheme@(guile-user)>
You can construct new states by wrapping your ``at`` forms inside
``lighting-state``. These state objects can be used inside cue lists
@@ -128,8 +141,8 @@ function, for example::
(* 50
(+ 1 (sin (* 2 (elapsed-time clock))))))))
-That's obvious quite complicated, so use the functions in module ``(starlet
-effects)`` instead. For a sine wave once every 2 seconds (0.5 Hz) ranging
-between zero and 100%::
+That's obvious quite complicated, so use the functions in module
+``(starlet effects)`` instead. For a sine wave once every 2 seconds (0.5 Hz)
+ranging between zero and 100%::
(at washM (sinewave 0.5 0 100))
diff --git a/docs/patching.rst b/docs/patching.rst
index 37c2f2e..ca3afdd 100644
--- a/docs/patching.rst
+++ b/docs/patching.rst
@@ -3,12 +3,12 @@ Patching fixtures
=================
To make Starlet aware of a lighting fixture (in theatrical parlance, to "patch"
-a fixture), use ``patch-fixture!`` from module ``(starlet scanout)``. You will
+a fixture), use ``patch-fixture!`` from module ``(starlet engine)``. You will
need to import the fixture definition from the fixture library. For example,
to patch a simple dimmer with DMX address 32 on universe 4::
(use-modules
- (starlet scanout)
+ (starlet engine)
(starlet fixture-library generic dimmer))
(patch-fixture! my-dimmer <generic-dimmer> 32 #:universe 4)