[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] happy convolution

Have developed a proper running (non circular with
zero padding and overlap output...) Fast Convolution
plug-in, which I've checked in as Convolution.cpp in
the plug-ins folder. I'll check it in to the project
itself properly once I get Panther+XCode in the new
year (I'm still using PB right now), or someone else
can. I thought it best to commit the first draft for
anyone who'd like to try it and make suggestions, plus
there is some SC source code below (no help file as
yet, will do one eventually). 

best wishes to all, I shall now go vaguely
incommunicado for a holiday.  

//SC3 example code, class code

//must have power of two framesize- FFT size will be
sorted by Convolution to be double this
//maximum is currently a=8192 for FFT of size 16384
s = Server.local; 
//kernel buffer
g = Buffer.alloc(s,a,1);

//random impulse response
100.do({arg i; g.set(a.rand, 1.0.rand)});

	{ var input, kernel;
	Out.ar(0,Convolution.ar(input,kernel, 2*a, 0.5));

Convolution : UGen
	*ar { arg in, kernel, framesize=512,mul = 1.0, add =
		^this.multiNew('audio', in, kernel,
framesize).madd(mul, add);


Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now