            right. The output of Balance2 remains a stereo signal." }
 
 
-    {:name "Rotate2",
-     :args [{:name "x",
-             :doc "input signal"}
-
-            {:name "y",
-             :doc "input signal"}
-
-            {:name "pos",
-             :default 0.0,
-             :doc "angle to rotate around the circle from -1 to +1. -1
+   {:name "Rotate2",
+    :args [{:name "x",
+            :doc "input signal"}
+
+           {:name "y",
+            :doc "input signal"}
+
+           {:name "pos",
+            :default 0.0,
+            :doc "angle to rotate around the circle from -1 to +1. -1
                    is 180 degrees, -0.5 is left, 0 is forward, +0.5 is
                    right, +1 is behind." }]
-     :num-outs 2
-     :check [(nth-input-stream? 0)
-             (nth-input-stream? 1)]
-     :doc "Rotate2 can be used for rotating an ambisonic B-format sound
+    :num-outs 2
+    :check [(nth-input-stream? 0)
+            (nth-input-stream? 1)]
+    :doc "Rotate2 can be used for rotating an ambisonic B-format sound
            field around an axis.
 
            Rotate2 does an equal power rotation so it also works well on

;; }

(def specs
  (map
   #(assoc % :check (when-ar (first-input-ar)))
   [

    {:name "Pan2"
     :args [{:name "in"
             :doc "input signal"}

            {:name "pos"
             :default 0.0
             :doc "pan position, -1 is left, +1 is right"}

            {:name "level"
             :default 1.0
             :doc "a control rate level input"}]

     :num-outs 2
     :check (nth-input-stream? 0)
     :doc "Two channel (stereo) equal power panner."}


    {:name "LinPan2"
     :extends "Pan2"
     :doc "Two channel (stereo) linear panner. This one sounds more like
           the Rhodes tremolo than Pan2." }


    {:name "Pan4",
     :args [{:name "in",
             :doc "input signal"}

            {:name "xpos",
             :default 0.0,
             :doc "x pan position from -1 to +1 (left to right)"}

            {:name "ypos",
             :default 0.0,
             :doc "y pan position from -1 to +1 (back to front)"}

            {:name "level",
             :default 1.0,
             :doc "a control rate level input."}]

     :num-outs 4
     :check (nth-input-stream? 0)
     :doc "Four channel equal power panner. Outputs are in order
           LeftFront, RightFront, LeftBack, RightBack." }


    {:name "Balance2",
     :args [{:name "left",
             :doc "channel 1 of input stereo signal"}

            {:name "right",
             :doc "channel 2 of input stereo signal"}

            {:name "pos",
             :default 0.0,
             :doc "pan position, -1 is left, +1 is right"}

            {:name "level",
             :default 1.0,
             :doc "a control rate level input."}]

     :num-outs 2
     :doc "Equal power panning balances two channels; by panning, you
           are favouring one or other channel in the mix, and the other
           loses power. The middle pan position (pos=0.0) corresponds to
           the original stereo mix; full left (pos of -1) is essentially

           PanB2(inA, azimuth, gain) + PanB2(inB, azimuth + 1, gain)"}


   {:name "DecodeB2",
    :args [{:name "numChannels"
            :mode :num-outs,
            :doc "number of output speakers. Typically 4 to 8."}

           {:name "w",
            :doc "B-format signal"}

           {:name "x",
            :doc "B-format signal"}

           {:name "y",
            :doc "B-format signal"}

           {:name "orientation",
            :default 0.5,
            :doc "Should be zero if the front is a vertex of the
                   polygon. The first speaker will be directly in
                   front. Should be 0.5 if the front bisects a side of
                   the polygon. Then the first speaker will be the one
                   left of center. Default is 0.5." }]
    :doc "2D Ambisonic B-format decoder. Decode a two dimensional
           ambisonic B-format signal to a set of speakers in a regular
           polygon.  The outputs will be in clockwise order. The
           position of the first speaker is either center or left of
           center."
    :check (when-ar (first-n-inputs-ar 3))}


   {:name "PanAz",
    :args [{:name "num-channels"
            :mode :num-outs,
            :doc "number of output channels"}

           {:name "in",
            :doc "input signal"}

           {:name "pos",
            :default 0.0,
            :doc "pan position. Channels are evenly spaced over a
                   cyclic period of 2.0 with 0.0 equal to the position
                   directly in front, 2.0/numChans a clockwise shift
                   1/numChans of the way around the ring, 4.0/numChans
