       (let [idx (Math/floor (* x (count logistics-scale)))
             note (nth logistics-scale idx)
             freq (midi->hz note)
-            dur (* (rand) 4/8 (/ 60.0 (metro :bpm)))
+            dur (* 4/8 (/ 60.0 (metro :bpm)))
             next-beat (+ 2/8 beat)
             next-x (* logistics-r x (- 1 x))] ;; x = r * x * (1 - x)
         (if (< 0 (rand-int 3))
           (at (metro beat)
-              (fmchord01 :freq freq :dur dur :amp (+ 5 (rand 2)))))
+              (fmchord01 :freq freq :dur dur :amp (+ 3 (rand 1)))))
         (apply-by (metro next-beat) #'logistics-loop [metro next-beat next-x])
         )))
 

    (at (metro beat)
        (doseq [n notes]
          (let [freq (midi->hz n)]
            (fmchord01 :freq freq :dur dur :amp 0.3))))
    (apply-by (metro next-beat) #'markov-loop [metro next-beat dict next-deg])
    ))
;; (markov-loop sequencer-metro (sequencer-metro) chord-chain-dict :I)
;; (chord-degree :i :c4 :major)
;; (stop)

(volume (/ 25 127))

(defn player [metro beat rates]
  (let [rates (if (empty? rates)

(def d {:amp 5.0 :dur 0.25})
(def g {:freq-mul 1})

;;(volume 0.25)
(sequencer-metro :bpm)

(def beat-per-pattern 4)
