aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-11-12 11:13:53 +0100
committerThomas White <taw@physics.org>2022-11-12 11:37:03 +0100
commit5a02170f9e1952cd335b6b097e8ce33de7bb35b1 (patch)
treeca21feda4181e444e10e11ce863cc017c69461e7 /README.md
parentf99311300912814ccaf4fdd6b3c753d1206e024c (diff)
Introduce new type for attribute names
There's a serious problem with the design so far, where symbols are used for attribute names (intensity, strobe, colour etc), and also for attribute values (on, off, random etc). There's no way for 'at' to tell the difference between the two. For example, this form is ambiguous: (at myfixture 'strobe 'on) This commit introduces a new class, <starlet-attribute>, to replace the use of symbols here. The attributes are enumerated in (starlet attributes), and new ones can be added later. The attribute objects remember their 'canonical' names, to allow states to be printed. Apart from solving the ambiguity problem, this has two further advantages. First, attribute names no longer need to be quoted everywhere. Second, multiple names can be used to refer to the same attribute. For example: (define color colour).
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 8761b35..8c28054 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,7 @@ Lighting fixtures are referred to by names, rather than numbers:
;; Turn on both moving lights and set colour
(at moverL moverR 60)
-(at moverL moverR 'colour (rgb 45 10 0))
+(at moverL moverR colour (rgb 45 10 0))
```
The fixture names are normal Scheme variables. You can do usual things such
@@ -70,9 +70,9 @@ with a variable name:
(at footlights 100)
(at front-wash 100)
(at moverL moverR 100)
- (at moverL moverR 'tilt 45)
- (at moverL 'pan -15)
- (at moverR 'pan 15)))
+ (at moverL moverR tilt 45)
+ (at moverL pan -15)
+ (at moverR pan 15)))
```
A cue is formed by associating a lighting state with a *transition effect*,
@@ -98,7 +98,7 @@ of cues:
;; Act 1, Scene 1
(lighting-state
(at front-wash 80)
- (at moverL 'colour (cmy 25 0 0)))
+ (at moverL colour (cmy 25 0 0)))
(at moverL 25)
(crossfade 3))