View Single Post
Old 01-06-2021, 04:39 PM   #4
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 341
Default

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;
        }
    }

Last edited by Bobflip; 01-06-2021 at 04:46 PM.
Bobflip is offline   Reply With Quote