Ah right, sorry for not answering in the previous thread…
If you add a member to a class, it needs to be constructed. But AudioProcessorValueTreeState has no default constructor (that’s what it says). A default constructor is one without arguments. The AudioProcessorValueTreeState is one of the classes, that can’t work without some arguments, so you must supply them. There are two ways:
a) default arguments in the declaration:
class EqAudioProcessor : public AudioProcessor
{
// ...
AudioProcessorValueTreeState tree { *this, nullptr, "PARAMETERS", {} };
// ...
This means in the last {} you have to initialise a ParameterLayout() instance. A more common approach is to do that in the cpp file
b) calling the members constructors in a list
EqAudioProcessor::EqAudioProcessor()
: AudioProcessor (BusesProperties() // calls the base class constructor with a BusesProperties as agrument
#if ! JucePlugin_IsMidiEffect
#if ! JucePlugin_IsSynth
.withInput ("Input", AudioChannelSet::stereo(), true)
#endif
.withOutput ("Output", AudioChannelSet::stereo(), true)
#endif
),
tree (*this, nullptr, "PARAMETERS", {}) // call the tree member's constructor
{
// constructor's body
}
Again, instead of the last {} put anything, that returns a ParameterLayout()…
In this thread you find several good examples, how to create a ParameterLayout:
Hope that helps
