/usr/share/SuperCollider/HelpSource/Classes/Convolution.schelp is in supercollider-common 1:3.6.3~repack-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | class:: Convolution
summary:: Real-time convolver.
related:: Classes/Convolution2, Classes/Convolution2L, Classes/Convolution3
categories:: UGens>FFT, UGens>Convolution
Description::
Strict convolution of two continuously changing inputs. Also see
link::Classes/Convolution2:: for a cheaper CPU cost alternative for the
case of a fixed kernel which can be changed with a trigger message.
See also link::http://www.dspguide.com/ch18.htm:: by Steven W.
Smith.
classmethods::
method::ar
argument::in
Processing target.
argument::kernel
Processing kernel.
argument::framesize
Size of FFT frame, must be a power of 2.
argument::mul
Output will be multiplied by this value.
argument::add
This value will be added to the output.
Examples::
code::
(
{ var input, kernel;
input=AudioIn.ar(1);
kernel= Mix.ar(LFSaw.ar([300,500,800,1000]*MouseX.kr(1.0,2.0),0,1.0));
//must have power of two framesize
Out.ar(0,Convolution.ar(input,kernel, 1024, 0.5));
}.play;
)
(
//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
a=2048;
s = Server.local;
//kernel buffer
g = Buffer.alloc(s,a,1);
)
(
//random impulse response
g.set(0,1.0);
100.do({arg i; g.set(a.rand, 1.0.rand)});
{ var input, kernel;
input=AudioIn.ar(1);
kernel= PlayBuf.ar(1,g.bufnum,BufRateScale.kr(g.bufnum),1,0,1);
Out.ar(0,Convolution.ar(input,kernel, 2*a, 0.5));
}.play;
)
::
|