I’m new to JUCE and VST coding, but I’m trying to write my first VST plugin which is a kind of automata that generates MIDI and control signals that can be sent to other plugins.
The idea is that the plugin has some kind of regular scheduler or timer, updating the state of its internal model, which in turn updates the visual display in the Editor. When certain events occur in the model it also emits MIDI.
However, I’m unsure how to implement the regular updates and repaints.
The simple tutorials only talk about using standard UI components and adding listeners to them to update the model. Meanwhile, other results of googling, such as Best strategy for painting , are a bit cryptic for me. They rely to too much context I don’t know.
So I’m looking for a fairly n00b-oriented overview of how scheduling events / repainting etc. works in JUCE/VST.
For comparison, I’ve been doing this stuff previously in Processing and in the browser. In Processing it’s very simple. You just write a “draw” handler in which you update your model and repaint your window. And which gets automatically called 30 times a second. In the browser you can achieve the equivalent in with the Javascript timer.
So far, I’ve tried putting the call to update the automata model in processBlock, but I understand I shouldn’t be trying to do any graphics or calling paint from there. So how / where should I be trying to do that? As far as I can tell, paint is just being called when the plugin is launched.

