 
 (def detect-silence
   {:name "DetectSilence",
-   :args [{:name "in", :default 0.0}
-          {:name "amp", :default 0.0001}
-          {:name "time", :default 0.1}
+   :args [{:name "in", :default 0.0 :doc "any source"}
+          {:name "amp", :default 0.0001 :doc "when input falls below this, evaluate doneAction"}
+          {:name "time", :default 0.1 :doc "the minimum duration of the for which input must fall below thresh before this triggers. The default is 0.1 seconds"}
           {:name "action", :default 0 :map DONE-ACTIONS}],
    :num-outs 0
-   :check-inputs same-rate-as-first-input})
+   :check-inputs same-rate-as-first-input
+   :doc "If the signal input starts with silence at the beginning of the synth's duration, then DetectSilence will wait indefinitely until the first sound before starting to monitor for silence. This UGen outputs 1 if silence is detected, otherwise 0."
+   :auto-rate true})
 
 (def specs
      (conj (map #(assoc % :muladd true

(def muladd-specs
  [
   {:name "Resonz",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "bwr", :default 1.0}]
    :doc "a two pole resonant filter"}

   {:name "OnePole",
    :args [{:name "in", :default 0.0}
           {:name "coef", :default 0.5}]
    :doc "A one pole filter. Implements the formula:
out(i) = ((1 - abs(coef)) * in(i)) + (coef * out(i-1))"}

   {:name "OneZero",
    :args [{:name "in", :default 0.0}
           {:name "coef", :default 0.5}]
    :doc "A one zero filter. Implements the formula :
out(i) = ((1 - abs(coef)) * in(i)) + (coef * in(i-1))"}

   {:name "TwoPole",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "radius", :default 0.8}]
    :doc "a two pole filter"}

   {:name "TwoZero",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "radius", :default 0.8}]
    :doc "a two zero filter"}

   ;; APF : TwoPole {}
   {:name "APF",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "radius", :default 0.8}]
    :doc ""}

   {:name "Integrator",
    :args [{:name "in", :default 0.0}
           {:name "coef", :default 1.0}]
    :doc "leaky integrator"}

   {:name "Decay",
    :args [{:name "in", :default 0.0}
           {:name "decayTime", :default 1.0}]
    :doc "triggered exponential decay"}

   {:name "Decay2",
    :args [{:name "in", :default 0.0}
           {:name "attackTime", :default 0.01}
           {:name "decayTime", :default 1.0}]
    :doc "triggered exponential attack and exponential decay"}

   {:name "Lag",
    :args [{:name "in", :default 0.0}
           {:name "lagTime", :default 0.1}]
    :doc "exponential lag, useful for smoothing out control signals"}

   {:name "Lag2",
    :args [{:name "in", :default 0.0}
           {:name "lagTime", :default 0.1}]
    :doc "equivalent to Lag.kr(Lag.kr(in, time), time), resulting in a smoother transition"}

   {:name "Lag3",
    :args [{:name "in", :default 0.0}
           {:name "lagTime", :default 0.1}]
    :doc "equivalent to Lag.kr(Lag.kr(Lag.kr(in, time), time), time), resulting in a smoother transition"}

   {:name "Ramp",
    :args [{:name "in", :default 0.0}
           {:name "lagTime", :default 0.1}]
    :doc "similar to Lag but with a linear rather than exponential lag, useful for smoothing out control signals"}

   {:name "LagUD",
    :args [{:name "in", :default 0.0}
           {:name "lagTimeU", :default 0.1}
           {:name "lagTimeD", :default 0.1}]
    :doc "the same as Lag except that you can supply a different 60 dB time for when the signal goes up, from when the signal goes down"}

   {:name "Lag2UD",
    :args [{:name "in", :default 0.0}
           {:name "lagTimeU", :default 0.1}
           {:name "lagTimeD", :default 0.1}]
    :doc "Lag2 is equivalent to Lag.kr(Lag.kr(in, time), time)"}

   {:name "Lag3UD",
    :args [{:name "in", :default 0.0}
           {:name "lagTimeU", :default 0.1}
           {:name "lagTimeD", :default 0.1}]
    :doc "Lag3UD is equivalent to LagUD.kr(LagUD.kr(LagUD.kr(in, timeU, timeD), timeU, timeD), timeU, timeD)"}

   {:name "LeakDC",
    :args [{:name "in", :default 0.0}
           {:name "coef", :default 0.995}]
    :doc "removes a DC offset from signal"}

   {:name "RLPF"
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "rq", :default 1.0}]
    :doc "a resonant low pass filter"}

   {:name "RHPF", :args [{:name "in", :default 0.0}
                         {:name "freq", :default 440.0}
                         {:name "rq", :default 1.0}]
    :doc "a resonant high pass filter"}

   {:name "LPF",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}]
    :doc "a second order Butterworth low pass filter"}

   {:name "HPF",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}]
    :doc "a second order high pass filter"}

   {:name "BPF",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "rq", :default 1.0}]
    :doc "a second order Butterworth bandpass filter"}

   {:name "BRF",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "rq", :default 1.0}]
    :doc "a second order lowpass filter"}

   {:name "MidEQ",
    :args [{:name "in", :default 0.0}
           {:name "freq", :default 440.0}
           {:name "rq", :default 1.0}
           {:name "db", :default 0.0}]
    :doc "attenuates or boosts a frequency band"}

   {:name "LPZ1", :args [{:name "in", :default 0.0}]
    :doc "two point average filter"}

   {:name "LPZ2", :args [{:name "in", :default 0.0}]
    :doc "two zero fixed lowpass"}

   {:name "HPZ1", :args [{:name "in", :default 0.0}]
    :doc "two point difference filter"}

   {:name "HPZ2", :args [{:name "in", :default 0.0}]
    :doc "two zero fixed highpass"}

   {:name "Slope", :args [{:name "in", :default 0.0}]
    :doc ""}

   {:name "BPZ2", :args [{:name "in", :default 0.0}]
    :doc "two zero fixed midpass"}

   {:name "BRZ2", :args [{:name "in", :default 0.0}]
    :doc "two zero fixed midcut"}

   ;; Median : Filter {
   ;; 	*ar { arg length=3, in = 0.0, mul = 1.0, add = 0.0;

   ;; }

   {:name "Median",
    :args [{:name "length", :default 3.0 :doc "number of input points in which to find the median. Must be an odd number from 1 to 31. If length is 1 then Median has no effect."}
           {:name "in", :default 0.0 :doc "Input signal to be processed"}]
    :doc "returns the median of the last length input points. This non linear filter is good at reducing impulse noise  from a signal."
    :auto-rate true}

   {:name "Slew",
    :args [{:name "in", :default 0.0 :doc "input signal"}
           {:name "up", :default 1.0 :doc "maximum upward slope"}
           {:name "dn", :default 1.0 :doc "maximum downward slope"}]
    :doc "Smooth the curve by limiting the slope of the input signal to up and dn"
    :auto-rate true}

   {:name "FOS",
    :args [{:name "in", :default 0.0 :doc "input signal"}
           {:name "a0", :default 0.0 :doc "first coefficient"}
           {:name "a1", :default 0.0 :doc "second coefficient"}
           {:name "b1", :default 0.0 :doc "third coefficient"}]
    :doc "first order filter section. Formula is equivalent to: out(i) = (a0 * in(i)) + (a1 * in(i-1)) + (b1 * out(i-1))"
    :auto-rate true}

   {:name "SOS",
    :args [{:name "in", :default 0.0 :doc "input signal"}
           {:name "a0", :default 0.0 :doc "1st coefficient"}
           {:name "a1", :default 0.0 :doc "2nd coefficient"}
           {:name "a2", :default 0.0 :doc "3rd coefficient"}
           {:name "b1", :default 0.0 :doc "4th coefficient"}
           {:name "b2", :default 0.0 :doc "5th coefficient"}]
    :doc "second order filter section (biquad). Formula is equivalent to: out(i) = (a0 * in(i)) + (a1 * in(i-1)) + (a2 * in(i-2)) + (b1 * out(i-1)) + (b2 * out(i-2))"
    :auto-rate true}

   {:name "Ringz",
    :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
           {:name "freq", :default 440.0 :doc "resonant frequency in Hertz"}
           {:name "decaytime", :default 1.0 :doc "the 60 dB decay time of the filter"}]
    :doc "Ringz is the same as Resonz, except that instead of a resonance parameter, the bandwidth is specified in a 60dB ring decay time. One Ringz is equivalent to one component of the Klank UGen"
    :auto-rate true}

   {:name "Formlet",
    :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
           {:name "freq", :default 440.0 :doc "resonant frequency in Hertz"}
           {:name "attacktime", :default 1.0 :doc "60 dB attack time in seconds"}
           {:name "decaytime", :default 1.0 :doc "60 dB decay time in seconds"}]
    :doc "a resonant filter whose impulse response is like that of a sine wave with a Decay2 envelope over it. The great advantage to this filter over FOF is that there is no limit to the number of overlapping
grains since the grain is just the impulse response of the filter. Note that if attacktime == decaytime then the signal cancels out and if attacktime > decaytime then the impulse response is inverted."
    :auto-rate true}])

;; // the doneAction arg lets you cause the EnvGen to stop or end the
;; // synth without having to use a PauseSelfWhenDone or FreeSelfWhenDone ugen.
