 ;; functions should work on samples.
 (derive ::sample ::buffer)
 
-(defn buffer-data 
+(defn buffer-data
   "Get the floating point data for a buffer on the internal server."
   [buf]
-  (let [buf-id (cond 
+  (let [buf-id (cond
                  (buffer? buf) (:id buf)
                  (sample? buf) (:id (:buf buf)))
         snd-buf (ScJnaCopySndBuf @world* buf-id)

; TODO: setup an error-handler in the case that we can't connect to the server
(defn connect
  "Connect to an external SC audio server on the specified host and port."
  ([] 
   (connect :internal))
  ([which & [host port]] 
   (cond 
     (= :internal which) (connect-internal)
     (= :external which) (.run (Thread. #(connect-thread-external host port))))))



(def server-log* (ref []))

(defn server-log
  "Print the server log."
  []
  (doseq [msg @server-log*]
