aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-30 17:15:45 +0200
committerThomas White <taw@physics.org>2020-08-30 17:15:45 +0200
commitc454bd5e208ebc8c9184e51d728b3c91ad117d4c (patch)
tree9871345ac4528fe24b00fc24ee5749f726d79372 /examples
parent75685e004887f9c07def4bef1db0a24e8693ab2e (diff)
(define-state a ...) -> (define a (lighting-state ...))
Diffstat (limited to 'examples')
-rw-r--r--examples/demo.scm52
1 files changed, 27 insertions, 25 deletions
diff --git a/examples/demo.scm b/examples/demo.scm
index 06ebcd0..359b99b 100644
--- a/examples/demo.scm
+++ b/examples/demo.scm
@@ -18,14 +18,14 @@
(make-midi-controller! #:channel 14
#:cc-number 19))
-(define-state worklight
+(register-state!
+ (lighting-state
(let ((fader-pos (lambda (time)
(get-controller-value working-light-fader))))
(at dim11 'intensity fader-pos)
(at dim12 'intensity fader-pos)
- (at dim13 'intensity fader-pos)))
+ (at dim13 'intensity fader-pos))))
-(register-state! worklight)
;; Same, for some different fixtures
@@ -34,44 +34,46 @@
(make-midi-controller! #:channel 14
#:cc-number 18))
-(define-state movers
+(register-state!
+ (lighting-state
(let ((fader-pos (lambda (time)
(get-controller-value movers-fader))))
(at mh1 'intensity fader-pos)
- (at mh2 'intensity fader-pos)))
-
-(register-state! movers)
+ (at mh2 'intensity fader-pos))))
(define pot1
(make-midi-controller! #:channel 14
#:cc-number 7))
-(define-state example-state-1
- ;; Front wash
- (at dim11 'intensity 50)
- (at dim12 'intensity 50)
- (at dim13 'intensity 50)
+(define example-state-1
+ (lighting-state
+
+ ;; Front wash
+ (at dim11 'intensity 50)
+ (at dim12 'intensity 50)
+ (at dim13 'intensity 50)
- ;; Sidelight
- (at dim7 'intensity (flash 2))
- (at dim8 'intensity 50)
+ ;; Sidelight
+ (at dim7 'intensity (flash 2))
+ (at dim8 'intensity 50)
- (at dim48 'intensity
- (lambda (a)
- (get-controller-value pot1))))
+ (at dim48 'intensity
+ (lambda (a)
+ (get-controller-value pot1)))))
-(define-state example-state-2
+(define example-state-2
+ (lighting-state
- ;; Front wash
- (at dim1 'intensity 10)
- (at dim2 'intensity 10)
- (at dim3 'intensity 10)
+ ;; Front wash
+ (at dim1 'intensity 10)
+ (at dim2 'intensity 10)
+ (at dim3 'intensity 10)
- ;; Sidelight
- (at dim7 'intensity (flash 5)))
+ ;; Sidelight
+ (at dim7 'intensity (flash 5))))
(define cue-list