Prerequisites
Before starting, ensure you have:- A C++ development environment (Xcode on macOS or Visual Studio 2019+ on Windows)
- CMake 3.14 or later
- Git (for cloning the repository)
- Basic understanding of C++ and audio programming concepts
Make sure you’ve completed the installation steps before proceeding.
Create Your First Plugin
Download required SDKs
Download the VST3, CLAP, and WAM SDKs (these are free and publicly available):
AAX (Pro Tools) requires manually downloading the SDK from Avid’s developer portal. AUv2/AUv3 formats are macOS-only and require no additional SDKs.
Duplicate the example project
Use the duplicate script to create your plugin from the IPlugEffect template:This creates a new project at
Examples/MyGainPlugin/ with all files renamed and configured.- macOS/Linux
- Windows
Build with CMake
Build your plugin using CMake:
- macOS
- Windows
By default, plugins are automatically deployed to system plugin folders. Find them in:
- macOS:
~/Library/Audio/Plug-Ins/VST3,~/Library/Audio/Plug-Ins/CLAP - Windows:
%LOCALAPPDATA%\Programs\Common\VST3,%LOCALAPPDATA%\Programs\Common\CLAP
Understanding the Code
Your new plugin consists of three main files:config.h
Defines plugin metadata and configuration:config.h
MyGainPlugin.h
Declares the plugin class and parameter enum:MyGainPlugin.h
MyGainPlugin.cpp
Implements the plugin constructor and audio processing:MyGainPlugin.cpp
The
ProcessBlock method must be realtime-safe: no memory allocations, no locks, no file I/O, no system calls.Key Concepts
Parameters
Parameters are fixed at compile time and indexed by enum. Use non-normalized values (e.g., 0-100 for percentage).
ProcessBlock
The audio processing callback. Must be realtime-safe with no allocations or blocking operations.
IGraphics
Optional GUI toolkit with NanoVG (fast) or Skia (high quality) backends. Can be replaced with SwiftUI, WebView, etc.
Cross-platform
Single codebase targets VST3, CLAP, AUv2, AUv3, AAX, and standalone apps on macOS, Windows, iOS, and Web.
Next Steps
Explore Examples
Check out IPlugInstrument for a synthesizer template and IPlugControls for UI widgets.
API Documentation
Browse the complete API reference with detailed class documentation.
Community Forum
Join the iPlug2 community for help, tips, and discussion.
Discord Server
Chat with other developers in real-time on the iPlug2 Discord.
Customizing Your Plugin
Add More Parameters
Expand theEParams enum and initialize new parameters:
Modify Audio Processing
Implement your DSP algorithm inProcessBlock:
Add UI Controls
Add more controls in themLayoutFunc lambda:
Build Options
Build Specific Formats
Build only the formats you need:Universal Binary (macOS)
Build for both Intel and Apple Silicon:Debug Build
Build in debug mode for better error messages:Troubleshooting
Plugin doesn't appear in DAW
Plugin doesn't appear in DAW
- Verify the build succeeded without errors
- Check the plugin was deployed to the correct folder
- Rescan plugins in your DAW
- On macOS, you may need to clear the Audio Unit cache:
Build errors about missing SDKs
Build errors about missing SDKs
- Ensure you ran
download-iplug-sdks.shinDependencies/IPlug/ - Check that
Dependencies/IPlug/VST3_SDK/exists - For AAX, download the SDK manually from Avid
CMake can't find iPlug2
CMake can't find iPlug2
Ensure
IPLUG2_DIR points to the iPlug2 root directory:Audio glitches or clicks
Audio glitches or clicks
- Ensure
ProcessBlockis realtime-safe (no allocations) - Check buffer size handling
- Use
std::atomicfor thread-safe parameter access - Enable the tracer build to profile performance:
cmake -DIPLUG2_TRACER=ON ..
Alternative Build Systems
While CMake is recommended, iPlug2 also supports:- Xcode projects (macOS): Open
projects/MyGainPlugin-macOS.xcodeproj - Visual Studio projects (Windows): Open
projects/MyGainPlugin-vst3.vcxproj - Makefiles (Web/WASM): Use
.mkfiles inprojects/
CMake is the most flexible option and works across all platforms. The Xcode/VS projects are auto-generated and easier for beginners.