iPlug 2 Framework Documentation

repository·master·Indexed 24 days ago

https://github.com/iplug2/iplug2

A C++ framework for creating cross-platform audio plug-ins and standalone applications. It abstracts audio processing and GUI rendering for industry-standard APIs such as VST3, AU, and CLAP. The framework includes IGraphics dependencies like NanoVG, NanoSVG, and MetalNanoVG for vector graphics, as well as integration with the RtAudio API for real-time audio I/O across Windows, macOS, and Linux.

Tokens
22.5K
Snippets
43
Records
128
Agent score
82%

What's inside iPlug 2

  1. Overview of Emrun tools

    master

    Emrun is a collection of self-sufficient command-line automation tools for browser and Firefox OS tasks, frequently used in conjunction with Emscripten. The suite includes:

    • ffdb.py (Firefox OS Debug Bridge): A command-line tool for operating Firefox OS devices, including installing/running apps and logging execution.
    • emrun.py (HTML autorunner): Allows running .html files from the command line as if they were native executables.
    • embench.py (Benchmark runner): (Planned) Executes native or JS benchmark applications and generates a visual .html results page.
  2. Overview of MetalNanoVG

    master
    MetalNanoVG is a native Apple Metal port of the NanoVG vector graphics library. It is designed to maximize performance on Apple's graphics APIs by providing low overhead compared to OpenGL, using pre-compiled shaders (avoiding runtime compilation), and supporting shared buffers between the CPU and GPU. It also integrates seamlessly with Metal Performance Shaders.
  3. What is hiir?

    master

    hiir is a C++ DSP (digital signal processing) library designed for two primary purposes:

    1. Sampling Rate Conversion: Upsampling and downsampling signals by a factor of two.
    2. Hilbert Transform: Obtaining two signals with a $\pi/2$ phase difference.

    The library uses a highly efficient two-path polyphase IIR filter (a symmetric half-band elliptic low-pass filter) that provides an extremely flat frequency response in the passband with low CPU cost. It supports 32-bit floating point data and offers optimized implementations for SSE, 3DNow!, and standard FPU.

  4. Overview of IPlugMidiEffect example

    master
    IPlugMidiEffect is an example project demonstrating a MIDI processor plug-in built using the iPlug2 framework. It utilizes IGraphics for its Graphical User Interface (GUI). Note that while this is a MIDI effect, the concept of a 'MIDI effect type' is primarily a notion specific to AudioUnits (AU) hosts.
  5. Overview of RtAudio API

    master

    RtAudio is a C++ library providing a unified API for real-time audio input and output across multiple operating systems:

    • Linux: ALSA, JACK, PulseAudio, and OSS.
    • macOS: CoreAudio and JACK.
    • Windows: DirectSound, ASIO, and WASAPI.

    Key features include:

    • Object-oriented C++ design.
    • Single header and source file for easy integration.
    • Support for simultaneous multi-API usage.
    • Dynamic device connection and capability probing.
    • Automatic internal conversion for data formats, channel compensation, (de)interleaving, and byte-swapping.

    Core Concept: Audio Streams RtAudio uses the concept of audio streams to represent audio output (playback) and/or input (recording). You enumerate available devices and their capabilities, then specify them when opening a stream.

  6. Overview of iPlug 2

    master

    iPlug 2 is a C++ framework designed for developing cross-platform audio plug-ins and applications. It allows developers to target multiple plug-in APIs using a single, minimalistic codebase. The framework is built around two primary abstractions:

    1. IPlug: The core audio plug-in abstraction.
    2. IGraphics: A high-performance graphics abstraction layer and GUI toolkit. IGraphics provides a collection of common controls optimized for audio plug-ins and supports both bitmap and vector graphics.

    Supported platforms include desktop (Windows, macOS), iOS, visionOS, and web (via WebAssembly).

  7. Understand the iPlug2 project structure

    master

    An iPlug2 project follows a standardized folder layout designed for cross-platform development (Windows, macOS, iOS, and Web). The structure separates core plugin logic, platform-specific build configurations, and resource management to support multiple plugin formats (VST2, VST3, CLAP, AAX, AU, etc.) from a single codebase.

    Key organizational areas include:

    • Project Root: Contains the primary implementation files (.cpp, .h) and global configuration (config.h).
    • config/: Holds platform-specific build settings (e.g., .xcconfig for macOS/iOS, .props for Windows, .mk for Web).
    • projects/: Contains the actual IDE project files (Visual Studio .vcxproj files or Xcode .xcodeproj directories) for different targets.
    • resources/: Stores platform-specific assets like .plist files, Windows .rc files, and macOS/iOS interface files (.xib, .storyboard).
    • scripts/: Contains build automation scripts for resource preparation and post-build tasks.
  8. Use IPlug Extras DSP classes

    master

    The IPlug/Extras directory contains a collection of DSP (Digital Signal Processing) classes designed to facilitate plug-in development. Note that these implementations are provided for convenience and are not necessarily highly optimized for production use.

    Available DSP components include:

    • ADSR: A basic ADSR Envelope generator.
    • MidiSynth: A monophonic/polyphonic MPE-capable synthesizer base class. You can supply it with a custom voice implementation.
    • OverSampler: A class for performing up to 16x oversampling of a signal.
    • Oscillator: An oscillator base class and its inheriting classes, including a fast sinusoidal table lookup oscillator.
    • LFO: An unoptimized, tempo-syncable Low Frequency Oscillator.
    • SVF: A multi-channel State Variable Filter for basic EQing.
    • NChanDelay: A multi-channel delay line that delays all channels by the same amount.
    • WebSocket: Classes for remote controlling a plug-in via WebSockets.
  9. Overview of RtMidi MIDI I/O

    master

    RtMidi is a C++ library providing a unified API for real-time MIDI input and output across multiple platforms: Linux (ALSA & JACK), macOS (CoreMIDI & JACK), and Windows (Multimedia).

    Key characteristics:

    • Object-Oriented: Uses RtMidiIn for input and RtMidiOut for output.
    • Single Connection: Each class instance manages exactly one MIDI connection.
    • Immediate Output: The library does not handle timing; output messages are sent immediately upon calling.
    • Timestamped Input: Input messages include delta times in seconds (as double).
    • Data Format: MIDI data is passed to the user as raw bytes using std::vector<unsigned char>.