     :background (color 0 255 0 200)
     :foreground (color 0 150 0)))
 
+(def ^{:private true} muted-entry-style
+  (style
+    :stroke 1.0
+    :background (color 150 255 150 200)
+    :foreground (color 0 150 0)))
+
 (def ^{:private true} current-step-style
   (style
     :stroke 1.0
     :background (color 128 128 224 200)
     :foreground (color 0 150 0)))
+
+(defn- scaled-entry-style
+  [n]
+  (let [g (int (+ (* n 200) 55))
+        bg (color 0 g 0 200)]
+    (update-style enabled-entry-style :background bg)))
+
+(defn- get-param-factor
+  [p-info val]
+  (let [{:keys [max min name default]} p-info
+        p-val (or ((keyword name) val)
+                  default)]
+    (double (/ (- p-val min) (- max min)))))
 
 (defn- paint-grid [state ^javax.swing.JComponent c g]
   (let [w    (width c)

                (for [i instruments]
                  (let [i-vals (or (get init-vals (:name i))
                                   (vec (repeat steps false)))]
                    {:inst i
                     :value i-vals})))
   })

(defn- toggle-playing [state]
  (update-in state [:playing?] not))

(defn- toggle-entry [state row col]
  (update-in state [:rows row :value col] not))

(defn- set-entry [state row col v]
  (if (< row (count (:rows state)))
    (assoc-in state [:rows row :value col] v)
    state))

(defn- get-entry [state row col]
  (get-in state [:rows row :value col]))

(defn- clear-row [state row]
  (assoc-in state [:rows row :value] (vec (repeat (:steps state) false))))

(defn- step-player
  [state-atom beat]

        [overtone.gui.control :only [synth-controller]]
        [seesaw core]
        [seesaw.color :only [color]]
        [seesaw.graphics :only [style update-style draw rounded-rect line]]
        [seesaw.mig :only [mig-panel]])
  (:require [seesaw.bind :as bind]))

(defn- make-initial-state [metro steps instruments init-vals]
