 
 (defn pan [{:keys [pitch] :as note}]
   (if pitch
-    (-> note (assoc :pan (-> pitch (/ 9) dec)))
+    (let [p (-> note :pitch (/ 18) dec)]
+      (if (odd? pitch)
+        (assoc note :pan (- p))
+        (assoc note :pan p)))
     note))
 
 (def balendoro ; p 343

           (map big horns)
           (map (comp big big) horns)
           (map (comp big big big) (take 3 horns)))
         (map rand-variations)
         (map after (range 0 (* 8 18) 8))
         ;(map first)
         (reduce with)
         (map pan))))


(def aga-terumo ; p299
  (let [drums [first-drum second-drum third-drum]]
    (->> drums
         ;(map (comp list first))
         (map rand-variations)
         (map after (range 0 (* 4 3) 4))
         (reduce with))))

(comment
