     (let [graphics (create-graphics controller)
           bpm (double (:bpm snapshot))
           bpm-string (format "%.1f" bpm)
+          bpm-range (- controllers/maximum-bpm controllers/minimum-bpm)
           label (java.text.AttributedString. bpm-string)]
       (set-graphics-color graphics metronome-background)
       (.fillRect graphics button-cell-width 21 button-cell-width 20)

  "Handle a pitch bend change while an encoder associated with a
  variable is being adjusted in the effect list."
  [controller message cue v effect-id]
  (let [value (or (cues/get-cue-variable cue v :show (:show controller) :when-id effect-id) 0)
        full-range (- (:max v) (:min v))
        fraction (/ (+ (* (:data2 message) 128) (:data1 message)) 16383)
        adjusted (double (+ (:min v) (* fraction full-range)))
        raw-resolution (/ full-range 200)

                     ;; They released us, end the overlay.
                     :done))
                 (handle-aftertouch [this message])
                 (handle-pitch-bend [this message]
                   (let [full-range (- controllers/maximum-bpm controllers/minimum-bpm)
                         fraction (/ (+ (* (:data2 message) 128) (:data1 message)) 16383)
                         adjusted (double (+ controllers/minimum-bpm (* fraction full-range)))
                         resolution 0.1
                         normalized (double (* (Math/round (/ adjusted resolution)) resolution))]
                     (with-show (:show controller)
                       (when (= (:type (show/sync-status)) :manual)
                         (rhythm/metro-bpm (:metronome (:show controller)) normalized))))))))

(defn- beat-adjusting-interface
  "Brighten the section of the beat which is being adjusted."
