 (defn- inst-button
   [inst]
   (button :text (:name inst)
-          :listen [:action (fn [e] (synth-controller inst))]))
-
-(defn- inst-param
-  [inst]
-  (combobox :model (map :name (:params inst))
-            :class :param))
-
-(defn- inst-mute
-  [inst]
-  (toggle :text "Mute" :class :mute))
-
-(defn- inst-solo
-  [inst]
-  (toggle :text "Solo" :class :solo))
+          :listen [:action (fn [_] (synth-controller inst))]))
 
 (defn- inst-panel
   [state-atom inst]
-  (let [panel (mig-panel :constraints ["wrap 2"
-                                       "grow"]
-                         :items [[(inst-button inst) "span, growx"]
-                                 [(inst-param  inst) "span, growx"]
-                                 [(inst-mute   inst) "growx"]
-                                 [(inst-solo   inst) "growx"]])]
-    (listen (select panel [:.param])
-            :selection #(swap! state-atom on-param-selection inst %))
-    (listen (select panel [:.mute])
-            :selection #(swap! state-atom on-mute-toggle inst %))
-    (listen (select panel [:.solo])
-            :selection #(swap! state-atom on-solo-toggle inst %))
-
-    panel))
+  (inst-button inst))
 
 (defn step-sequencer
   [metro steps instruments & [init-vals]]
   (invoke-now
     (let [state-atom   (atom (make-initial-state metro steps instruments init-vals))
-          play-btn     (button :text "play")
+          play-btn     (button :text "Play")
           bpm-spinner  (spinner :model (spinner-model (metro :bpm) :from 1 :to 10000 :by 1)
                                 :maximum-size [60 :by 100])
-          controls-btn (button :text "controls")
+          controls-btn (button :text "Controls" :tip "Show controls for all insts")
+          plus-btn     (button :text "+" :tip "Add a column")
+          minus-btn    (button :text "-" :tip "Remove a column")
           control-pane (toolbar :floatable? false
-                                :items [play-btn
-                                        :separator
-                                        bpm-spinner
-                                        [:fill-h 5]
-                                        "bpm"
-                                        :separator
-                                        controls-btn])
+                                :items [play-btn    [:fill-h 5]
+                                        bpm-spinner [:fill-h 5] "bpm"])
           grid         (step-grid state-atom)
           inst-panels  (map (partial inst-panel state-atom)
                             instruments)

    :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)
        h    (height c)
        rows (count (:rows state))

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

(defn- make-initial-state [metro steps instruments init-vals]
  {:playing?  false
   :metronome metro
   :steps     steps
