This is essentially the same functionality as a sequencer control has, right? (Perhaps just finer-grained, i.e. far more than the usual 8-16 steps a sequencer would have.) If so, I think you’ll find the IPlugChunks example useful - that’s what I used as a basis to implement a sequencer (which I derived from the LFO class) in the plugin I’m working on. Essentially, an update to the LFO/sequencer editor control triggers an action function that uses
SendArbitraryMessageFromUI, which sends an untyped pointer (
void*) to the
OnMessage function of your plugin class. There, as far as I know, you’re safe to edit DSP members.
One caveat about the IPlugChunks example, though: The example illustrates both how to make a sequencer with a MultiSlider control, as well as (and more importantly) how to save data other than VST-standard parameters. In the example, the sequencer values are stored in a DSP member variable within the action function, based on the new values produced by interaction between the mouse and the control. However, the
IVMultiSliderControl object will interpolate and set multiple values if the mouse skips a slider between triggers of
OnMouseDrag. These slider updates don’t trigger the action function and thus don’t get stored in
mDSP.mSteps, and therefore if you quickly sweep the mouse across the control, you’ll find when you reload the plugin that only about half of the steps actually got serialized and saved. To get around this, I simply looped through all slider values and stored them every time the action function was triggered (since my sequencer only has 16 steps, this has a negligible impact on performance).