         ats (reductions + (map :dur envs))]
     (map #(assoc %1 :at %2) envs ats)))
 
-(def one-twenty-bpm (metronome 120))
+(defn player [env]
+  (demo 20 (pan2 (:play-thing env))))
 
-(defn make-pasr [phrase]
-  (let [plucks (phrase->plucks phrase)]
-    (map-indexed (fn [i [p a s r :as pasr]]
-                   (PASRUnit. {:pasr pasr
-                               :dur (+ a s r)
-                               :pre (first (when (pos? i) (nth plucks (dec i))))
-                               :nex (first (when (< i (dec (count plucks))) (nth plucks (inc i))))}))
-                 plucks)))
+(defn play-phrase [[env & rest-envs]]
+  (when env
+    (player env)
+    (Thread/sleep (* 1000 (:dur env)))
+    (play-phrase rest-envs)))
+
+(defn play-sahana-varnam []
+  (for [phrase (mapcat :pasr sahana-pasr)]
+		  (play-phrase (envs-for-phrase 60 12 phrase))))
+
+(comment
+
+  (defrecord PASRUnit [data])
+
+  (defn make-pasr [phrase]
+    (let [plucks (phrase->plucks phrase)]
+      (map-indexed (fn [i [p a s r :as pasr]]
+                     (PASRUnit. {:pasr pasr
+                                 :dur (+ a s r)
+                                 :pre (first (when (pos? i) (nth plucks (dec i))))
+                                 :nex (first (when (< i (dec (count plucks))) (nth plucks (inc i))))}))
+                   plucks))))
 
 
 (comment

(defn duration [pluck]
  (or (some-> pluck first (s/split #":") second Integer/parseInt)
      1))

(defrecord PASRUnit [data])

(defn make-pitches [pasr base]
  (->> pasr

            [clojure.string :as s]
            [clojure.pprint :as pp]
            [cheshire.core :as json]))

(definst ignore-this [x 1]
  (def *mx *)
  (sin-osc))

(defn read-pasr-json [filename]
  (-> filename io/resource slurp (json/decode true)))
