Need help in understanding audio data coming in/out a VSTi

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi all!

Is there any site or any sample code which describes, which data is used to represent audio and how to produce a sound in VST?

I have already the VST Code from Steinberg and also the DXi environment. But i have no clue how to understand the data so i can process it.

(of course i understand sample rate and the physics)

Thanx for response
Fhangor

Post

Do a file search in one of the SDK examples for:processreplacing

Take a look at the function declaration:

TPluginClass::processReplacing(float **inputs, float **outputs, long sampleFrames)

You get a pointer to an array of pointers to arrays of floats. The array is not stored in an interleaved format like you get in a wavefile, so the array can be split easily:
float *leftArray = inputs[0];
float *rightArray = inputs[1];


both these arrays are of length sampleFrames

The outputs buffer is given to you to dump your processed data into, and follows the same format as the inputs buffer.

By the way, in the processReplacing function, you simply output the processed data into the outputs buffer. However, there is a difference with the process function - it is an accumulating output. So you must add your processed data to the output:

*output++ = *input++;

Post

all the audio data is in the range -1..+1 and all parameters are in the range 0..1

helps to know that too :)

Post Reply

Return to “DSP and Plugin Development”