Files
test/sexp_effects/effects/strobe.sexp
gilesb 406cc7c0c7 Initial commit: video effects processing system
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>
2026-01-19 12:34:45 +00:00

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)))