From d17f43f19ce12e41ec054c29a0196a97f0de9684 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Wed, 25 Nov 2015 15:42:42 -0600 Subject: [PATCH] Fix compilation problem. Can't create step parameter without default show or explicit metronome. --- src/afterglow/examples.clj | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/afterglow/examples.clj b/src/afterglow/examples.clj index 06ed51e9..29bf1caf 100644 --- a/src/afterglow/examples.clj +++ b/src/afterglow/examples.clj @@ -345,10 +345,10 @@ (cues/function-cue :snowball-sound :sound-active (show/fixtures-named "snowball") :color :cyan))) -(def step-param - "A step parameter for controlling example chase cuse. Redefine it to - experiment with other kinds of timing and fades." - (params/build-step-param :fade-fraction 0.3 :fade-curve :sine)) +(defonce ^{:doc "A step parameter for controlling example chase cues. + Change it to experiment with other kinds of timing and fades."} + step-param + (atom nil)) (defn make-cues "Create a bunch of example cues for experimentation." @@ -825,6 +825,9 @@ :variables [{:key "position" :min -0.5 :max 10.5 :start 0.0 :name "Position"}] :color :purple)) + ;; Set up an initial value for our step parameter + (reset! step-param (params/build-step-param :fade-fraction 0.3 :fade-curve :sine)) + (ct/set-cue! (:cue-grid *show*) 1 13 (cues/cue :chase (fn [var-map] @@ -833,7 +836,7 @@ (global-color-effect :green :lights (show/fixtures-named "blade")) (global-color-effect :blue :lights (show/fixtures-named "hex")) (global-color-effect :white :lights (show/all-fixtures))] - step-param :beyond :loop)) + @step-param :beyond :loop)) :color :magenta)) ;; Some compound cues