@jules: can you please give a sign, if this is a safe approach, or are there problems reading the values directly from the AudioProcessorValueTreeState?
I use it as a replacement for this kind:
https://github.com/ffAudio/ffTapeDelay/blob/master/Source/PluginProcessor.cpp#L135
But it would be
- more efficient, if I don’t have to do the lookup for the range
- way more readable code
- maybe the perfect place to make it thread safe: if the range changes and the value is about to change, I get complete wrong results (yes, the parameter range is unlikely to change, but it serves as example)…
Thanks for your feedback