 (defrecord ControlProxy [name value rate])
 (derive ControlProxy ::ugen)
 
-(defn control-proxy 
+(defn control-proxy
   [name value]
   (ControlProxy. name value (:kr RATES)))
 

    (ugen spec rate special args)))

(defn- make-buffer-id
  "Returns a function that converts any buffer arguments to their :id property value."
  [fun]
  (fn [& args]
    (apply fun (map #(if (buffer? %) (:id %) %) args))))

(defn- make-ugen-fn
  "Returns a function representing the given ugen that will fill in default arguments, rates, etc."
  [spec rate special]
  (let [expand-flags (map #(:expands? %) (:args spec))]
    (make-buffer-id

  (.replaceAll (.toLowerCase (str n)) "[-|_]" ""))

(defn overtone-ugen-name
  "A basic camelCase to with-dash name converter tuned to convert SuperCollider
  names to Overtone names. Most likely needs improvement."
  [n]
  (let [n (.replaceAll n "([a-z])([A-Z])" "$1-$2")
        n (.replaceAll n "([A-Z])([A-Z][a-z])" "$1-$2")
