Skip to main content

Overview

iPlug2 provides a Python script that duplicates example projects to create new plugins. This is the recommended way to start a new plugin project.

Prerequisites

  • Python 2 or 3 installed
  • iPlug2 repository cloned
  • Python accessible from command line (Windows users need to add Python to PATH)

Using duplicate.py

The duplicate.py script is located in Examples/ and creates a new plugin by copying an existing example.

Basic Usage

cd /path/to/iPlug2/Examples
python duplicate.py [input_project] [output_project] [manufacturer]
1
Choose a Template
2
Select an example project as your starting point:
3
  • IPlugEffect - Audio effect (gain, EQ, compressor, etc.)
  • IPlugInstrument - MIDI synthesizer with DSP
  • IPlugMidiEffect - MIDI processor (arpeggiator, transpose, etc.)
  • IPlugSideChain - Effect with sidechain input
  • IPlugSurroundEffect - Surround/spatial audio processor
  • IPlugReaperExtension - REAPER extension (not a plugin)
  • 4
    Run the Script
    5
    python duplicate.py IPlugEffect MyDelay MyCompany
    
    6
    This creates a new project:
    7
  • Input: IPlugEffect (source template)
  • Output: MyDelay (new project name)
  • Manufacturer: MyCompany (your company/brand name)
  • 8
    Specify Output Path (Optional)
    9
    python duplicate.py IPlugEffect MyDelay MyCompany ~/Desktop/MyPlugins
    
    10
    Creates the project at ~/Desktop/MyPlugins/MyDelay/
    Naming Rules:
    • No spaces in project or manufacturer names
    • Use CamelCase (e.g., MyAwesomePlugin)
    • Avoid numbers, dots, or special characters at the start

    What Gets Duplicated

    The script performs these operations:

    Files Copied

    • Source code (.h, .cpp)
    • Project files (.sln, .xcodeproj)
    • Build configurations
    • Resource files
    • Scripts

    Strings Replaced

    • Project name
    • CAPITALIZED names
    • Manufacturer name
    • iPlug2 root path (if needed)

    Files Created

    MyDelay/
    ├── MyDelay.h              # Plugin header
    ├── MyDelay.cpp            # Plugin implementation  
    ├── config.h               # Plugin configuration
    ├── config/                # Build configs (.xcconfig, .props)
    ├── projects/              # IDE projects
    │   ├── MyDelay.sln       # Visual Studio
    │   └── MyDelay.xcworkspace # Xcode
    ├── resources/            # Assets (fonts, images)
    └── scripts/              # Build scripts
    

    Configuration

    After duplication, edit config.h to customize your plugin:
    config.h
    #define PLUG_NAME "MyDelay"
    #define PLUG_MFR "MyCompany"
    #define PLUG_VERSION_HEX 0x00010000
    #define PLUG_VERSION_STR "1.0.0"
    #define PLUG_UNIQUE_ID 'Xyz1'  // ⚠️ CHANGE THIS
    #define PLUG_MFR_ID 'MyCP'      // ⚠️ CHANGE THIS
    
    #define PLUG_CHANNEL_IO "2-2"   // Stereo in/out
    #define PLUG_TYPE 0              // 0=Effect, 1=Instrument, 2=MIDI Effect
    #define PLUG_DOES_MIDI_IN 0
    #define PLUG_DOES_MIDI_OUT 0
    
    Critical: Change PLUG_UNIQUE_ID and PLUG_MFR_ID immediately. The script assigns a random PLUG_UNIQUE_ID, but you should verify it’s unique and update PLUG_MFR_ID to your registered manufacturer code.

    Plugin IDs

    PLUG_UNIQUE_ID must be unique across all plugins. Use 4 alphanumeric characters (e.g., 'MdL1').PLUG_MFR_ID identifies your company. Register a code or use your initials (e.g., 'ACME').

    Project Structure

    Main Files

    Every iPlug2 plugin has three core files:
    MyDelay.h
    #pragma once
    #include "IPlug_include_in_plug_hdr.h"
    
    const int kNumPresets = 1;
    
    enum EParams
    {
      kGain = 0,
      kNumParams
    };
    
    using namespace iplug;
    using namespace igraphics;
    
    class MyDelay final : public Plugin
    {
    public:
      MyDelay(const InstanceInfo& info);
      
    #if IPLUG_DSP
      void ProcessBlock(sample** inputs, sample** outputs, int nFrames) override;
    #endif
    };
    

    Build System

    iPlug2 supports multiple build systems:

    Visual Studio

    .sln files for WindowsAAX, VST3, CLAP, Standalone

    Xcode

    .xcworkspace for macOS/iOSAU, VST3, CLAP, AAX, Standalone, AUv3

    CMake

    Cross-platformAll formats, Web Audio (WASM)

    Next Steps

    Audio Effects

    Build audio processors with parameters and DSP

    Instruments

    Create MIDI synthesizers with polyphony

    MIDI Effects

    Process MIDI messages and generate notes

    Parameters

    Learn about parameter types and configuration

    Troubleshooting

    Check the spelling and case of the template name. Template must exist in the Examples/ directory.
    ls Examples/
    # Look for: IPlugEffect, IPlugInstrument, etc.
    
    The destination directory already exists. Choose a different name or delete the existing directory.
    rm -rf MyDelay  # Delete existing project
    
    Project, manufacturer, and path names cannot contain spaces. Use CamelCase instead.
    # ❌ Wrong
    python duplicate.py IPlugEffect "My Delay" "My Company"
    
    # ✅ Correct  
    python duplicate.py IPlugEffect MyDelay MyCompany
    
    This is expected for REAPER extensions. They don’t use the standard plugin config format.