Im seeking to incorporate some of the simple dynamic range source code that can be found here:
https://github.com/music-dsp-collect...r/simpleSource
I have built the simple distortion plugin following Martin Finke's blog here:
http://www.martin-finke.de/blog/arti...al-distortion/
you will notice there is a short section containing the DSP:
void DigitalDistortion::ProcessDoubleReplacing(
double** inputs,
double** outputs,
int nFrames)
{
// Mutex is already locked for us.
int const channelCount = 2;
for (int i = 0; i < channelCount; i++) {
double* input = inputs[i];
double* output = outputs[i];
for (int s = 0; s < nFrames; ++s, ++input, ++output) {
if(*input >= 0) {
// Make sure positive values can't go above the threshold:
*output = fmin(*input, mThreshold);
} else {
// Make sure negative values can't go below the threshold:
*output = fmax(*input, -mThreshold);
}
}
}
}
I want to use the Chunkware compressor to do the DSP in this case. Do I need to #include the simple compressor source, while its in the same path as all the other source code, and bring it in using enum and the class / function calling?
Im pretty new to C++ so i've been following tutorials and taking a very back of the envelope approach. Any help is appreciated!
Thanks