   [args spec prop]
   (partition 2 (interleave args (map #(get % prop) (:args spec)))))
 
-(defn- map-ugen-args 
+(defn- map-ugen-args
   "Perform any argument mappings that needs to be done."
   [spec args]
   (let [args-specs (args-with-specs args spec :map)]

; that is currently not yet implemented...
(defn- mul-add [in mul add]
  (with-meta {:id (next-id :ugen)
              :name "MulAdd" 
              :rate (or (:rate in) 2)
              :special 0
              :args [in mul add]}


(defn ugen? [obj] (= ::ugen (type obj)))

(defn- make-buffer-id 
  "Returns a function that converts any buffer arguments to their :id property value."
  [fun]
  (fn [& args]
    (apply fun (map #(if (overtone.core.sc/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
      (make-expanding (ugen-base-fn spec rate special) expand-flags))))

;; TODO: Figure out the complete list of control types
;; This is used to determine the controls we list in the synthdef, so we need
