You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
723 B
Plaintext
26 lines
723 B
Plaintext
b = Buffer.read(s, "/home/lcoogan/snd/releases/desolation-mountain/02 - crawling and quietly seething was the figure of the trees.wav");
|
|
|
|
|
|
(
|
|
SynthDef(\vocoder, {
|
|
|
|
var mod, car, bpfmod, num = 30, track, bpfcar,
|
|
bpfhz = (1..num).linexp(1, num, 25, 16000),
|
|
q = \q.kr(20);
|
|
|
|
// create modulator & carrier
|
|
mod = PlayBuf.ar(1, b, BufRateScale.ir(b), loop: 1);
|
|
car = CombC.ar(WhiteNoise.ar(1), 1/20, 1/\freq.kr(50), 3);
|
|
|
|
// track spectrum of modulator
|
|
bpfmod = BPF.ar(mod, bpfhz, 1/q, q.sqrt);
|
|
track = Amplitude.kr(bpfmod).lag3(0.03) * 2;
|
|
|
|
// apply spectrum to carrier
|
|
bpfcar = BPF.ar(car, bpfhz, 1/q, q.sqrt) * track;
|
|
|
|
Out.ar(0, Splay.ar(bpfcar.scramble, spread: 0.1));
|
|
}).play;
|
|
)
|
|
|
|
x.set(\freq, rrand(30, 50).midicps); |