I’d like to speed up development a bit and thought about using JSON or XML to define my parameters. Can someone head me in the right direction? I’m happily using AudioProcessorValueTreeState to manage parameters, but how can I parse my parameters from a file at compile time?
p.s. I’m interested in best practice to manage 50+ parameters in general, so if you are up to sharing your workflows, I’d appreciate it as well
The ValueTree class has a fromXML() method that might be of some use?
yes, that’s true but I also want to create some StringArrays for parameterIDs and parameterNames so I can iterate through those - or is there a way to do that with a ValueTree?
A ValueTree can hold array objects which you can easily iterate through. But once you load arrays into a value tree you can forget about accessing the xml utility methods as they will no longer work.
hm… I was thinking about a generic parameter system so I can just create my parameters using XML or JSON and construct everything I need from that (AudioProcessorValueTree, StringArrays, etc.) - thanks anyway so far
BUT the fact that the ValueTree can hold arrays is actually a nice way to store my data! I’m using JSON now to manage my parameters (this is so much better than doing everything in code and I like the formatting more than XML), then I parse them into my ValueTree, create my StringArrays etc. and save everything in the ValueTree again. Sweet!