Hi folks,
I’m currently using an audioprocessorvaluetreestate
to manage several effect parameters.
I would like to export my effect settings from the value tree to a xml file.
We all know that the effects are stored like this:
<Identifier>
<PARAM id="CompressorAttack" value="1.0"/>
<PARAM id="CompressorRatio" value="50.0"/>
<PARAM id="FilterCuttOff" value="0.5"/>
<PARAM id="FilterQ" value="0.8"/>
</Identifier>
But would it be possible to use AudioProcessorParameterGroups
and get a representation like this:
<ParameterGroups>
<Group name="Compressor">
<Parameter id="CompressorAttack" value="1.0"/>
<Parameter id="CompressorRatio" value="50.0"/>
</Group>
<Group name="Filter">
<Parameter id="FilterCuttOff" value="0.5"/>
<Parameter id="FilterQ" value="0.8"/>
</Group>
</ParameterGroups>
So far I found that this representation was possible with a value tree using this method:
ValueTree (const Identifier& type, std::initializer_list<NamedValueSet::NamedValue> properties, std::initializer_list<ValueTree> subTrees = {});
But then I cannot use audioprocessorvaluetreestate
.
If I init audioprocessorvaluetreestate
with AudioProcessorParameterGroups
I still don’t get the desired representation and the juce source code seems to indicate that the group feature is not used by the internal value tree.
I’m looking for getting the desired representation with this kind of call:
audioprocessorvaluetreestate.state.toXmlString()
Would you have an idea to get this representation?