 ;; (defn vowel-formant2 [freq eq-freq q]
 ;;   (fn [] (resonz (saw freq) eq-freq q)))
 
-(definst drone-aw [freq 100 verb 0]
-  "Inst calls the synth macro which takes a synthesizer definition form. The saw function represents a unit-generator, or ugen. These are the basic building blocks for creating synthesizers, and they can generate or process both audio and control signals (odoc saw)"
-  (let [tremolo-freq (+ freq ((tremelo-freq)))
-        synth-unit (* (env-gen (lin :attack 10 :sustain 5 :release 5) 1 1 0 1 FREE)
-                      (+
-                       ((vowel-formant tremolo-freq 570 0.1))
-                       ((vowel-formant tremolo-freq 840 0.1))
-                       ((vowel-formant tremolo-freq 2410 0.1))))
-        synth-unit-lpf (rlpf (* 0.5 synth-unit)
-                                       (mouse-x 10 10000)
-                                       (mouse-y 0.0001 0.9999))]
-    (out 0 (free-verb synth-unit-lpf verb verb verb))
-    (out 1 (free-verb synth-unit-lpf verb verb verb))))
+
+;; (defsynth voice [tremelo-freq:kr 2000]
+  ;; (* (env-gen (lin :attack 10 :sustain 5 :release 5) 1 1 0 1 FREE)
+  ;;    (+
+  ;;     ((vowel-formant tremelo-freq 570 0.1))
+  ;;     ((vowel-formant tremelo-freq 840 0.1))
+  ;;     ((vowel-formant tremelo-freq 2410 0.1)))))
+
+
+;; (definst drone-aw [freq 100 verb 0]
+;;   "Inst calls the synth macro which takes a synthesizer definition form. The saw function represents a unit-generator, or ugen. These are the basic building blocks for creating synthesizers, and they can generate or process both audio and control signals (odoc saw)"
+;;   (let [tremolo-freq (+ freq ((tremelo-freq)))
+;;         synth-unit   (* (env-gen (lin :attack 10 :sustain 5 :release 5) 1 1 0 1 FREE)
+;;                         (+
+;;                          ((vowel-formant tremelo-freq 570 0.1))
+;;                          ((vowel-formant tremelo-freq 840 0.1))
+;;                          ((vowel-formant tremelo-freq 2410 0.1))))
+;;         synth-unit-lpf (rlpf (* 0.5 synth-unit)
+;;                                        (mouse-x 10 10000)
+;;                                        (mouse-y 0.0001 0.9999))]
+;;     (out 0 (free-verb synth-unit-lpf verb verb verb))
+;;     (out 1 (free-verb synth-unit-lpf verb verb verb))))
 
 
 (definst drone-eh [freq 100]

      (ctl (get-sound pid) :gate 0)
      (remove-person-sound! pid))))

(defn control-sound
  [id val]
  "Here's a fn which will take a val between 0 and 1, map it linearly to a value between 50 and 1000 and send the mapped value as the new frequency of foo:"
  (let [verb-val (scale-range val 0 1000 1 0.3)
        kr-val (scale-range val 0 1000 25 0)]
    (if (contains? @person-sound id)
      (ctl (get-sound id)
           :verb verb-val
           :kr-mul kr-val))))

                             ((vowel-formant (+ freq (sin-osc:kr (* 1.5 kr-mul))) 2410 0.1)))
        synth-unit-env  (* (env-gen (asr attack sustain release) gate) synth-unit)
        synth-unit-hpf  (hpf synth-unit-env 900)
        synth-unit-lpf  (* amp (rlpf synth-unit-hpf 600 0.6))]

    (out 0 (free-verb synth-unit-lpf verb verb verb))
    (out 1 (free-verb synth-unit-lpf verb verb verb))))
