The plugin effect chosen for this assignment was a simple echo plugin dll and it was developed using the Steinberg VST SDK version 2.4 (revision2). This plugin is simple but efficient, it was designed to handle streaming audio so the preview option in the host application would not tax the processor because of inefficient plugin programming.

Echo Plugin Design

Technically an echo is simply defined as a reflection or repetition of a sound that was produced. This reflection can basically be interpreted as the delayed repetition of the primary audio stream that has already been processed. So to mimic this effect the plugin uses two circular buffers to store the audio samples. Two buffer are used so it can process the echo in stereo, one buffer for the left audio channel and one for the right audio channel. The size of the buffer is automatically determined once the user selects the plugin.

The program has 4 parameters that are supplied by the user through the GUI which will help determine how the echo will be produced with the primary audio.

    1. delay time determines the number of samples to wait before adding the old samples to the current output.
    2. fWeight provides the feedback of the echo to be utilized in subsequent echos
    3. fLevel allows you to adjust the level of the echo
    4. fVolume allows you to adjust the overall gain of the output level

The circular buffers store the overall computed weighted levels of the echo plus the current sample that is being played. This results in a very pleasing echo effect that is comparable to the advanced echo plugins that come with adobe audition.

Here is the core of the processReplacing function:

//looping for each sample
while (--sampleFrames >= 0){

//get input at current position
float x1 = (*in1++);
float x2 = (*in2++);

//get buffer value at current index position
float y1 = fLeftBuffer[index];
float y2 = fRightBuffer[index];

//store/compute effect into buffers
//takes input signal and adds it to a weighted echo
//that also has a total echo level
fLeftBuffer[index] = x1 + (y1 * fWeight)*fLevel;
fRightBuffer[index++] = x2 + (y2 * fWeight)*fLevel;

//circular buffer, once amount has been reached resume
//overwritting back at the beginning of the array
if (index >= delay){
index = 0;
}

//output the computed values, allows volume scaling
(*out1++) = y1 * fVolume;
(*out2++) = y2 * fVolume;

}

Echo Plugin GUI

There are 2 interfaces available for this echo plugin on the downloads page, a GUI was developed using VSTGUI which is in the VST SDK's internal package for developing plugin interfaces that is crossplatform compatable. The other, does not provide a GUI so it relies on the default provided by your host program when a GUI is not present. I felt this would make it easier incase the VSTGUI was not compatable with a host application for some reason.

Both provide access to the 4 primary functions with slider bars that allow you to change the Delay, Feedback, Echo Level and Volume. All values for each parameter have been scaled accordingly to match their proper unit of measure.