                              ((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  (rlpf synth-unit-hpf 600 0.6)]
+        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))))

;; (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))))


(definst drone-eh [freq 100]

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

(defn amplitude-mul [age]
  "This is a quick 'n dirty function that lowers the amplitude over time. It was written to compensate the removal of reverb over time and the increase in the perceived loudness of a sound."
  (cond
    (< age 600) 1
    (< age 750) 0.7
    (< age 900) 0.6
    (< age 1000) 0.5
    (>= age 1000) 0.4
    :else 1))

;;;;;;;;;;;;;;;;;;;;;
;; Control         ;;
;;;;;;;;;;;;;;;;;;;;;

(defn end-sound! [pid]
  (if (contains? @person-sound pid)
