      [:h1 "Pianola"]
      [slider :tempo tempo 20 160]
      [:p (str tempo " BPM")]
+     [selector :scale scale (keys scales)]
+     [:p "Scale"]
      [notation automaton]
      [notation seed]
      [playback-toggle]]))
 
 (defn reload []
-  (println "reloading")
   (r/render [app app-state]
             (.getElementById js/document "pianola")))
 

   (synth/percussive 0.01 0.4)
   (synth/gain 0.1)))

(defonce initial-automaton
  [[0.25 0.125 0.5 0.25 0.125 0.5 0.5]
   [1 2 0 4 5 6 3]])

           :on-change (fn [e]
                        (swap! app-state assoc param (.-target.value e)))}])

(defn selector [param value options]
  [:select {:value value
            :on-change (fn [e]
                         (swap! app-state assoc param (keyword (.-target.value e))))}
   (map (fn [v] [:option {:key v :value v} (str v)]) options)])


(defn playback-toggle []
  (let [playing (:playing @app-state)]
    [:button {:on-click (fn [e]
