Created
July 15, 2014 17:48
-
-
Save devn/8bbca63a1bd6e575c1fd to your computer and use it in GitHub Desktop.
autotune/autocorrect pitch overtone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defsynth pitch-follow-1 [] | |
(let [in (mix [(sound-in)]) | |
amp (amplitude:kr in 0.05 0.05) | |
[freq has-freq] (pitch:kr in | |
:amp-threshold 0.02 | |
:median 7) | |
out-1 (mix [(var-saw:ar (mul-add:ar 0.5 1 2) | |
0 | |
(lf-noise1:kr (mul-add:kr 0.3 0.1 0.1)))]) | |
out-2 (loop [n 6 | |
out out-1] | |
(if (= n 0) | |
out | |
(recur (dec n) (allpass-n:ar out 0.040 (rand 0.040) 2))))] | |
(out:ar 0 out-2))) | |
(defsynth pitch-follow-2 [] | |
(let [in (mix [(sound-in)]) | |
amp (amplitude:kr in 0.05 0.05) | |
[freq has-freq] (pitch:kr in :amp-threshold 0.02 :median 7) | |
out-1 (comb-c:ar (lpf:ar in 1000) | |
0.1 | |
(mul-add (distort (reciprocal (mul-add freq 2 1))) 0.05 1)) | |
out-2 (loop [n 6 | |
out out-1] | |
(if (zero? n) | |
out | |
(recur (dec n) (allpass-n:ar out 0.040 (rand 0.040) 2))))] | |
(out:ar 0 out-2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment