aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/snap-transition.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-08 12:11:45 +0200
committerThomas White <taw@physics.org>2023-04-09 09:21:24 +0200
commitec0e03a471a965291ac6fd24080bfb51904574c0 (patch)
tree89e5c99a51b02eca0da762bde2e85785d768a518 /guile/starlet/snap-transition.scm
parent94a6e132b20a22a96b4b4616ab1dfb966d5c5847 (diff)
New transition effect syntax
Instead of this: (cue 3 (lighting-state ...) (crossfade 3 5)) We now have this: (cue 3 (crossfade 3 5 (lighting-state ...))) This makes a simple snap blackout very succinct: (cue 6 (snap blackout))
Diffstat (limited to 'guile/starlet/snap-transition.scm')
-rw-r--r--guile/starlet/snap-transition.scm32
1 files changed, 15 insertions, 17 deletions
diff --git a/guile/starlet/snap-transition.scm b/guile/starlet/snap-transition.scm
index e658b73..46993cd 100644
--- a/guile/starlet/snap-transition.scm
+++ b/guile/starlet/snap-transition.scm
@@ -1,7 +1,7 @@
;;
;; starlet/snap-transition.scm
;;
-;; Copyright © 2021 Thomas White <taw@bitwiz.org.uk>
+;; Copyright © 2021-2023 Thomas White <taw@bitwiz.org.uk>
;;
;; This file is part of Starlet.
;;
@@ -19,11 +19,8 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;
(define-module (starlet snap-transition)
- #:use-module (oop goops)
- #:use-module (starlet playback)
+ #:use-module (starlet cue-part)
#:use-module (starlet state)
- #:use-module (starlet fixture)
- #:use-module (starlet transition-effect)
#:use-module (starlet attributes)
#:export (snap))
@@ -39,15 +36,16 @@
out-state))
-(define (snap)
- (make-transition
- (incoming-state current-state clock)
- (let ((overlay-state (blank-everything current-state)))
- (state-for-each
- (lambda (fix attr val)
- (set-in-state! overlay-state
- fix
- attr
- (lambda () val)))
- incoming-state)
- (values overlay-state 0))))
+(define (snap to-state)
+ (cue-part
+ to-state
+ (lambda (incoming-state current-state clock)
+ (let ((overlay-state (blank-everything current-state)))
+ (state-for-each
+ (lambda (fix attr val)
+ (set-in-state! overlay-state
+ fix
+ attr
+ (lambda () val)))
+ incoming-state)
+ (values overlay-state 0)))))