expect plugdata to work from the same place (or at least load the file)
I tried to get something from state input, but if the tooltip still shows something, then pulling in pad gives NULL.
For some reason, the example in the help file works right away, but I can’t figure out why it doesn’t work for me (It just reboots every time and offers to start from scratch)
I tried to do something with the state input, tried to get it and overwrote the data. After that, no matter what I do, the state is not saved. Saving and reloading the patch, deleting and adding a new node, nothing works. Just create a new patch and then a new node.
Otherwise, it works fine, roughly as I described at the beginning of the question.
I just don’t need to touch the state pin, apparently. Although it would be cool to be able to manipulate the state.
Yes this is still a known issue that plugdata doesn’t tell us that it’s internal state changed. It would be nice if they would add support for [3.1.0] Dirty State, Open Editor Request and UI Group Editing Support - VST 3 Developer Portal
In the meantime we could either
read the plugin state and write it back to the channel on dispose/stopping the patch. We used this approach in an early state of the development, but it always felt off. It could also be problematic if the channel is user controlled, since no one would expect the channel to get triggered on dispose where execution order is usually rather unclear.
Another option would be a new API on our end to allow the node to take part in the saving process of the VL document. It might also feel weired though because the document won’t be marked as dirty until one presses save.
Third option would be to periodically ask the plugin for its state - but while developing was a bit afraid of that option because it must be done on the main thread.
How does it work for other plugins you might ask? Well they all usually send messages when you start operating on one of their parameters. So does plugdata btw. when you add automation parameters and modify them you’ll also see the dirty state of vvvv reacting.
I get it. As if you can live with it if you know a workaround. I understand that some changes in the patch can update the state and save it in the patch?
Maybe there is a way to do a manual save of the state?
By the way, you can contribute to the discussion on Github.
I’m afraid my background is not enough to cover all the nuances of the changes that need to be made.