-
Notifications
You must be signed in to change notification settings - Fork 4
/
randompitch.ny
74 lines (28 loc) · 1.15 KB
/
randompitch.ny
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
;nyquist plug-in
;version 1
;type process
;name "Random Pitch Modulation..."
;action "Randomly warping your audio..."
;info "Random Pitch Modulation by David R. Sky"
;control depth "Warping depth" real "depth" 0.100 0.001 2.000
;control maxspeed "Max sweep speed" real "Hz" 0.50 0.01 20.00
;control factor "Sweep depth factor" int "factor" 80 1 300
;control maxdepth "Max pitch mod depth" real "depth" 0.50 0.01 3.00
;; Random pitch Modulation by David R. Sky October 1, 2004
;; As in previous random plug-ins,
;; maxspeed and factor are inversely proportional
;;
;; works on mono and stereo audio
;; if stereo, each channel will have different random modulation
(defun ransiglin (offset factor maxspeed)
(sum offset (lp (mult factor (lp (noise) maxspeed)) (mult 0.5
maxspeed))))
(setf offset (mult 0.50 maxdepth))
(if (arrayp s)
(vector
(snd-tapv (aref s 0) offset (mult depth
(ransiglin offset factor maxspeed)) maxdepth)
(snd-tapv (aref s 1) offset (mult depth
(ransiglin offset factor maxspeed)) maxdepth))
(snd-tapv s offset (mult depth
(ransiglin offset factor maxspeed)) maxdepth))