This is an abridged description of the plugin's architecture. For an extensive 15+ page description with more diagrams, visit Chapter 4 of the Thesis.
Visimusic is a VST3 plugin.
It follows the design pattern of VST SDK, separating it into two completely separated components.
PluginController - services the GUI, manages statesPluginProcessor - lives in the real-time context of audio processing
The entity relationships inside Visimusic.
Data types are shown in orange. Units with some amount of state control responsibility are shown in blue.
Notice the clear separation of the video processing in the user side and the audio processing in the real-time sensitive side of the plugin.
Inside the main controller, lives the video pipeline. It consists of two distinct parts.
MediaLoader, IDecoder - decode frames from a video file and create a frame flowFrameQueue - a lock-free buffer that temporarily stores decoded framesFrameTicker, IFeatureExtractor, MediaView - frames are consumed only by the ticker at a steady rate, it distributes them further downstream for rendering in the GUI and visual calculations.An independent unit that receives frames, calculates results in the form of normalized float values - VST parameters.
A FeatureExtractor exists for each part of the video that needs to be analyzed (e.g. brightness, motion, saturation).
The results of the extractors are transmitted to the processor through the means of VST parameters. This ensures the process never slows down audio processing.
The MediaView, responsible for rendering video is also a subscriber of frames at the same level as the extractors. This makes the system completely independent on whether video is being shown or not.
Real-time audio processing is done purely within the context of the PluginProcessor.
It contains an internal effect chain. The processor receives changes made to the parameters, based on which it updates the settings of the connected effects.
The effect chain consists of a number of EffectMixingUnits. These contain an IEffect itself and also an assigned dry/wet amount of that specific effect.
During processing, each effect from the chain is applied at the specified intensity, sequentially.
Each IEffect implementation precesses buffers of samples per-channel.
It contains a definition of signal processing that can be altered by a change of parameters.