Hi there. I’m trying to build an audio application from scratch basically recreating this DSP tutorial but on my own so that I understand how everything links together. I’m running into an issue when creating the processorChain in the Voice class where it’s not recognizing my syntax for linking a CustomOscillator (in my code, just written as Oscillator). Any guidance on what I might be missing or doing wrong? Included some code snippets & the error below. Thanks in advance!
My constructor for an Oscillator (seems to be working otherwise) in Oscillator.cpp
template <typename Type> Oscillator::Oscillator()
{
auto& osc = processorChain.template get<oscIndex>();
osc.initialise ([] (Type x)
{
return juce::jmap (x,
Type (-juce::MathConstants<double>::pi),
Type (juce::MathConstants<double>::pi),
Type (-1),
Type (1));
}, 2);
}
My private members defining the ProcessorChain, & the #include at the top of the Voice.cpp file
#include "Oscillator.h"
...
enum
{
osc1Index,
osc2Index,
filterIndex,
masterGainIndex
};
juce::dsp::ProcessorChain<Oscillator<float>, Oscillator<float>, juce::dsp::LadderFilter<float>, juce::dsp::Gain<float>> customProcessorChain;
Screenshot of the error

