Hi JUCE team,
I currently have a design question.
I’m developing an audio standalone application with some effect processor.
I plan to use a classic approach: AudioTransportSource and then use a node to put my processorChain.
I will use a valueTree to communicate between the GUI and the audio engine (play/stop, track load, and so on…).
The effect parameters will be handle with an AudioProcessorValuetreeState.
BUT the user can selecte multiple presets. A preset store all the parameters state.
Hence everytime the user switch between the preset I will have to change the AudioProcessorValuetreeState values.
How could I handle it?
I thought about having my ValueTree designed like this:
{
"root": {
"trackPath1" : "~/tracks/track1.wav",
"trackPath2" : "~/tracks/track2.wav",
"preset": {
"preset1" : {
"compressor" : {
"threshold" : "-4",
"outputGain" : "+12"
// other fields...
},
"limiter" : {
// other fields
}
},
"preset2" : {
"compressor" : {
"threshold" : "-8",
"outputGain" : "+3"
// other fields...
},
"limiter" : {
// other fields
}
}
}
}
}
Then changing the value tree of the AudioProcessorValuetreeState according to the selected preset.
Something like this:
AudioProcessorValuetreeState.state = valueTree.getProperty("preset").getProperty("preset2");
I don’t know if it would be the best practice for this kind of issue.
What do you think about it?
