I’m using a AudioProcessorValueTreeState to maintain the state of all parameters in the synth and I’m trying to create a data blob to put in a database. My issue is that the ValueTree is only writing out it’s own name and none of the information of it’s properties and children.
The docs for ValueTree::writeToStream say:
Stores this tree (and all its children) in a binary format.
Can anyone say why my use of write to stream is only writing the root name with usage like so?
auto valueTree = ValueTree("params"); //add a bunch of parameters / properties //assign state container to APVTS processorState->state = valueTree; valueTree.getNumChildren() //gives 103 MemoryOutputStream stateStream; valueTree.writeToStream(stateStream); const char * data = static_cast<const char *>(stateStream.getData()); String(data, stateStream.getDataSize()); //gives "params"
My first post, much thanks for any help.