aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/playback.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-06-06 18:44:10 +0200
committerThomas White <taw@physics.org>2022-06-06 18:44:10 +0200
commitf1906c3e41a66e89b51d5c3947790bef030a3476 (patch)
tree0abf486a9af3bb4a964587327c36837e106fe2df /guile/starlet/playback.scm
parentb3d3bc0dff448514d172020e25227f5a1c1ef14e (diff)
run-cue-index!: Add an implicit transitiom to 0/no-value for values in playback
Diffstat (limited to 'guile/starlet/playback.scm')
-rw-r--r--guile/starlet/playback.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/guile/starlet/playback.scm b/guile/starlet/playback.scm
index f9ed25d..732be51 100644
--- a/guile/starlet/playback.scm
+++ b/guile/starlet/playback.scm
@@ -243,12 +243,36 @@
'next-cue-unspecified))
+(define (blank-everything state)
+ (state-map
+ (lambda (fix attr val)
+ (if (intensity? attr)
+ 0.0
+ 'no-value))
+ state))
+
+
(define (run-cue-index! pb cue-index)
(let* ((the-cue (vector-ref (get-playback-cue-list pb) cue-index))
(overlay-state (make-empty-state))
(cue-clock (get-cue-clock the-cue))
(fade-time 0))
+ ;; Start by fading the previous contents of the playback down, using the
+ ;; "main" transition effect
+ (receive
+ (overlay-part transition-time)
+ ((transition-func (get-cue-part-transition
+ (car (get-cue-parts the-cue))))
+ (blank-everything pb)
+ pb
+ cue-clock)
+ (atomically-overlay-state!
+ overlay-state
+ overlay-part)
+ (set! fade-time transition-time))
+
+ ;; Stack all the cue parts on top
(for-each
(lambda (part)
(receive