Add S-expression based video effects pipeline with modular effect definitions, constructs, and recipe files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15 lines
455 B
Common Lisp
15 lines
455 B
Common Lisp
;; Strobe effect - holds frames for choppy look
|
|
;; @param frame_rate float [1, 60] default 12
|
|
|
|
(define-effect strobe
|
|
((frame_rate 12))
|
|
(let* ((held (state-get 'held nil))
|
|
(held-until (state-get 'held-until 0))
|
|
(frame-duration (/ 1 frame_rate)))
|
|
(if (or (= held nil) (>= t held-until))
|
|
(begin
|
|
(state-set 'held (copy frame))
|
|
(state-set 'held-until (+ t frame-duration))
|
|
frame)
|
|
held)))
|