Reseting/erasing saved parameter values in VST3

I finally got my project to build and execute with Reaper (so consider my question here solved - I had apparently changed the Debug executable directory from what it’s supposed to be), but the plugin crashed almost immediately after startup, during a call to the SetState function from the VST3 SDK. The problem turned out to be that an old saved parameter value from the last time I built the VST3 version was being loaded into a parameter which did not accept that range, which down the line led to the program trying to access index -1 of a vector, hence the exception.

Is there a command or script to erase and reset all previously serialized parameter values when building, loading the default values instead? (I feel like I might have missed something obvious, as I’d imagine this is a common issue.) The plugin runs fine in new Reaper projects that have no serialized values associated with them, but if I just delete the RPP file in my project folder, the plugin doesn’t load.

no, if your DAW project has a state saved that doesn’t match what the plug-in expects, you will have problems. Ways you can get around this:

  • serialize parameters/state manually by overrideing serializestate(), placing a version number at the beginning of the chunk which lets you handle things differently in unserializestate() depending on the version
  • serialize parameters/state manually but use XML etc to store tagged parameters
  • always add new params to the end of the state

These are things you have to do from the beginning, since you cant change this stuff retrospectively in order to rescue your daw project with a different format state

Got it - I’m overriding SerializeState anyway to save non-modulatable parameters, so I might as well put a version check in there. And in the future I’ll know better than to add parameters at the beginning of the enum…

To remedy the current situation though: what do I need to do to create a fresh Reaper project to debug in? I have to admit I don’t know how Visual Studio communicates to Reaper which file to open.