VST3 Platform API
The VST3 implementation in iPlug2 provides a complete integration with Steinberg’s VST3 SDK, implementing a non-distributed single-component architecture.Overview
TheIPlugVST3 class is the main API class for VST3 plugins in iPlug2. It inherits from multiple base classes to provide full VST3 functionality:
IPlugAPIBase- Core iPlug API interfaceIPlugVST3ProcessorBase- VST3 audio processingIPlugVST3ControllerBase- VST3 parameter controlSteinberg::Vst::SingleComponentEffect- VST3 single-component architectureSteinberg::Vst::IMidiMapping- MIDI controller mapping supportSteinberg::Vst::ChannelContext::IInfoListener- Track context information
VST3 plugins in iPlug2 use the single-component architecture, combining processor and controller in one class for simplicity.
Core Class
IPlugVST3
Defined in:IPlug/VST3/IPlugVST3.h
Key Methods
Host Communication
BeginInformHostOfParamChange
idx- Parameter index
InformHostOfParamChange
idx- Parameter indexnormalizedValue- Normalized value (0.0 to 1.0)
EndInformHostOfParamChange
idx- Parameter index
InformHostOfParameterDetailsChange
Audio Processing
initialize
context- Host context providing access to host services
kResultOk on success
process
data- Process data structure containing audio buffers, events, and context
kResultOk on success
setBusArrangements
pInputs- Array of input speaker arrangementsnumIns- Number of input busespOutputs- Array of output speaker arrangementsnumOuts- Number of output buses
kResultOk if arrangement is supported
SetLatency
samples- Latency in samples
State Management
getState
pState- Stream to write state data
kResultOk on success
setState
pState- Stream containing state data
kResultOk on success
Editor
createView
name- View type identifier (typicallySteinberg::Vst::ViewType::kEditor)
nullptr if unsupported
EditorResize
viewWidth- New width in pixelsviewHeight- New height in pixels
true if resize was accepted
MIDI Mapping
getMidiControllerAssignment
busIndex- MIDI bus indexchannel- MIDI channelmidiCCNumber- MIDI CC numbertag- Output parameter ID
kResultOk if mapping exists
Track Context
VST3 provides track context information that plugins can query:GetTrackColor
r- Red component (0-255)g- Green component (0-255)b- Blue component (0-255)
GetTrackName
str- String to receive track name
GetTrackIndex
GetTrackNamespace
str- String to receive namespace
GetTrackNamespaceIndex
Bus Management
Audio Bus Access
getAudioInput
index- Bus index
nullptr if invalid
getAudioOutput
index- Bus index
nullptr if invalid
removeAudioInputBus
pBus- Bus to remove
removeAudioOutputBus
pBus- Bus to remove
Configuration
VST3 Configuration Options
VST3-specific configuration is set in your plugin’sconfig.h:
Plugin Types
- Effect (0): Audio processor
- Instrument (1): MIDI to audio
- Note Effect (2): MIDI processor
- Analyzer (3): Analysis tool
VST3 Categories
Common category strings:
"Fx"- Effect"Instrument"- Instrument"Synth"- Synthesizer"Delay","Reverb","EQ", etc.
Factory Function
MakePlug
info- Instance information (currently empty for VST3)
VST3 SDK Integration
iPlug2’s VST3 implementation uses these key VST3 SDK interfaces:IAudioProcessor- Audio processingIEditController- Parameter controlIUnitInfo- Program/preset managementIConnectionPoint- Component communicationIProcessContextRequirements- Timing/transport infoIContextMenu- Context menu support (platform-specific)
The VST3 SDK is included in
Dependencies/IPlug/VST3_SDK/. iPlug2 handles the complex VST3 architecture internally, allowing you to focus on your plugin’s functionality.Best Practices
State Management
Use
SerializeState() and UnserializeState() for plugin state. The VST3 implementation automatically handles bypass state separately.Parameter Changes
Always call
BeginInformHostOfParamChange() before parameter gestures and EndInformHostOfParamChange() after to ensure proper automation recording.Bus Arrangements
Validate bus arrangements in
setBusArrangements(). Return kResultFalse for unsupported configurations.Editor Sizing
Use
EditorResize() to request editor size changes. The host may reject resize requests in some configurations.Common Issues
Related Documentation
- IPlugAPIBase - Base API functionality
- IPlugProcessor - Audio processing interface
- Plugin Configuration - Plugin configuration options
- VST3 SDK Documentation - Official VST3 documentation