                            (button :id :newPanel
                                    :text "New Panel"
                                    :listen [:action new-panel])
+                           (button :id :monoChord
+                                   :text "Monochord"
+                                   :listen [:action new-mono])
                            (button :id :saveButt
                                    :text "Save"
                                    :listen [:action save-pattern])

        (swap! score conj part)))
    [@score, totaltime]))

(defn play-melody [e]
  (let [[score len] (if @melody
                      [@melody 20]
                      (make-score))
        metro (o/metronome @tempo)
        endseq (atom '())]
    (doseq [[instr & part] score]
      (play metro (str->instr instr) part {:midi true}))
    (o/apply-at (metro len) #(if @repetition (play-melody nil)))

                                     :listen [:action melody-chooser])
                           ])))

;(config! control-frame :on-close :exit)

(defn -main [& args]
  (-> control-frame pack! show!)
