                    (cond
                     (= n-channels 1) (apply mono-player id pargs)
                     (= n-channels 2) (apply stereo-player id pargs))))]
-    (callable-map (merge {:player player} s)
-                  player)))
+    (with-meta
+      (callable-map s player)
+      {:type ::playable-sample})))
 
 (defmethod buffer-id ::sample [sample] (:id sample))
 

;; Samples are just audio files loaded into a buffer, so buffer
;; functions work on samples too.
(derive ::sample :overtone.sc.buffer/buffer)

(defn sample
  "Loads a wave file into a memory buffer. Returns a function capable
   of playing that sample.

   ; e.g.
   (sample \"/Users/sam/music/samples/flibble.wav\")

  "
  [path & args]

(defn load-samples
  "Takes a directoy path or glob path (see #'overtone.helpers.file/glob) and
  loads up all matching samples and returns a seq of maps representing
  information for each loaded sample (see load-sample). Samples should be in
  .aiff or .wav format."
  [& path-glob]
  (let [path  (apply mk-path path-glob)
        path  (resolve-tilde-path path)
