pconvolve Signal Modifiers:Convolution and Morphing pconvolve convolve Convolution based on a uniformly partitioned overlap-save algorithm Description Convolution based on a uniformly partitioned overlap-save algorithm. Compared to the convolve opcode, pconvolve has these benefits: small delay possible to run in real-time for shorter impulse files no pre-process analysis pass can often render faster than convolve Syntax ar1 [, ar2] [, ar3] [, ar4] pconvolve ain, ifilcod [, ipartitionsize, ichannel] Initialization ifilcod -- integer or character-string denoting an impulse response soundfile. Multichannel files are supported, the file must have the same sample-rate as the orc. [Note: cvanal files cannot be used!] Keep in mind that longer files require more calculation time [and probably larger partition sizes and more latency]. At current processor speeds, files longer than a few seconds may not render in real-time. ipartitionsize (optional, defaults to the output buffersize [-b]) -- the size in samples of each partition of the impulse file. This is the parameter that needs tweaking for best performance depending on the impulse file size. Generally, a small size means smaller latency but more computation time. If you specify a value that is not a power-of-2 the opcode will find the next power-of-2 greater and use that as the actual partition size. ichannel (optional) -- which channel to use from the impulse response data file. Performance ain -- input audio signal. The overall latency of the opcode can be calculated as such [assuming ipartitionsize is a power of 2] ilatency = (ksmps < ipartitionsize ? ipartitionsize + ksmps : ipartitionsize)/sr Examples Instrument 1 shows an example of real-time convolution. Instrument 2 shows how to do file-based convolution with a 'look ahead' method to remove all delay. NOTE You can download impulse response files from noisevault.com or replace the filenames with your own impulse files. Here is an example of the pconvolve opcode. It uses the file pconvolve.csd. Example of the pconvolve opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Convolution and Morphing Credits Author: Matt Ingalls 2004