         controls (make-panel-controls id)
         playsolo (button :text "Play Solo"
                          :listen [:action #(play-solo id %)])
+        chinstr (combobox :model (cons "Default" instruments)
+                          :text "Instrument:"
+                          :id (keyword (s/join ["kb-" (str id) "-instr"]))
+                          :listen [:action #(inst-chooser-part id %)])
         f (frame :title (s/join ["Tune " (str id)])
                  :id (s/join ["frame-" (str id)])
                  :listen [:window-closing
                           (fn [e]
                             (swap! melody-map dissoc id))])
-        verticalpanel (vertical-panel :items [pan playsolo controls])
+        verticalpanel (vertical-panel :items [pan chinstr playsolo controls])
         numcbs 1]
-    (swap! melody-map assoc id {:pitches numcbs, :beats numcbs, :root f})
+    (swap! melody-map assoc id {:pitches numcbs, :beats numcbs,
+                                :root f, :instr "Default"})
     (add-note-circles id pan)
     (config! f :content verticalpanel)
     (-> f pack! show!)

   gate 1]
  (let [osc-bank-1 [(o/saw freq) (o/sin-osc freq) (o/pulse freq)]
        osc-bank-2 [(o/saw freq) (o/sin-osc freq) (o/pulse freq)]
        amp-env    (o/env-gen (o/adsr attack decay sustain release) gate :action o/FREE)
        f-env      (o/env-gen (o/adsr fattack fdecay fsustain frelease) gate)
        s1         (* osc1-level (o/select osc1 osc-bank-1))
        s2         (* osc2-level (o/select osc2 osc-bank-2))
        filt       (o/moog-ff (+ s1 s2) (* cutoff f-env) 3)]
    (* amp filt)))

(def inst-cur flute)

(defn play-test-tone [e]
  (inst-cur 440))

(defn kill-tones [e]
  (o/clear))

        partrepeats (map #(/ totaltime %) times)
        score (atom '())]
    (doseq [i (range len)]
      (let [thispart (nth parts i)
            thisinstr (nth thispart 3)
            thisrepeats (nth partrepeats i)
            rhythm (apply concat (repeat thisrepeats (second thispart)))
            melodyseq (apply concat (repeat thisrepeats (first thispart)))
            notes (map str->midi melodyseq)
            part (cons thisinstr (map vector notes rhythm))]
        (swap! score conj part)))
    @score))

