I’m trying to implement a patch loading system which is able to load patches from an older version of my AudioProcessorValueTreeState (APVTS) as well. I’m interested in how other users do this, as it seems to me to be a pretty standard problem. My approaches so far, each with their unique problems are:
It’s the obvious way but lacks backwards compatibility. Say I added a new audioparam, it will not be part of the APVTS after loading an old patch.
like 1., but add some migration code to add new parameters to the APVTS:
This works fine for adding non-audio params, however audio parameters can not be added to the tree during run-time.
Iterate over the APVTS, check if the ValueTree to be loaded has the parameter, and overwrite the value if so:
I tried to get this working, but had problems as described by me in this thread.
Before using any more recources to try and fix this approach, I wanted to see what seems to a “standard” solution other people are using.
I’d be thankful for your input!