       (let [elapsed (or (:elapsed event) 0.0)]
         (cond->
           (assoc this
-               :bands (mapv (fn [p] (* p (ctl/bound [0.0 1.0] (- 1.0 (* falloff elapsed))))) bands)
+               :bands (mapv #(apply-decay % elapsed decay) bands)
                :rotation (sphere/wrap-angle (+ rotation (* elapsed (/ rotation-rate 1000))))
                :color-shift (ctl/wrap [0.0 1.0] (+ color-shift (* elapsed (/ shift-rate 1000)))))
           (compare-and-set! log-next? true false)

;; - As time passes, rotate the angular offset of slices in physical space.
;; - As time passes, rotate the offset into the rainbow for each slice.
;; - Maintain a rolling average of the power in a particular frequency. Power
;; decay is controlled by `falloff` parameter.
;; - Adjust the gain per segment based on recently observed history to try to
;; keep values normalized.
;;


      [:audio/freq nil]
      (assoc this
             :bands (mapv #(update-energy %1 %2 smoothing)
                          bands (:spectrum event)))

      [:button/press :A]
      (do (reset! log-next? true)
          this)

      ; TODO: add controls for adjusting gain, decay, rotation-rate, shift-rate

      ; default
      this))
