Hi there!
I’m working on a plugin whose core algorithm is mainly implemented in C, and I’ve run into an issue when the C code changes a value in the algorithm, thereby bypassing my AudioProcessorValueTreeState which results in no GUI update. This is because the C algorithm doesn’t read the JUCE values directly, instead JUCE is responsible for keeping the items in the C code updated.
I’m wondering if there’s any functionality that would allow me to notify the ValueTreeState object directly when a value has changed? I’ve been digging through the source code to try and find out how I’d do this, but it seems like most of that functionality is private. I’m not really sure how to go about this without some kind of circular dependance, because the ValueTreeState also updates the C parameters whenever it detects an update.
Ideally, I’m looking to create a method to modify a value in an AudioProcessorValueTreeState, have the ValueTreeState update its Attachments/Listeners but ignore one specific Listener. I know this is a silly ask, but given my predicament with the C code I’m curious about what the best way to go about it would be. I’m happy to expound on the specifics of my code, but at current I feel like it’d only complicate my question.
Thank you!
*EDIT*: Just after posting this I realized that the internal ValueTree of an AudioProcessorValueTreeState is a public member. Would ValueTree::setPropertyExcludingListener() be the proper way to go about this?