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.
scd/vocal_obfuscation.scd

22 lines
838 B
Plaintext

b = Buffer.read(s, "/Users/lcoogan/snd/installation/zeitlin-six_lines.wav");
(
SynthDef(\voiceObscured, {
arg out=0, bufnum, rate=1, shift=0, cutoff=1200, amp = 40;
var sig;
sig = PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum) * rate, doneAction: 2);
sig = NoiseRepellent.ar(sig, learner:NRAverage(\isLearning.kr(0)));
sig = PitchShift.ar(sig, 0.2, 2.pow(shift / 12), 0.01, 0.01);
sig = LPF.ar(sig, cutoff); // soften sibilance
// sig = BPF.ar(sig, 60, 0.001).neg + sig; // cancels 60Hz hum
// sig = BPF.ar(sig, 120, 0.001).neg + sig; // cancels 2nd harmonic
sig = sig * amp ;
Out.ar(out, sig.dup);
}).add;
)
Synth(\voiceObscured, [\bufnum, b, \shift, -7, \cutoff, 1000, \amp, 40]);
Synth(\voiceObscured, [\isLearning, 1]); // capture some noise
Synth(\voiceObscured, [\isLearning, 0]); // start the script