           for control rate"
     :auto-rate true}
 
+
    {:name "RLPF"
     :summary "resonant low pass filter"
-    :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
-           {:name "freq", :default 440.0 :doc "cutoff frequency"}
-           {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq. A lower rq results in more resonance."}]
+    :args [{:name "in"
+            :default 0.0
+            :doc "input signal to be processed"}
+
+           {:name "freq"
+            :default 440.0
+            :doc "cutoff frequency"}
+
+           {:name "rq"
+            :default 1.0
+            :doc "the reciprocal of Q.  bandwidth / cutoffFreq. A lower
+                  rq results in more resonance." }]
     :check (nth-input-stream? 0)
     :doc "A resonant low pass filter is a standard subtractive synthesis
           tool which removes frequencies above a defined cut-off

          content."
    :auto-rate true}

   {:name "MidEQ",
    :args [{:name "in", :default 0.0 :doc "input signal to be processed"}
           {:name "freq", :default 440.0 :doc "center frequency of the band in Hertz"}
           {:name "rq", :default 1.0 :doc "the reciprocal of Q.  bandwidth / cutoffFreq"}
           {:name "db", :default 0.0 :doc "amount of boost (db > 0) or attenuation (db < 0) of the frequency band"}]
    :check (nth-input-stream? 0)
    :doc "attenuates or boosts a frequency band"
    :auto-rate true}

   {:name "LPZ1", :args [{:name "in", :default 0.0}]
    :check (nth-input-stream? 0)
    :doc "two point average filter. Implements the formula: out(i) = 0.5 * (in(i) + in(i-1))"
    :auto-rate true}

   {:name "LPZ2", :args [{:name "in", :default 0.0}]
    :check (nth-input-stream? 0)
    :doc "two zero fixed lowpass. Implements the formula: out(i) = 0.25 * (in(i) + (2*in(i-1)) + in(i-2))"
    :auto-rate true}

   {:name "HPZ1", :args [{:name "in", :default 0.0}]
    :check (nth-input-stream? 0)
    :doc "two point difference filter. Implements the formula: out(i) = 0.5 * (in(i) - in(i-1))"
    :auto-rate true}

   {:name "HPZ2", :args [{:name "in", :default 0.0}]
    :check (nth-input-stream? 0)
    :doc "two zero fixed highpass. Implements the formula: out(i) = 0.25 * (in(i) - (2*in(i-1)) + in(i-2))"
    :auto-rate true}

   {:name "Slope", :args [{:name "in", :default 0.0 :doc "input signal to measure"}]
    :check (nth-input-stream? 0)
    :doc "Measures the rate of change per second of a signal. Formula implemented is: out[i] = (in[i] - in[i-1]) * sampling_rate"
    :auto-rate true}

   {:name "BPZ2", :args [{:name "in", :default 0.0}]
    :check (nth-input-stream? 0)
    :doc "two zero fixed midpass which cuts out 0 Hz and the Nyquist frequency. Implements the formula: out(i) = 0.5 * (in(i) - in(i-2))"
    :auto-rate true}

   {:name "BRZ2", :args [{:name "in", :default 0.0}]
    :check (nth-input-stream? 0)
    :doc "two zero fixed midcut which cuts out frequencies around 1/2 of the Nyquist frequency. Implements the formula: out(i) = 0.5 * (in(i) + in(i-2))"
    :auto-rate true}

   {: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"}]
    :check (nth-input-stream? 1)
    :doc "returns the median of the last length input points. This non linear filter is good at reducing impulse noise  from a signal."
    :rates #{:ar :kr}
    :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"}]
    :check (nth-input-stream? 0)
    :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"}]
    :check (nth-input-stream? 0)
    :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"}]
    :check (nth-input-stream? 0)
    :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 "decay-time", :default 1.0 :doc "the 60 dB decay time of the filter"}]
    :check (nth-input-stream? 0)
    :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 "attack-time", :default 1.0 :doc "60 dB attack time in seconds"}
           {:name "decay-time", :default 1.0 :doc "60 dB decay time in seconds"}]
    :check (nth-input-stream? 0)
    :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}])

(def detect-silence
  {:name "DetectSilence",
   :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 input signal which input must fall below thresh before this triggers. The default is 0.1 seconds"}
          {:name "action", :default 0 :doc "the action to perform when silence is detected. Default: NO-ACTION"}],
   :num-outs 1
   :check-inputs same-rate-as-first-input
   :check (nth-input-stream? 0)
   :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."
   :rates #{:ar :kr}
   :auto-rate true})


          of another low pass sound to increase the harmonic content."
    :auto-rate true}


   {:name "BPF",
    :summary "second order Butterworth bandpass filter"
    :args [{:name "in"
            :default 0.0
            :doc "input signal to be processed"}

           {:name "freq"
            :default 440.0
            :doc "centre frequency in Hertz"}

           {:name "rq"
            :default 1.0
            :doc "the reciprocal of Q.  bandwidth / cutoffFreq"}]

    :check (nth-input-stream? 0)
    :doc "A band pass filter permits the frequencies around a specified
          centre frequency to pass unaltered through the filter while
