Hello,
In a previous plugIn I managed to make an array of common filters like so :
PluginProcessor.h :
std::vector<juce::dsp::IIR::Filter<float>> leftChain;
in some function in the PluginProcessor.cpp :
IIR::Coefficients<float>::Ptr coefficients;
coefficients = IIR::Coefficients<float>::makeLowPass(sampleRate, frequency, qualityFactor);
leftChain.push_back( IIR::Filter<float>(coefficients) );
But now I want to fill leftChain with custom filters that have given arbitrary coefficients (lets say they are stored in std::vector<double> coeffs.
This is what I tried :
PluginProcessor.h : juce::Array<juce::dsp::IIR::Filter<float>> chain;
in some function in the PluginProcessor.cpp :
chain.resize(lines.size());
for (int i = 0; i < numFilters; ++i)
{
chain[i].coefficients = dsp::IIR::Coefficients<float>::Coefficients(coeffs[0],coeffs[1],coeffs[2],coeffs[3],coeffs[4], coeffs[5]);
}
I simplified here because I actually change the coefficients in the loop but this is not relevent for my problem.
So it seems like the object coefficients are not copyable so it does not want to put it in the array. I keep have the error :
Blockquote
Severity Code Description Project File Line Deletion Status Error C2280 ‘juce::dsp::IIR::Filter::Filter(const juce::dsp::IIR::Filter &)’ : attempted to reference a deleted function MonoBiquad_SharedCode C:\Users\MyName\juce-7.0.5-windows\JUCE\modules\juce_core\containers\juce_ArrayBase.h 155
This error message is indicating that you are trying to use or reference a constructor for thejuce::dsp::IIR::Filter<float>class that has been deleted, which means it’s not accessible or usable for copying.
I am not experienced enough to have found a solution to that by myself, I would relly appreciate some help.
