 
 (def N-RETRIES 20)
 
+(declare reset)
+
 (defn- connect-internal
   []
   (log/debug "Connecting to internal SuperCollider server")

        #(do
           (dosync (ref-set status* :connected))
           (notify true) ; turn on notifications now that we can communicate
           (event :connected)
           :done))


  (snd "/d_recv" (synthdef-bytes (synthdef-read path))))

; TODO: need to clear all the buffers and busses
;  * Think about a sane policy for setting up state, especially when we are connected
; with many peers on one or more servers...
(defn reset
  "Clear all synthesizers, groups and pending messages from the audio server
  and then recreates the active synth groups."
