Classes | UGens > FFT | UGens > Convolution

Convolution2 : UGen : AbstractFunction : Object

Real-time fixed kernel convolver.


Strict convolution with fixed kernel which can be updated using a trigger signal.

Internally, this unit uses FFT to accelerate the calculation, which means that (a) you must specify a "framesize", and (b) if the kernel is longer than this framesize, the end of it will be ignored.

See also by Steven W. Smith.

Class Methods, kernel, trigger: 0, framesize: 2048, mul: 1.0, add: 0.0)



Processing target.


Buffer index for the fixed kernel, may be modulated in combination with the trigger. It's size must be <= framesize.


Update the kernel on a change from non-positive to positive value.


Size of FFT frame, must be a power of two (512, 1024, 2048, 4096 are standard choices). Convolution uses twice this number internally. Note that the convolution gets progressively more expensive to run for higher powers! The maximum value you can use is 2^16=16384. (This upper limit is half of "SC_FFT_MAXSIZE" defined in the SC source code.) Larger convolutions than this can be done using PartConv.


Inherited class methods

Instance Methods

Inherited instance methods


Instead of triggering the kernel update yourself, as in the first example, you can use a UGen trigger signal to do so. In the next example, we use two Convolution2 UGens in order to continuously and smoothly change the impulse response: RecordBuf is used to record a random frequency Saw oscillator every trigPeriod seconds. Right after the recording (trigPeriod gets delayed by the buffer duration BufDur, using the TDelay UGen) the two convolution UGens alternatively update their kernels (using two triggers convTrigs). At the frequency of the kernel updates a crossfader XFade2 moves between conv1 and conv2, using a triangle oscillator LFTri at half the trigger frequency as a panning input. The result is a constantly shifting spectral colorization of the Dust impulses: