iPlug2 Forum

Setting param value in main thread doesn't update control

I’m working on loading parameter values from a JSON file (the “preset”). When a preset is loaded, it loads the JSON file, parses it, and sets each control. This is done on the main thread in the Plugin class. I have a preset header UI that sends a message to the main thread and asks it to load a preset with the given path.

The parameters are set on the main thread just fine, but the controls with parameters do not receive the update (cause they’re on the graphics thread?). It makes sense, but I can’t figure out how to also update the parameters for the controls…

Any help is appreciated!

DirtyParametersFromUI() did the trick, all clear.

There is no separate graphics thread - drawing happens on the main thread

Very good to know, makes sense.