   (log/debug "Connecting to internal SuperCollider server")
   (let [send-fn (fn [peer-obj buffer]
                   (scsynth-send @sc-world* buffer))
-        peer (assoc (osc-peer false false) :send-fn send-fn)]
+        peer    (assoc (osc-peer false false) :send-fn send-fn)]
     (dosync (ref-set server-osc-peer* peer))
     (setup-connect-handlers)
     (server-snd "/status")))

  [args]
  (when (not= 1 (:realtime? args))
    (throw (Exception. "Non-realtime server mode not currently supported. Patches accepted - please contact the mailing list.")))
  (let [udp?             (:udp? args)
        port             (:port args)
        ugens-paths      (or (:ugens-paths args) [])
        args             (select-keys args (keys SC-ARG-INFO))
        args             (dissoc args :udp? :port :realtime? :nrt-cmd-filename :nrt-output-filename :nrt-output-header-format :nrt-output-sample-format)
        port-arg         (if (= 1 udp?)
                           ["-u" port]
                           ["-t" port])
        ugens-paths      (map resolve-tilde-path ugens-paths)
        ugens-paths      (filter dir-exists? ugens-paths)
        ugens-paths      (apply str (interpose ":" ugens-paths))
        args             (if (empty? ugens-paths)
                           (dissoc args :ugens-paths)
                           (assoc args :ugens-paths ugens-paths))
        arg-list         (reduce
                          (fn [res [flag val]] (if val
                                                (concat res [(find-sc-arg-flag! flag) val])
                                                res))
                          []
                          args)]
    (map str (concat port-arg arg-list))))

(defn- sc-command

  "Pull audio server log data from a pipe and store for later printing."
  [stream read-buf]
  (while (pos? (.available stream))
    (let [n   (min (count read-buf) (.available stream))
          _   (.read stream read-buf 0 n)
          msg (String. read-buf 0 n)]
      (swap! external-server-log* conj msg)
      (log/info (String. read-buf 0 n)))))
