Hello experts, I need your advice.
In my project I am using an AudioProcessorValueTreeState to store my parameters and chunks as it is described in the tutorial (Tutorial: Saving and loading your plug-in state).
For the creation of preset files I am using
state.createXml() which gives me something like
<PARAM id="m_uLFOWave_LFO1" value="2.00000000000000000000"/>. For the parameter if I have defined a valueToTextFunction and textToValueFunction that map the 2.f to “SINE” and vice versa.
Now I would like to create an XML instead that uses the texts and not the values. So for the example above I would need to get
<PARAM id="m_uLFOWave_LFO1" text="SINE"/>. With this I hope to create preset files that are more robust to changes (so e.g. I could change the internal representation of sine to 3 in future without invalidating the preset files).
Is there an easy and elegant way of creating such an XML from my current ValueTree and retrieving it back later to a tree?
All the best,