Seems like there are advantages and disadvantages to both. A binary file approach would be pretty easy to read and write. But versioning might be a challenge. For example, take a parameter value representing a waveform choices, e.g. saw, square, etc. If in a future version of your plugin you add waveforms, you'll need to take into account the version of the file you're reading and adjust the parameter value accordingly before mapping it to an index or name of the waveform.
That's not to say that versioning would be ignored in a text based approach, but it might be simpler in a lot of cases. In the waveform example, you wouldn't be mapping a normalized parameter value to the waveforms but would rather simply read the waveform name, something like:
- Code: Select all
A text based approach would have the advantage that you could actually edit it by hand. But it would have the disadvantage that you'd have to write some possibly complex code to parse the files. And there's a lot more potential for syntax errors in your files, if they were edited by hand.
P.S. I'm talking about VST plugins v2.*. I've no idea how VST 3.* handles persistence.