              (fn [args]
                (map #(if (buffer? %) (:id %) %) args))))
 
+(defn- bus->id
+  "Returns a function that converts any bus arguments to their :id property
+  value."
+  [ugen]
+  (update-in ugen [:args]
+             (fn [args]
+               (map #(if (bus? %) (:id %) %) args))))
+
 (defn- with-init-fn
   "Creates the final argument initialization function which is applied to
   arguments at runtime to do things like re-ordering and automatic filling in

   clojure.contrib.pprint
   overtone.sc.ugen.defaults
   [overtone util]
   [overtone.sc buffer]
   [overtone.sc.ugen special-ops common categories]
   [clojure.contrib.types :only (deftype)]
   [clojure.contrib.generic :only (root-type)])

     ~@body))

(load "ugen/extra")
