I was just wondering how sample-accurate automation is working in VST plugins or even AU plugins.
AudioFilterBase::processBlock(…) only gets sample-accurate timestamped MIDI messages, but no sample-accurate timestamped parameter change events at all.
So how does it work for parameters to be sample-accurately automated, since they can only be modified via AudioFilterBase::setParameter(…) ?
Let´s say for example parameter #66 is modified at sample-positions 0, 7 and 8. Will this lead to a first call to setParameter at sample-position 0, then a processBlock(…) call with 7 samples being processed, then again to a call of setParameter(), then again a processBlock() of only 1 sample and then again a setParameter() ?
Is it done like that in hosts like Cubase ?
If yes, isn´t this switching a waste of CPU time when many parameters come into action with many many updates per quarter note?
I know that there once was a VstEvent type called kVstParameterType but it is now deprecated.
I would be very thankful if anyone could tell me how the whole thing works with modern sequencers, it guess they must have sample-accurate automation?