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
Need help in understanding audio data coming in/out a VSTi
-
- KVRist
- Topic Starter
- 379 posts since 1 Mar, 2004 from Austria
-
- KVRian
- 922 posts since 26 Mar, 2003 from Guildford, England
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++;
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++;