I have a JUCE plugin and I have all my state stored in a
ValueTree object. I want to write a UI which will run in a python script. The way I have it working now is that my python script exposes an HTTP endpoint and every X ms the plugin makes a post to that endpoint with an XML version of the whole plugin state. Then the python script parses the XML and does whatever it needs to update the UI. So far it works more or less well, but my state updates can’t be very frequent because parsing the XML takes some time. Also, sending the whole state every time when only some small bits change seems like a waste of resources.
I was wondering how to do that better. I could add some custom logic to send the state by bits and only send those that change or stuff like that, but I was thinking that maybe there’s a better way to have the value tree synced automagically. I had a look at the
ValueTreeSynchroniser, but because I need to sync the state to a python script and not another juce app, I would need some sort of implementation of
applyChange in python and I guess this is difficult.
What do you think would be the best way to transmit the changes in the ValueTree in a machine readable way that then my python script could understand?
Thanks in advance for your time!