What about a GUI sequencer with no audio component, but with connectivity via MIDI / OSC / VST? Would that have two threads as well?
I have a follow up question to number 4, as I think I still don’t understand things well enough.
The question is: what is the best & most efficient way of accessing a node that is several layers down?
Let’s say that I have a ValueTree structure that models the following XML:
<root>
<node uniqueID = "0">
</node>
<node uniqueID = "1">
<node uniqueID = "1.0">
<node uniqueID = "1.0.0">
</node>
</node>
</node>
<node uniqueID = "2">
</node>
</root>
How would I access node 1.0.0? I can see two ways:
A: root.getChild(1).getChild(0).getchild(0)
B: root.getChildWithProperty("uniqueID", "1.0.0")
A seems far too clunky. Am I right that B will take advantage of Identifier matching and will therefore be fast enough for rapid data access? Is the approach of defining a unique ID for each node misguided? Is there a better way to access specific nodes?
Please note that I haven’t actually run any of this code and it may be full of all sorts of mistakes. Please point them out if you see them, but remember that I’m not currently trying to debug, but rather to get a better understanding of how I can use ValueTrees.
I really appreciate your help here. I’ve really never done anything this complicated before, but I’m determined that I’ll master it one day!