         (set! *data* new-data)
         {:synth sname
          :controls ctls})
-      (do 
+      (do
         (set! *data* (next *data*))
         {:synth sname}))))
 
 (defn- parse-node-tree-helper [ctls?]
   (let [[id n-children & new-data] *data*]
     (set! *data* new-data)
-    (cond 
+    (cond
       (neg? n-children) (parse-synth-tree ctls?) ; synth
       (= 0 n-children) {:group id :children nil}
-      (pos? n-children) 
+      (pos? n-children)
       {:group id
        :children (doall (map (fn [i] (parse-node-tree-helper ctls?)) (range n-children)))})))
 

                 (sample? synth) synth
                 (keyword? synth) (name synth)
                 (string? synth) synth
                 :default (throw 
                            (Exception. "Hit doesn't know how to play the given synth: " synth)))
         args (-> args (stringify) (floatify))]
     (if (sample? synth)

(defmacro defcounter [counter-name start-id]
  (let [next-fn (symbol (str "next-" (name counter-name) "-id"))]
    `(do
       (dosync
         (alter *counters assoc ~counter-name (ref ~start-id))
         (alter *counter-defaults assoc ~counter-name ~start-id))
       (defn ~next-fn []
         (dec
           (dosync (alter (~counter-name @*counters) inc)))))))

(defn reset-id-counters []
  (doseq [[cname counter] @*counters]
    (dosync
    (ref-set counter (cname @*counter-defaults)))))

(defcounter :group START-GROUP-ID)
