This is what I have so far. Oversampling is implemented in my plugin but it's not active while I'm working on this. Will be optimising after the functionality is sorted.
Code:
// Process the input signal
for (int i=0; i<numchans; i++)
{
// Get the sample to process
double sampleBeingProcessed = inputs[i][s];
// Filter
if (GetParam(kFilterActive)->Value())
{
frequency = GetParam(kFilterCutoff)->Value() / oversampledsamplerate;
double resonance = GetParam(kFilterResonance)->Value();
inputFilter[i]->setQ(resonance);
lfotempval = LFODataGeneratedA[i][s];
lfotempval = pow(2.0, lfotempval)-1;
lfotempval = lfotempval * (GetParam(kFilterCutoffLFO1Mod)->Value() * 0.001);
inputFilter[i]->setFc(frequency+lfotempval);
filtered = inputFilter[i]->process(inputs[i][s]);
sampleBeingProcessed = filtered;
}
}