 ;; you'll get an lf-tri ugen that oscillates between 165 and 275 Hz
 ;; (165 is 55 below 220, and 275 is 55 above 220)
 (defsynth modulated-freq-tri [freq-bus 0 mid-freq 220 freq-amp 55]
-  (let [freq (+ mid-freq (* (in:ar freq-bus) freq-amp))]
+  (let [freq (+ mid-freq (* (in:kr freq-bus) freq-amp))]
     (out 0 (pan2 (lf-tri freq)))))
 
 

;; Switch the bus that is modulating the frequency
;; to be the triangle bus.
;;
;; Note that we have to use its id because OSC (or maybe supercollider)
;; is expecting a number, not a map (at least I think that's what's going on;
;; feel free to correct this if it's something else happening).
(comment
  (ctl mft :freq-bus (:id tri-bus))
  )

;; Change the frequency of the triangle wave on the tri-bus

  (do
    (ctl tri-synth-inst :freq 5)
    (ctl sin-synth-inst :freq 5)
    (def mft-2 (modulated-freq-tri :tgt later-g sin-bus 220 55))
    (def mft-3 (modulated-freq-tri :tgt later-g tri-bus 220 55)))
  (ctl sin-synth-inst :freq 4)
  (kill mft-2 mft-3)
  )

(comment
  "For when you're ready to stop all the things"
  (stop)
  )
