C++ audio plug-in framework for desktop, mobile (iOS) and web

Overview

iPlug 2

C++ audio plug-in framework for desktop, mobile (iOS) and web

Build Status

iPlug 2 is a simple-to-use C++ framework for developing cross-platform audio plug-ins/apps and targeting multiple plug-in APIs with the same minimalistic code. It abstracts an audio plug-in (IPlug) and its drawing engine/GUI toolkit (IGraphics). IGraphics is a simple UI toolkit with good performance which contains a collection of common controls well suited for audio plug-ins, either using bitmap or vector graphics. Alternatively examples are included showing how you can use technologies such as HTML/CSS or SwiftUI on top of a C++ DSP layer.

The original version of iPlug was released in 2008 as part of Cockos' WDL library. iPlug 2 (2018) is a substantial reworking that brings multiple vector graphics backends to IGraphics (including GPU accelerated options and HiDPI/scaling), a better approach to concurrency, support for distributed plug-in formats and compiling to WebAssembly via emscripten, amongst many other things.

iPlug 2 targets the VST2, VST3, AUv2, AUv3, AAX (Native) and the Web Audio Module (WAM) plug-in APIs. It can also produce standalone win32/macOS apps with audio and MIDI I/O, as well as Reaper extensions. Windows 8, macOS 10.11, and iOS 13 are the official minimum target platforms, but depending on the graphics backend used, you may be able to make it work on earlier operating systems.

iPlug 2 includes support for the FAUST programming language, and the libfaust JIT compiler. It was the winner of the 2018 FAUST award.

iPlug 2 is licensed with a liberal zlib-like license, which means that it is free to use in closed source projects and is free from corporate interference.

You can discuss iPlug 2 on the iPlug2 forum or on the iPlug user's slack channel.

We welcome any help with bug fixes, features or documentation.

NOTE: We don't yet consider iPlug2 to be "production ready" since the we (the main devs) didn't ship our products with it yet, but it's nearly there. Read more here.

You can help support the project financially in several ways, preferably via github sponsors but also via patreon or paypal donations. With regular financial support, more time can be spent maintaining and improving the project. Even small contributions are very much appreciated.

patreon paypalslack

Issues
  • Add loading of in-memory resources.

    Add loading of in-memory resources.

    I do NOT consider this PR merge-ready yet. It needs testing on Mac and iOS, and support for LoadBitmap needs to be added to the Canvas backend, and maybe the Cairo, AGG and Lice backends. That being said, I'm putting it up for review.

    Major changes:

    • New overloads for LoadBitmap(), LoadSVG(), and LoadFont() to enable loading resources directly from memory.
    • xxd.py in the Scripts directory for generating C++ source/header files from binary files. Ideally this would become part of the build process for users who want to use this feature.
    opened by Bindernews 31
  • Control binded to a param not redrawn when automated (Live/VST3)

    Control binded to a param not redrawn when automated (Live/VST3)

    Describe the bug When a IKnobControl is binbed to a param and the param is automated from a DAW the IKnobControl is not updated with the new values of the param.

    If I manually rescale the plugin window while the param is been automated a redraw is forced and the knob is properly updated.

    To Reproduce

    1. Duplicate the IPlugEffect example and compile it as VST3.
    2. Create a new track on Ableton with the plugin
    3. Automate the Gain parameter
    4. Play the song
    5. Gain parameter been automated in Live is not updated in the plugin (if you resize the plugin window manually from the windows corner the knob is redrawn and the param value is updated).

    Expected behaviour Knob is updated with the new param value automatically.

    Tested on Windows 10 as VST3 64bit with NanoVG. Ableton Live 10.

    bug VST3 igraphics high priority 
    opened by baktery 30
  • Linux VST2, VST3, and APP support

    Linux VST2, VST3, and APP support

    References issue #105 I've spent the last two days or so working on this. I managed to get VST2 and VST3 working in REAPER without too much trouble, GUI and all. It's a little laggy when resizing the GUI, but that could be because I'm using a VM.

    The build system uses CMake for maximum compatibility, and will even copy resources into the appropriate folders for each target type. Note that all resources are currently dumped into their respective folder or just the root resources folder, relative paths are WIP.

    Now the problem: standalone apps. For some reason the GUI doesn't resize correctly when you open the app. The main window and all internal variables are correct, but the view only displays the top-left 100x100 pixels (that being the default size). I'm not familiar enough with X11 to know what the issue is, so I was hoping some assistance there (@AZSlow3 ?).

    I also don't have LV2 support implemented yet, but that experimental LV2 support shouldn't be too hard to add given there's already some code for it.

    I also need some decisions on the CMake scripts. When naming variables and functions should I use iplug or iplug2 (e.g. iplug_configure_target vs iplug2_configure_target. I'm leaning towards just iplug given that the C++ namespace is just iplug.

    Also: I need to add support for other IGraphics backends on Linux before I'd consider the CMake builds ready.

    TL;DR: VST2 and VST3 working (NanoVG, GL2, GL3), need help with App (looks like embedded X11 window isn't resizing properly), and LV2 is NYI.

    opened by Bindernews 29
  • Low frame rate on Windows

    Low frame rate on Windows

    Just using the performance display, it seems I don't get over 40 frames per second on Windows, on my machine with an integrated GPU or on VM. Should investigate the timer that is used and see if there's a better option

    igraphics win 
    opened by olilarkin 23
  • Faulty wide char conversion on Windows

    Faulty wide char conversion on Windows

    Windows only!

    Functions UTF8ToUTF16 and UTF16ToUTF8 seem to produce garbage if language specific characters like "ä","ö","ü" etc are involved. Currently the Windows functions MultiByteToWideChar and WideCharToMultiByte are called with the parameter "CP_UTF8" which seems to be the problem. Using "CP_ACP" instead seems to fix the issue.

    All Windows based formats are affected (vst2, vst3, aax).

    To Reproduce: Make a folder with with the name "Öffnen" (engl. open) and create a file in this folder. Call PromptForFile and open this file. Full file name shows garbage.

    opened by TBProAudio 22
  • AUv2, VST3 the sidechain does not work when set 4-4 channels

    AUv2, VST3 the sidechain does not work when set 4-4 channels

    I apologize in advance for the meager description, but the facts are described in the topic along with the photo. I think this is a separate bug.

    First - https://github.com/iPlug2/iPlug2/issues/846

    Second:

    Type plugin: compressor Configuration for Reaper (only) works fine (AUv2, VST3 the sidechain does not work when setting 4-4 channels):

    #define PLUG_CHANNEL_IO "\
    1-1 \
    1.1-1 \
    1.2-1 \
    2.1-2 \
    2-2 \
    2.2-2 \
    4-4 \
    4.1-4 \
    4.2-4"
    

    Place this config in a compressor with a side chain. Compile the plugin in AU v2 and VST3 format. Turn on the side chain, or select 4 channels in the Reaper.

    opened by wcrhlo 21
  • VST2/3 crashes DDMF Plugindoctor on SetHost

    VST2/3 crashes DDMF Plugindoctor on SetHost

    I can't determine when exactly this occured, but since few days plugins don't load in Plugindoctor (win-x64, VST2/3). Debug mode shows it fails the assert, I guess it was in IPlugAPIBase::SetHost kHost = kHostUnInit. In Reaper the same binary works fine.

    opened by johannesmenzel 19
  • Faust example not working on Windows

    Faust example not working on Windows

    I recently cloned IPlug2 and have been able to build all example projects on windows10 with the exception of IPlugFaustDSP. I am sure that I need to configure the Dependencies/Extras/faust folder..... i'm just not sure how. I'm also curious as to what should go in the civetweb folder. When I open the VS solution for IPlug2FaustDSP, I get the following errors.... Error (active) E1696 cannot open source file "faust/gui/UI.h" IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 18

    Error (active) E1696 cannot open source file "faust/gui/MidiUI.h" IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 19

    Error (active) E1696 cannot open source file "swell.h" IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust_edit.h 8

    Error (active) E1696 cannot open source file "curses.h" IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust_edit.h 9

    Error (active) E1696 cannot open source file "curses_editor.h" IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust_edit.h 10

    Error (active) E0262 not a class or struct name IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 36

    Error (active) E0262 not a class or struct name IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 36

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 203

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 211

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 212

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 213

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 214

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 216

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 221

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 226

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 231

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 236

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 242

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 243

    Error (active) E1455 member function declared with 'override' does not override a base class member IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 244

    Error (active) E0020 identifier "Soundfile" is undefined IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 244

    Error (active) E0282 the global scope has no "dsp" IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 317

    Error (active) E0020 identifier "MidiUI" is undefined IPlug2FaustDSP-vst2 C:\SDKs\iPlug2\IPlug\Extras\Faust\IPlugFaust.h 318

    FAUST 
    opened by dmsplugins 17
  • support for creating/copying plugins outside the iPlug2 SDK tree

    support for creating/copying plugins outside the iPlug2 SDK tree

    Currently, the IPLUG2_ROOT setting in the SDK root's common-win.props overwrites the plugin project's own setting and makes the build fail. Is there any way to avoid this?

    I want to put my plugin source code into my source code repo without adding the entire SDK.

    opened by jjYBdx4IL 15
  • OnMouseDrag() does not update mMouseIsOver flag

    OnMouseDrag() does not update mMouseIsOver flag

    Describe the bug Happens with controls inheriting from IKnobControlBase or other IControl base classes if the child class depends on the parent functions. When dragging the mouse the mMouseIsOver flag is not updated which can result in a wrong drawing.

    To Reproduce Drag control + mouse up + do not move cursor. When the cursor is moved again OnMouseOut() will reset the flag and the control will draw correctly again. You can observer this behaviour in IPlugControls example.

    Expected behaviour Don't have to move cursor, the state is already updated before.

    bug igraphics 
    opened by pressplay-music 15
  • Implemented removal of single controls

    Implemented removal of single controls

    Allows removing controls with or without destroying the IControl. Added a OnDetached function which clears the delegate. Added a zIndex like render priority

    opened by TobiasKozel 15
  • (CMake) Standalone app build issues

    (CMake) Standalone app build issues

    Hi, I have detected two small problems in the cmake configuration when trying to build the standalone application on windows.

    • The postbuild-win.bat.in is using the variable IPLUG2_APP_NAME instead of PLUG_NAME for the NAME field and this is causing the output of that binary to be empty.

    • In APP.cmake the res_dir is not being set for WIN32. As a consequence the application does not create the window correctly and throws the error 1813 ERROR_RESOURCE_TYPE_NOT_FOUND. The solution is as simple as setting the resources path just like in the other configs: set(res_dir "${CMAKE_BINARY_DIR}/${PLUG_NAME}-app/resources")

    I have created a PR with two small changes that fix this issue!

    opened by markortu 0
  • SendSysexMsgFromDelegate() only called in WAM/VST3 distributed

    SendSysexMsgFromDelegate() only called in WAM/VST3 distributed

    diff --git a/IPlug/VST3/IPlugVST3_ProcessorBase.cpp b/IPlug/VST3/IPlugVST3_ProcessorBase.cpp
    index 56267d38a95de898706f1af32f172aa49886715a..8bad7c5fd8fa1b7f947beade2511d4821f4854ae 100644
    --- a/IPlug/VST3/IPlugVST3_ProcessorBase.cpp
    +++ b/IPlug/VST3/IPlugVST3_ProcessorBase.cpp
    @@ -107,6 +107,11 @@ void IPlugVST3ProcessorBase::ProcessMidiIn(IEventList* pEventList, IPlugQueue<IM
               {
                 ISysEx syx = ISysEx(event.sampleOffset, event.data.bytes, event.data.size);
                 ProcessSysEx(syx);
    +           
    +#ifdef VST3_API
    +            SysExData msg {event.sampleOffset, static_cast<int>(event.data.size), event.data.bytes};
    +            mPlug.mSysExDataFromProcessor.Push(msg); // queue incoming Sysex for UI
    +#endif
                 break;
               }
             }
    diff --git a/IPlug/IPlugAPIBase.h b/IPlug/IPlugAPIBase.h
    index 673dd34060c6fca2da82f52173aa6fa7f51a5e19..d16fe1260d622588a397b46e428fafc2158fed60 100644
    --- a/IPlug/IPlugAPIBase.h
    +++ b/IPlug/IPlugAPIBase.h
    @@ -218,6 +218,7 @@ private:
       friend class IPlugVST3;
       friend class IPlugVST3Controller;
       friend class IPlugVST3Processor;
    +  friend class IPlugVST3ProcessorBase;
       friend class IPlugAU;
       friend class IPlugAUv3;
       friend class IPlugWEB;
    
    
    opened by olilarkin 0
  • Windows: reduced flickering when resizing the plugin

    Windows: reduced flickering when resizing the plugin

    Describe the bug Resizing a plugin (VST3) or the app in Windows (10/11) causes some unpleasant flickering. This is mainly the case when increasing the size of the window/plugin.

    To Reproduce

    1. Run the example "IPlugEffect" as an app or plugin
    2. Resize the app/plugin
    3. When increasing the size, the display flickers

    Expected behavior The app/plugin should flicker as less as possible when getting resized.

    IMPORTANT DETAILS

    • What plug-in format does it relate to - VST3, APP
    • What platform does it relate to - Windows
    • What IGRAPHICS_BACKEND does it relate to - ALL
    opened by asedev 1
  • IGraphics: Clipping with paths additional to rectangular clipping

    IGraphics: Clipping with paths additional to rectangular clipping

    IGraphics: Clipping with paths additional to rectangular clipping:

    https://github.com/iPlug2/iPlug2/issues/864

    this PR enables clipping with the mMainPath for skia . For NanoVg theres an empty function provided, but not yet a working implementation.

    opened by janhase88 0
  • IGraphics: Clipping with paths additional to rectangular clipping

    IGraphics: Clipping with paths additional to rectangular clipping

    clipping with path enables the user to clip a region where the shape is defined by a path. so the user could write:

    G.PathClear()
    G.PathRoundRect(SomeRect, SomeRect.GetLengthOfShortestSide() * 0.2);
    G.PathClipPath();
    //this would clip anything drawn below with the PathRoundRect of SomeRect
    
    opened by janhase88 4
Releases(setup)
vintage - a declarative API for C++ audio plug-ins

This is an experiment in seeing how far modern C++ features allow to write purely declarative code and introspect this code through various reflection-like features.

Jean-Michaël Celerier 28 Jun 22, 2022
simple audio mixer for native and web

?? auph ?? Trivial audio mixer API for native and web targets. Online Demo ⚠️ Work in progress! API is constantly changing. The native playback at the

Elias Ku 13 Jul 1, 2022
PortAudio is a portable audio I/O library designed for cross-platform support of audio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.

PortAudio 668 Aug 2, 2022
Lightweight Embedded Audio Framework

LEAF (Lightweight Embedded Audio Framework) is a C library for audio synthesis and processing created by Jeff Snyder, Mike Mulshine, and Matt Wang at Princeton University's New Instrument Research Lab. It was originally called OOPS when we started writing it in 2017, so you may see references to it under that name as well.

Jeff Snyder 103 Jul 26, 2022
OpenDeck is a platform suited both for prototyping and developing custom MIDI controllers with easy to use web configurator

Software and hardware platform for simpler building of MIDI controllers with support for DMX.

Shantea Controls 437 Aug 8, 2022
Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems

Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Audacity is open source software licensed under GPL, version 2 or later.

Audacity 7.8k Aug 5, 2022
Sneedacity (formerly Audacity) is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems.

Sneedacity (formerly Audacity) is an easy-to-use, multi-track audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. Sneedacity is open source software licensed under GPL, version 2 or later.

Sneed's Feed & Seed 867 Aug 1, 2022
A command line and keyboard based strategy-game written in c++, where audio-input determines the AI-strategy and lays the seed for the map-generation.

Table of contents Dissonance Premise Installation Requirements Installation Quick-guide Detailed installation guide Usage Logfiles Tests Uninstall Kno

fux 23 May 21, 2022
C++ library for audio and music analysis, description and synthesis, including Python bindings

Essentia Essentia is an open-source C++ library for audio analysis and audio-based music information retrieval released under the Affero GPL license.

Music Technology Group - Universitat Pompeu Fabra 2.2k Aug 8, 2022
CodeSpeak is a web-based code editor that lets users code with the power of their voice

Welcome to CodeSpeak! CodeSpeak is a web-based code editor that lets users code with the power of their voice. It's currently in an embryonic stage, b

Seth Wilson 134 Jun 4, 2022
A simple C++ library for reading and writing audio files.

AudioFile A simple header-only C++ library for reading and writing audio files. Current supported formats: WAV AIFF Author AudioFile is written and ma

Adam Stark 615 Aug 2, 2022
A C library for reading and writing sound files containing sampled audio data.

libsndfile libsndfile is a C library for reading and writing files containing sampled audio data. Authors The libsndfile project was originally develo

null 1k Aug 4, 2022
C library for cross-platform real-time audio input and output

libsoundio C library providing cross-platform audio input and output. The API is suitable for real-time software such as digital audio workstations as

Andrew Kelley 1.6k Aug 7, 2022
C++ Audio and Music DSP Library

_____ _____ ___ __ _ _____ __ __ __ ____ ____ / \\_ \\ \/ / |/ \| | | | \_ \/ \ | Y Y \/ /_ \> <| | Y Y \ | |_|

Mick Grierson 1.3k Aug 3, 2022
Single file audio playback and capture library written in C.

A single file library for audio playback and capture. Example - Documentation - Supported Platforms - Backends - Major Features - Building - Unofficia

David Reid 2.4k Aug 10, 2022
Easy and efficient audio synthesis in C++

Tonic Fast and easy audio synthesis in C++. Prefer coding to patching? Love clean syntax? Care about performance? That's how we feel too, and why we m

null 466 Aug 9, 2022
An OBS plugin that allows capture of independant application audio streams on Windows, in a similar fashion to OBS's game capture and Discord's application streaming.

win-capture-audio An OBS plugin based on OBS's win-capture/game-capture that hooks WASAPI's audio output functions (rather than the various graphics A

Joe Kaushal 2.5k Aug 4, 2022
Synthesizer Modules and Audio Circuits

Dintree Synthesizer Modules and Audio Circuits 2020-07-14: You can now try Dintree modules within VCV Rack! I have created virtual versions of most mo

Andrew Kilpatrick 29 Jul 26, 2022