- Add stream_sexp_generic.py: fully generic sexp interpreter - Add streaming primitives for video sources and audio analysis - Add config system for external sources and audio files - Add templates for reusable scans and macros - Fix video/audio stream mapping in file output - Add dynamic source cycling based on sources array length - Remove old Python effect files (migrated to sexp) - Update sexp effects to use namespaced primitives Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
935 B
Common Lisp
29 lines
935 B
Common Lisp
;; Oscillating Spin Scan
|
|
;;
|
|
;; Accumulates rotation angle on each beat, reversing direction
|
|
;; periodically for an oscillating effect.
|
|
;;
|
|
;; Required context:
|
|
;; - music: audio analyzer from (streaming:make-audio-analyzer ...)
|
|
;;
|
|
;; Provides scan: spin
|
|
;; Bind with: (bind spin :angle) ;; cumulative rotation angle
|
|
;;
|
|
;; Behavior:
|
|
;; - Rotates 14.4 degrees per beat (completes 360 in 25 beats)
|
|
;; - After 20-30 beats, reverses direction
|
|
;; - Creates a swinging/oscillating rotation effect
|
|
;;
|
|
;; Usage:
|
|
;; (include :path "../templates/scan-oscillating-spin.sexp")
|
|
;;
|
|
;; In frame:
|
|
;; (rotate frame :angle (bind spin :angle))
|
|
|
|
(scan spin (streaming:audio-beat music t)
|
|
:init {:angle 0 :dir 1 :left 25}
|
|
:step (if (> left 0)
|
|
(dict :angle (+ angle (* dir 14.4)) :dir dir :left (- left 1))
|
|
(dict :angle angle :dir (* dir -1)
|
|
:left (+ 20 (mod (streaming:audio-beat-count music t) 11)))))
|