Am trying to figure out whether to use AudioProcessorValueTreeState or cached value for my standalone app. The data model has a nested hierarchy with several layers (4-5) of depth. So far, from what I can tell, the following is the case: (and please correct me if this is not so!)
- AudioProcessorValueTreeState with the various connections works well for handling individual parameters. Reading the values directly from the parameters is fast and does not hit the ValueTree; writes to the ValueTree happen less frequently, about roughly 20 ms (if something has been updated recently) to 50-500 ms (if not).
- CachedValue provides fast access to the cached value, with the tradeoff that updates happen on the message thread.
- Both of these provide a way of safely decoupling shared values on the audio and message threads. (since reading from a ValueTree on the audio thread is not a good idea)
- AudioProcessorValueTreeState seems better suited to systems with flat hierarchies, since it stores all of its parameters in a flat format.
- AudioProcessorValueTreeState is better for creating plugins (which need AudioProcessorParameters for automation)
Any recommendations on the circumstances where one is better than the other? Do you find that one is more responsive than the other for controls?
I also looked at ValueTreeSynchroniser, but this seems to be for communicating between two trees on the message thread.