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>
This commit is contained in:
21
constructs/beat-alternate.sexp
Normal file
21
constructs/beat-alternate.sexp
Normal file
@@ -0,0 +1,21 @@
|
||||
;; beat-alternate construct
|
||||
;; Alternates between sources on each beat
|
||||
;;
|
||||
;; Usage in recipe:
|
||||
;; (construct beat-alternate :path "constructs/beat-alternate.sexp")
|
||||
;; (def segments (beat-alternate beats-data (list video-a video-b)))
|
||||
|
||||
(define-construct beat-alternate
|
||||
"Alternate between sources on each beat"
|
||||
(analysis sources)
|
||||
;; Body: map over time pairs, return segment descriptors
|
||||
(let [times (get analysis :times)
|
||||
pairs (zip-pairs (cons 0 times))
|
||||
n-sources (len sources)]
|
||||
(map-indexed
|
||||
(fn [i pair]
|
||||
(dict :source (nth sources (mod i n-sources))
|
||||
:start (first pair)
|
||||
:end (nth pair 1)
|
||||
:effects (list)))
|
||||
pairs)))
|
||||
Reference in New Issue
Block a user