         rhyvals (remove-circle id :beats)
         len (get-in @melody-map [id :beats])
         idprefix (s/join ["#kb-" id "-rhy-"])
-        kwlist (vec (map #(keyword (s/join [idprefix (str %)])) (range len)))]
+        kwlist (vec (map #(keyword (s/join [idprefix (str %)])) (range len)))
+        transtag (keyword (s/join ["#kb-" id "-mel-translate"]))
+        transbut (select root [transtag])]
     (remove-circle id :pitches)
     (swap! melody-map assoc-in [id :pitches] newnum)
     (config! panel :items (concat (make-note-circle-mel id) (make-note-circle-rhy id)))
     (doseq [kw kwlist]
       (value! (select panel [kw]) (get rhyvals kw)))
-    ))
+    (config! transbut :model (range newnum))))
         
 (defn change-circle-rhy [id newnum]
   (let [root (get-in @melody-map [id :root])

        melvals (remove-circle id :pitches)
        len (get-in @melody-map [id :pitches])
        idprefix (s/join ["#kb-" id "-mel-"])
        kwlist (vec (map #(keyword (s/join [idprefix (str %)])) (range len)))]
    (remove-circle id :beats)
    (swap! melody-map assoc-in [id :beats] newnum)
    (config! panel :items (concat (make-note-circle-mel id) (make-note-circle-rhy id)))
    (doseq [kw kwlist]
      (value! (select panel [kw]) (get melvals kw)))
    ))
        
(defn make-panel-controls [id]
  (let [cbp (combobox :model (range 1 10)
                      :id (keyword (s/join ["kb-" (str id) "-numpitch"]))

                 :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])
