 
 (if (not (o/server-connected?))
   (o/boot-external-server))
+  ;(o/connect-external-server 60106))
 
 (require '[overtone.inst.synth :as syn])
 

        part (map vector notes rhy)]
    (play (o/metronome @tempo) (str->instr instr) part {:midi true})))  
    
(defn remove-circle [id kw]
  (let [len (get-in @melody-map [id kw])
        kwstring (case kw
                   :pitches "-mel-"
                   :beats   "-rhy-")
        idprefix (s/join ["#kb-" id kwstring])
        idlist (vec (map #(keyword (s/join [idprefix (str %)])) (range len)))
        root (get-in @melody-map [id :root])
        panel (select root [:#kb])
        circhash (atom {})]
    ;(println idlist)
    (doseq [k idlist]
      (let [w (select panel [k])]
        (swap! circhash assoc k (value w))
        (remove! panel w)))
    @circhash))

(defn change-circle-mel [id newnum]
  (let [root (get-in @melody-map [id :root])

                 :listen [:window-closing
                          (fn [e]
                            (swap! melody-map dissoc id))])
        numcbs 1]
    (swap! melody-map assoc id {:pitches numcbs, :beats numcbs,
                                :root f, :instr "Default"})
    (add-note-circles id pan)
    (let [mel-controls (make-transform-panel id :pitches)
          rhy-controls (make-transform-panel id :beats)
          verticalpanel (vertical-panel :items [mel-controls pan rhy-controls
                                                chinstr playsolo controls])]
      (config! f :content verticalpanel)
      (-> f pack! show!)
      f)))

(defn make-circles-hash [id]
  (let [root (get-in @melody-map [id :root])
