Description

A library for crafting native audio plugins as simply as possible.

Package Information

Version4.0.27 (2017-Jan-11)
Homepagehttp://github.com/p0nce/dplug/
Repositoryhttps://github.com/p0nce/dplug
LicenseVST
CopyrightSteinberg
AuthorsGuillaume Piolat, Andrej Mitrovic, Sean M. Costello (Hilbert transformer)
Registered byponce
Sub packages
dplug:core
dplug:dsp
dplug:client
dplug:graphics
dplug:host
dplug:vst
dplug:au
dplug:window
dplug:gui
dplug:cocoa
dplug:carbon
Dependenciesnone

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

<img alt="logo" src="https://cdn.rawgit.com/AuburnSounds/dplug/master/logo.svg" width="200">

Dplug Build Status <a href="https://code.dlang.org/packages/dplug" title="Go to dplug"><img src="https://img.shields.io/dub/v/dplug.svg" alt="Dub version"></a> <a href="https://code.dlang.org/packages/dplug" title="Go to dplug"><img src="https://img.shields.io/dub/dt/dplug.svg" alt="Dub downloads"></a>

Dplug is a library for crafting audio plugins as simply as possible.

Current features

  • Creating VST 2.4 plugins on Windows and Mac OS X, 32-bit and 64-bit
  • Creating Audio Unit v2 plugins for Mac OS X, 32-bit and 64-bit
  • Comes with basic music DSP algorithms
  • Comes with a number of tools to make plugin creation faster (bundling, color correction, regression tests, stress tests)
  • Dplug is using Physically Based Rendering to keep installers small: http://www.auburnsounds.com/blog/2016-09-16_PBR-for-Audio-Software-Interfaces.html

Example screenshot Example screenshot

Release notes

  • v4.x.y (2nd Nov 2016)
  • macOS Sierra support fixed.
  • To allow that, the D runtime is now linked with but disabled. No GC, no TLS, no global ctor/dtor.
  • Does not rely on external libraries anymore. Everything is self-contained in dplug.
  • v3.x.y (9th May 2016):
  • Audio Unit compatibility added, with both Cocoa and Carbon UI. What is still missing from AU: Audio Component API, sandboxing, v3. In other words it's on parity with IPlug but not JUCE.
  • The release tool is now much more friendly to use.
  • Special keys in dub.json are now expected in a plugin.json file next to dub.json. In the future it will be the place of autority for information about a plugin, for now this has to be duplicated in buildPluginInfo() override. An empty plugin.json is OK, defaults are in place.
  • The Wiki became a place to visit.
  • no API guarantee yet. Do not expect things not to change.
  • v2.x.y: (6th January 2016)
  • this is the next release, and API will break without notice
  • supports VST for 32-bit and 64-bit, Windows and Mac
  • release tool now expects a VST or AU configuration, see the distort example for details
  • special dub.json key CFBundleIdentifier became CFBundleIdentifierPrefix, see how distort works to update your plugins dub.json
  • 10.6 compatibility dropped.
  • v1.x.y: (26th May 2015)
  • initial release, VST support for 32-bit and 64-bit, Windows and Mac

Tutorial

https://auburnsounds.com/blog/2016-02-08_Making-a-Windows-VST-plugin-with-D.html

How to build plugins

For Windows:

  • Use DMD >= v2.067 or LDC >= v1.0.0-b2
  • Install DUB, the D package manager: http://code.dlang.org/download
  • Go into an example directory
  • Type dub --compiler=dmd or dub --compiler=ldc2 depending on the compiler used.

For OS X:

  • Use DMD >= v2.067 or LDC >= v1.0.0-b2
  • Install DUB, the D package manager: http://code.dlang.org/download
  • Build and use the release tool which is in the tools/release/ directory.
  • Go into an example directory
  • Type release --compiler dmd or release --compiler ldc depending on the compiler used.
  • This tool is needed to create the whole bundle.

FAQ

  • How do I build plugins for OS X?

You need to use the release program in the toolsdirectory. This tool create a bundle and Universal Binaries as needed. Like most D programs, you can build it by typing dub.

  • What is the oldest supported Windows version?

Windows Vista. Users report plugins made with both DMD and LDC work on Windows XP. But XP isn't officially supported by D compilers.

  • What is the oldest supported OS X version?

OS X 10.7+

  • What D compiler can possibly be used?

See .travis.yml for supported compilers. The latest DMD or LDC should do.

  • Is Dplug stable?

The interface tend to change a bit for improvements. Starting with v4 we'll issue major version tag for breaking changes, but SemVer isn't always followed.

  • Will you fix the bugs I encounter?

I can't guarantee it. This software is released for free. It doesn't mean support is for free. If you want something to be changed, you can do it yourself or use the bounty system.

  • How are TODO, FUTURE and MAYDO comments defined?

TODO represent a bug a user could possibly bump into. FUTURE represent an future enhancement that could concern speed, maintainability or correctness but doesn't affect the experience much, if any. MAYDO represent things that we could want to do given enough time.

Comparison vs IPlug

Pros:

  • No dispatcher-wide mutex lock. All locks are of a short duration, to avoid blocking the audio thread.
  • Plugin parameters implement the Observer pattern.
  • Float parameters can have user-defined mapping.
  • PBR-style rendering lets you have a good visual quality with less disk space, at the cost of more work.
  • No need to deal with resource compilers: D can import("filename.ext") them.
  • No need to maintain IDE project files, they are generated by DUB.
  • No need to make Info.plist files, they are generated instead.
  • No need to use Xcode whatsoever.
  • No need to use a MacOSX SDK.

Cons:

  • AAX and VST3 unimplemented.
  • No resizeable UI yet.
  • No HDPI support yet.
  • No modal windows.

Licenses

Dplug has three different licenses depending on the part you need. For an audio plugin, you would typically need all three. I recommend that you check individual source files for license information.

Plugin format wrapping

Plugin wrapping is heavily inspired by the WDL library (best represented here: https://github.com/olilarkin/wdl-ol).

Some files falls under the Cockos WDL license.

Important contributors to WDL include:

  • Cockos: http://www.cockos.com/
  • Oliver Larkin: http://www.olilarkin.co.uk/

However Dplug is far from a translation of WDL (see FAQ).

VST SDK translation

This sub-package falls under the Steinberg VST license.

VST is a trademark of Steinberg Media Technologies GmbH. Please register the SDK via the 3rd party developper license on Steinberg site.

Before you make VST plugins with Dplug, you need to read and agree with the license for the VST3 SDK by Steinberg. If you don't agree with the license, don't make plugins with Dplug. Find the VST3 SDK there: http://www.steinberg.net/en/company/developers.html

Misc

Other source files fall under the Boost 1.0 license.

Contents of the tree

dplug:client

  • Abstract plugin client interface. Currently implemented for VST and AU.

dplug:host

  • Abstract plugin host interface. Basic support for VST hosting.

dplug:vst

  • VST 2.4 plugin client implementation

dplug:au

  • Audio Unit v2 plugin client implementation

dplug:window

  • implements windowing for Win32, Cocoa and Carbon

dplug:gui

  • Needed for plugins that do have an UI
  • Toolkit includes common widgets (knob, slider, switch, logo, level, label...)
  • Physically Based Renderer for a fully procedural UI

dplug:dsp

  • Basic support for audio processing:
    • FFT and windowing functions (STFT with overlap and zero-phase windowing)
    • FIR, 1st order IIR filters and RBJ biquads
    • mipmapped wavetables for antialiased oscillators
    • noise generation including white/pink/demo noise
    • various kinds of smoothers and envelopes
    • delay-line and interpolation

dplug:derelict-nogc

  • Enables dynamic library loading without using the D runtime

dplug:carbon

  • Dynamic Carbon bindings

dplug:cocoa

  • Dynamic Cocoa bindings

Examples

  • examples/distort: mandatory distortion plugin
  • examples/ms-encode: simplest plugin for tutorial purpose
  • examples/time_stretch: resampling x2 through FFT zero-padding

Tools

  • tools/pbr-sketch: playground for creating plugin background textures
  • tools/release: DUB frontend to build Mac bundles and use LDC with proper envvars
  • tools/process: plugin host for testing audio processing speed/reproducibility
  • tools/wav-compare: comparison of WAV files
  • tools/stress-plugin: makes multiple load of plugins while processing audio mainly to test GUI opening speed
  • Lift-Gamma-Gain-Contrast: adjust color correction curves on a finished UI http://www.gamesfrommars.fr/lift-gamma-gain-contrast/

Available versions

4.0.27 4.0.26 4.0.25 4.0.24 4.0.23 4.0.22 4.0.21 4.0.20 4.0.19 4.0.18 4.0.17 4.0.16 4.0.15 4.0.14 4.0.13 4.0.12 4.0.11 4.0.10 4.0.9 4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.0.47 3.0.46 3.0.45 3.0.44 3.0.43 3.0.42 3.0.41 3.0.40 3.0.39 3.0.38 3.0.37 3.0.36 3.0.35 3.0.34 3.0.33 3.0.32 3.0.31 3.0.30 3.0.29 3.0.28 3.0.27 3.0.26 3.0.25 3.0.24 3.0.23 3.0.22 3.0.21 3.0.20 3.0.19 3.0.18 3.0.17 3.0.16 3.0.15 3.0.14 3.0.13 3.0.12 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.4 3.0.3 3.0.2 3.0.1 3.0.0 2.0.68 2.0.67 2.0.66 2.0.65 2.0.64 2.0.63 2.0.62 2.0.61 2.0.60 2.0.59 2.0.58 2.0.57 2.0.56 2.0.55 2.0.54 2.0.53 2.0.52 2.0.51 2.0.50 2.0.49 2.0.48 2.0.47 2.0.46 2.0.45 ~master ~linux-window