This is my project for COSC4P98-Computer Graphics and Sound, the project selected was a VST plugin that implemented convolution. More specifically this is a convolution reverb plugin (dll) that plugs into any host application such as Ableton Live.

What is Reverb?

An effect that simulates natural reverberations (sound reflections) that occur in different rooms and environments to create an ambience or sense of spaciousness. (sonic spot)

Convolution Reverb Plugin Design

Convolution Reverb/Filtering relies on a impulse response (or more commonly known as a filter) that is applied to an existing waveform to create the modified output response. The filter is usually a prerecorded sound of a rooms ambiance like a concert hall or even items such as the sound effect of a pipe. The output response is a weighted value of the 2 signals (input signal & filter) morphed together.

The VST sdk used did not have built in file reading capabilities so libsnd was taken into consideration. After toiling around implementing libsnd, it was found that the host applications that I was going to test this on was unable to recognize the dll file as VST plugin. So an alternate method that I thought of was utilizing fstream to read in a text file equivilent of an audio stream that has the format of:

SAMPLES: 12919
BITSPERSAMPLE: 32
CHANNELS: 2
SAMPLERATE: 44100
NORMALIZED: FALSE
785.4655 715.3612
1172.574 838.2875
.....

This information was extracted from the text file and input into 2 arrays(one array per channel, left & right). The input stream was weighted against the filter stream depending on the users filter points sample rate and the filter percentage using the discrete convolution method. This approach uses a running sum method to accumulate the effect of the filter on past samples to determine the current weight of effect. Due to the heavy processing that was being done in the processReplacing function of the VST, optimizations had to be made to limit the overhead of the loop structure and commands used. The biggest improvement was using pointer arithmetic to iterate through the arrays rather then using the standard indexing.