Skip to content
This repository
Browse code

Add simple mic/input pitch-controlled synth example

  • Loading branch information...
commit 22fa083fe75588d3c1142c1313a4fbc1538a358f 1 parent 899436c
Sam Aaron authored December 09, 2012
15  src/overtone/examples/instruments/pitch_controller.clj
... ...
@@ -0,0 +1,15 @@
  1
+(ns overtone.examples.instruments.pitch-controller
  2
+  (:use overtone.live))
  3
+
  4
+;; Fire off this synth and connect an instrument/mic.
  5
+;; The pitch will be detected and used to control the saw waves
  6
+
  7
+(defsynth pitch-controlled-saws
  8
+  [out-bus 0]
  9
+  (let [p   (pitch (sound-in) )
  10
+        p   (/ p 4)
  11
+        p   (lag p 1)]
  12
+    (out out-bus (saw [p (+ p (* p 0.01))]))))
  13
+
  14
+;;(pitch-controlled-saws)
  15
+;;(stop)

0 notes on commit 22fa083

Please sign in to comment.
Something went wrong with that request. Please try again.