Hello,
How would I affect pitch of a running overtone instrument, from overtone
code?
I have some code that automates a ctrl. In the example below it changes
the bpm of an instrument, from 0 to 250 over 16 seconds.
Is there a similar way to affect the pitch?
(defn ctl-ramp-2 [start stop inc ramp-fn]
(let [cur (+ start inc)]
(if (< start stop)
(do
;;(println cur)
(ramp-fn cur)
;;apply our ramp-fn, every 100 ms, until the ramp is done
(apply-at (+ 100 (now)) ctl-ramp-2 [cur stop inc ramp-fn] ))
;; else we are done and do naught
;;(println "done")
)))
(defn ctl-ramp [start stop time-ms ramp-fn]
(ctl-ramp-2 start stop
(/ (- stop start) (/ time-ms 100.0))
ramp-fn))
(ctl-ramp 0 250 16000 #(ctl d :bpm %))
--
Joakim Verona
joa...@verona.se