diff options
author | Thomas White <taw@physics.org> | 2020-08-21 22:13:26 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-08-21 22:17:49 +0200 |
commit | 1a9ebe6735b7dab8784ce1aa9dc8eb0f4e3c24a4 (patch) | |
tree | a9a7ba111563d8b0a450ae8a4531a94b0ca9765b /examples | |
parent | 7057172ad190ae0fc718a93a7adb07b826dee323 (diff) |
Add 'at' macro
Diffstat (limited to 'examples')
-rw-r--r-- | examples/demo.scm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/examples/demo.scm b/examples/demo.scm index 315ada4..1dbc783 100644 --- a/examples/demo.scm +++ b/examples/demo.scm @@ -21,9 +21,9 @@ (define-state worklight (let ((fader-pos (lambda () (get-controller-value working-light-fader)))) - (set-attr! (current-state) dim11 'intensity (fader-pos)) - (set-attr! (current-state) dim12 'intensity (fader-pos)) - (set-attr! (current-state) dim13 'intensity (fader-pos)))) + (at dim11 'intensity (fader-pos)) + (at dim12 'intensity (fader-pos)) + (at dim13 'intensity (fader-pos)))) (register-state! worklight) @@ -37,8 +37,8 @@ (define-state movers (let ((fader-pos (lambda () (get-controller-value movers-fader)))) - (set-attr! (current-state) mh1 'intensity (fader-pos)) - (set-attr! (current-state) mh2 'intensity (fader-pos)))) + (at mh1 'intensity (fader-pos)) + (at mh2 'intensity (fader-pos)))) (register-state! movers) @@ -50,15 +50,15 @@ (define-state example-state-1 ;; Front wash - (set-attr! (current-state) dim11 'intensity 50) - (set-attr! (current-state) dim12 'intensity 50) - (set-attr! (current-state) dim13 'intensity 50) + (at dim11 'intensity 50) + (at dim12 'intensity 50) + (at dim13 'intensity 50) ;; Sidelight - (set-attr! (current-state) dim7 'intensity (flash 2)) - (set-attr! (current-state) dim8 'intensity 50) + (at dim7 'intensity (flash 2)) + (at dim8 'intensity 50) - (set-attr! (current-state) dim48 'intensity + (at dim48 'intensity (lambda (a) (get-controller-value pot1)))) @@ -66,12 +66,12 @@ (define-state example-state-2 ;; Front wash - (set-attr! (current-state) dim1 'intensity 10) - (set-attr! (current-state) dim2 'intensity 10) - (set-attr! (current-state) dim3 'intensity 10) + (at dim1 'intensity 10) + (at dim2 'intensity 10) + (at dim3 'intensity 10) ;; Sidelight - (set-attr! (current-state) dim7 'intensity (flash 5))) + (at dim7 'intensity (flash 5))) (define cue-list |