Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Reverse reverb
name
code content
// Reverse reverb // by Click Nilson https://sc-users.bham.ac.narkive.com/hA9sdN11/reverse-reverb /* preparation; essentially, allocate an impulse response buffer, then follow a special buffer preparation step to set up the data the plugin needs. Different options are provided commented out for loading impulse responses from soundfiles. */ ( var lengthinsamples= 40000; ~fftsize=2048; // also 4096 works on my machine; 1024 too often and amortisation too pushed, 8192 more high load FFT s.waitForBoot { { var ir, irbuffer, bufsize; var nextmod=100; ir = [0] ++0.dup(100) ++ (Array.fill(lengthinsamples,{|i| if(i% (nextmod)==0,{nextmod= rrand(80,120); 0.3*((i.asFloat/ lengthinsamples).squared)},{0.0}) })); irbuffer = Buffer.loadCollection(s, ir); s.sync; bufsize= PartConv.calcBufSize(~fftsize, irbuffer); ~irspectrum= Buffer.alloc(s, bufsize, 1); ~irspectrum.preparePartConv(irbuffer, ~fftsize); s.sync; irbuffer.free; // don't need time domain data anymore, just needed spectral version }.fork; }; ) ~target= Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav"); ( { var input, kernel, mix = 0.5; input= PlayBuf.ar(1, ~target, loop:1); // snare //input= WhiteNoise.ar(0.125) + SinOsc.ar(200, mul:0.125) * Decay.ar(Impulse.ar(1/4),1); Out.ar(0, input * mix + (1-mix * PartConv.ar(input, ~fftsize, ~irspectrum.bufnum, 0.25)) ); }.play; )
code description
Reverb reverb by Click Nilson based on impulse response convolution. Posted on the mailing list.
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change