     (let [[_ polar azimuth] (:sphere pixel)
           [i1 i2 p] (azimuth->bands (count bands) (+ azimuth rotation))
           hue-index (/ (+ i1 p) (count bands))
-          energy (+ (* (nth bands i1) (- 1 p))
-                    (* (nth bands i2) p))
-          polar-max (* 1/6 tau)
+          energy (+ (* (:energy (nth bands i1)) (- 1 p))
+                    (* (:energy (nth bands i2)) p))
+          polar-max (* 1/5 tau)
           transition-point (* polar-max (- 1 (Math/exp (- energy))))
-          transition-width (/ tau 16)
+          transition-width (* 1/16 tau)
           brightness (cond
                        (< polar (- transition-point transition-width))
                          1.0

;; - 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.
;;

     (- angle-div low-band)]))


(defrecord TunesMode
  [bands          ; Average energy per band
   gain           ; Gain per band (static for now)
   decay          ; How quickly energy levels decay (frac/s)
   smoothing      ; Proportion to smooth input samples by (fraction of old average to keep)
   rotation       ; How much to rotate each band spatially
   rotation-rate  ; How fast the rotation changes over time
