Quote:
Originally Posted by Tale
Well, it might not be expected behavior nowadays (YMMV), but it is how VST2 was designed (it more or less mimics DX7 behavior). Also note that any tweaks should not be temporarily, because the plug-in should save the changes in the plug-in state.
|
OK, I was wondering if it was some legacy thing like that. But it makes very little sense in current hosts, and seems unexpected, especially next to AU/VST3/AAX, which don't behave that way. However, if if we were to say that's a behavior we want, the implementation in IPlug1/2 is not quite right. ModifyCurrentPreset is called conditionally dependent on PLUG_DOES_STATE_CHUNKS (only called when it's 0). But ModifyCurrentPreset is called in other places too, so the exact behavior is likely dependent on the host (Reaper, for instance, calls effGetChunk like crazy, IIRC, after any parameter change).
So even supporting the "feature" doesn't make a good argument for the existence of PLUG_DOES_STATE_CHUNKS.
Quote:
But yeah, I do agree that you should always set PLUG_DOES_STATE_CHUNKS set to 1 and code your own serialization, because else you can't expand your plug-in anymore in a future version without breaking preset/project compatibility.
|
"set to 1 and code your own serialization"—Just to clarify what you're saying, you mean code your own serialization
if you need something beyond the default serialization, right? The default handlers iterate through the parameters in both directions, and you only need to override them if you need to handle additional features (for instance, storing/retrieving additional non-parameter info, such as the format version of the program/preset). Is that correct?
For instance, I have a plugin commercial plugin, AAX/AU/VST2/VST3. I'm not doing my own serialization. The AAX part is a different story, and of course I'm overriding SetChunk/GetCunk/CompareActiveChunk (largely because I need backwards compatibility with its TDM predecessor). But for Au/VST2/VSt3, the serialization is untouched (though this particular plugin has parameter order dependencies, so I override RestorePreset).