                                   (ir? reset)
                                   (rate-of? reset rate))))
                   "TODO write error string. and understad why this is an error"))
-       :doc "Expects demand ugen args for dur and level.  Uses successive dur values to determine how long to wait before emitting each level value."}
+       :doc "Expects demand ugen args for dur and level.  Uses successive dur values to determine how long to wait before emitting each level value.
+
+A value is demanded each ugen in the list and output according to a stream of duration values.
+The unit generators in the list should be 'demand' rate.
+
+When there is a trigger at the reset input, the demand rate ugens in the list and the duration are reset. The reset input may also be a demand ugen, providing a stream of reset times."}
 
       {:name "TDuty" :extends "Duty"
-       :args [{:name "dur", :default 1.0}
-              {:name "reset", :default 0.0}
-              {:name "level", :default 1.0}
+       :args [{:name "dur", :default 1.0 :doc "time values. Can be a demand ugen or any signal. The next trigger value is acquired after the duration provided by the last time value."}
+              {:name "reset", :default 0.0 :doc "trigger or reset time values. Resets the list of ugens and the duration ugen when triggered. The reset input may also be a demand ugen, providing a stream of reset times."}
+              {:name "level", :default 1.0 :doc "demand ugen providing the output values."}
               {:name "action", :default 0 :map DONE-ACTIONS}
-              {:name "gapFirst", :default 0}]}
+              {:name "gapFirst", :default 0}]
+       :doc "A value is demanded each ugen in the list and output  as a trigger according to a stream of duration values. The unit generators in the list should be 'demand' rate.
+
+When there is a trigger at the reset input, the demand rate ugens in the list and the duration are reset.The reset input may also be a demand ugen, providing a stream of reset times."}
 
       {:name "DemandEnvGen",
-       :args [{:name "level"}
-              {:name "dur"}
-              {:name "shape", :default 1}
-              {:name "curve", :default 0}
-              {:name "gate", :default 1.0}
-              {:name "reset", :default 1.0}
-              {:name "levelScale", :default 1.0}
-              {:name "levelBias", :default 0.0}
-              {:name "timeScale", :default 1.0}
+       :args [{:name "level" :doc "demand ugen (or other ugen) returning level values"}
+              {:name "dur" :doc "demand ugen (or other ugen) returning time values"}
+              {:name "shape", :default 1 :doc "demand ugen (or other ugen) returning shape number - the number given is the shape number"}
+              {:name "curve", :default 0 :doc "demand ugen (or other ugen) returning curve values -  if shape is 5, this is the curve factor. Thee possible values are: 0 - flat segments, 1 - linear segments, the default, 2 - natural exponential growth and decay. In this case, the levels must all be nonzero and the have the same sign, 3 - sinusoidal S shaped segments, 4 - sinusoidal segments shaped like the sides of a Welch window, a Float - a curvature value for all segments, an Array of Floats - curvature values for each segments."
+               }
+              {:name "gate", :default 1.0 :doc "control rate gate if gate is x >= 1, the ugen runs, if gate is 0 > x > 1, the ugen is released at the next level (doneAction), if gate is x <= 0, the ugen is sampled end held"}
+              {:name "reset", :default 1.0 :doc "if reset crosses from nonpositive to positive, the ugen is reset at the next level. If it is > 1, it is reset immediately."}
+              {:name "levelScale", :default 1.0 :doc "demand ugen returning level scaling values"}
+              {:name "levelBias", :default 0.0 :doc "demand ugen returning level offset values"}
+              {:name "timeScale", :default 1.0 :doc "demand ugen returning time scaling values"}
               {:name "action", :default :none :map DONE-ACTIONS}]
        :init (fn [rate [l d s c gate reset ls lb ts da] spec]
                (if (or (ar? gate) (ar? reset))
-                 [l d s c (as-ar gate) (as-ar reset) ls lb ts da]))}
+                 [l d s c (as-ar gate) (as-ar reset) ls lb ts da]))
+       :doc "Plays back break point envelope contours (levels, times, shapes) given by demand ugens. The next values are called when the next node is reached."}
 
       ;; DUGen : UGen {
       ;;  init { arg ... argInputs;

              {:name "label" :doc "a label string"}
              {:name "run", :default 1.0 :doc "activation switch 0 or 1"}],
       :rates #{:dr}
       :doc "Print the value of an input demand ugen."}
      ])

(def specs
     [
      {:name "Demand",
       :args [{:name "trig" :doc "Can be any signal. A trigger happens when the signal changes from non-positive to positive."}
              {:name "reset" :doc "Resets the list of ugens when triggered."}
              {:name "demandUGens", :mode :append-sequence-set-num-outs}],
       :check (same-rate-as-first-input)
       :doc "On every trigger it demands the next value from each of the demand ugens passed as args.  Used to pull values from the other demand rate ugens.

By design, a reset trigger only resets the demand ugens; it does not reset the value at Demand's output. Demand continues to hold its value until the next value is demanded, at which point its output value will be the first expected item in the list."}



      {:name "Duty",
       :args [{:name "dur", :default 1.0 :doc "time values. Can be a demand ugen or any signal. The next level is acquired after duration.
"}
              {:name "reset", :default 0.0 :doc "trigger or reset time values. Resets the list of ugens and the duration ugen when triggered. The reset input may also be a demand ugen, providing a stream of reset times."}
              {:name "level", :default 1.0 :doc "demand ugen providing the output values."}
              {:name "action", :default :none :map DONE-ACTIONS}]
       :check (fn [rate num-outs [dur reset & _] spec]
                (if (and (dr? dur)
