Plugin Converson to AudioProcessorValueStateTree

Trying to convert an effects plugin to AudioProcessorValueStateTree basis. Going through Tutorial: Saving and loading your plug-in state but missing some key points. I’d appreciate help with a “before and after”. Here’s the before:

// *Processor.h:*

class AudioEffectAudioProcessor : public AudioProcessor
{
public:
    AudioEffectAudioProcessor();
//  ...
AudioProcessorValueTreeState parameters;  // Added per tutorial

// *Processor.cpp:*

AudioEffectAudioProcessor::AudioEffectAudioProcessor()
     : AudioProcessor (BusesProperties()   // Edited for brevity
                       .withInput  ("Input",  AudioChannelSet::stereo(), true)
                       .withOutput ("Output", AudioChannelSet::stereo(), true)
                       ),
parameters (*this, nullptr, Identifier ("myAPVTS"),  //  Added per tutorial

{    std::make_unique<AudioParameterFloat> ("inputVolumeParamID", // parameterID
                                            "inputVolumeParamName", // parameter name
//                                           -30.0f,   // minimum value
//                                            30.0f,   // maximum value
                  NormalisableRange<float> (-30.0f, 30.0f),
                                               0.0), // default value
  // ... more params
})
{  // ... rest of constructor

Could use help especially with apvts creation, constructor and initialization. Thanks.

Edit: Now corrected above

Try following this…hopefully it’ll help you find your way :slightly_smiling_face: https://youtu.be/NE8d91yYBJ8

Thanks I found the mistakes. Original post now corrected for other readers.