 (def TICK (/ (/ 60000 BPM) 4))
 
 (defsynth sin-chord {:out 0 :pitch 52 :dur 500 :amp 0.2}
-  (out.ar :out (+ (* :amp (sin-osc.ar (midicps :pitch)))
-                  (* :amp (sin-osc.ar (midicps (+ :pitch 4))))
-                  (* :amp (sin-osc.ar (midicps (+ :pitch 7)))))))
+  (let [dur-half (/ (/ :dur 1000.0) 2)
+        env (env-gen.ar (perc dur-half dur-half) :done-free)]
+  (out.ar :out (* env :amp (+ (sin-osc.ar (midicps :pitch))
+                              (sin-osc.ar (midicps (+ :pitch 4)))
+                              (sin-osc.ar (midicps (+ :pitch 7))))))))
+
+(defn chords [t n]
+  (hit t sin-chord :pitch (choose [52 55 57 61 63]) :amp 0.2 :dur 500)
+  (callback (+ (now) 260) #'chords (+ t 125) n))
+
+(chords (now) [52 57 59 64])
 
 (def hat-buf (load-sample "/home/rosejn/projects/overtone/instruments/samples/kit/open-hat.wav"))
 

        (if note
          (hit (+ (* i TICK) t) (inst voices)))))))

;(play-beat house-drums house-beat 500)

(defn beats [t cnt]
  (cond

(ns sc-examples
  (:use overtone
     clojure.contrib.seq-utils
     clj-backtrace.repl))

