I would like to build a simple “reverse” plugin supporting VST3.
The goal for the plugin would be to support offline processing (for example, Nuendo Direct Offline Processing) such that I could process a 5 second long audio clip and reverse the samples.
From looking at the VST3 API it is not clear if there is the ability to do an “analysis” type pass where you can process (and cache) the audio samples entirely before doing the official processing pass.
I see that the Juce Sound Radix fork has some support for analysis mode for AAX plugin (AudioSuite). I didn’t see an implementation in the VST wrapper.
I believe this would be possible using the ‘isRealtime’/‘setNonRealtime’ functions of the AudioProcessor. I think it’s not possible to declare a plugin offline only, but you could just refuse to do anything if the plugin sees it is in in realtime mode. If it sees it is offline, it can start to record the buffers until they stop coming and then perform the reversal.
The isRealtime is not meant for that purpose. It is to know if the host is currently rendering to disk or playing back. setNonRealtime is called by the host to inform the plugin:
Called by the host to tell this processor whether it’s being used in a non-realtime capacity for offline rendering or bouncing.
just implement a capture button to fill the plugin’s internal audio buffer and reverse that at some point. this is more a question of how good of a workflow can you provide for this concept rather than if it’s possible. whatever you do, it will be a hack, because a real realtime reverse is impossible
I spent the time to implement this type of feature and ended up punting on it. It is just working against the design of most DAWs. Instead I split my plugin into a realtime version (VST3/AU/AAX) and standalone. The stand-alone version does its own file I/O and so it has the ability to see the entire waveform.
Just my two cents, will be interested if you find a better solution.