I am proud to announce that after several months of work, LV2 is now a supported plug-in format for Dplug!  This means that any plug-in built with Dplug can easily be ported to LV2 on Windows, MacOS, and Linux.

If you aren’t already aware, Dplug is an audio plug-in framework written in D with speed and simplicity being the main focus.  I found Dplug about 3 years ago when researching new languages to try.  When I saw D had an actively maintained framework for building audio plug-ins I was sold.  Fast forward 3 years and Dplug has added support for linux, AAX, and VST3.  If you want to see what the framework is truly capable of, I recommend looking at some of the plug-ins created with it.

Why LV2?

I only recently discovered the LV2 format sometime in mid 2018.  It looked promising to me and I was excited about the idea of a completely open plug-in format.  LV2 falls under a very permissive open source license which means you don’t have to jump through any hoops or using any proprietary software just to get your plug-in out to your users.  Overall the experience of writing a wrapper for LV2 has been very nice.  The C API is straightforward and easy to use, and the documentation is excellent.  LV2 will be supported in Dplug for the foreseeable future.

Key Features of Dplug:LV2

  • Automatic manifest generation
  • No licensing agreements or restrictions
  • Supports all major desktop operating systems (Window, MacOS, and linux)
  • Easy to port existing Dplug projects
  • Written in a modern and fast language

How to get started building LV2 plugins with Dplug?

If you have an existing project its as simple as adding the following lines of code in your main plugin file

// if you only want to add LV2 support
    import dplug.lv2;

// OR if you want to support all plug-in formats

And in your dub.json file add a new configuration for LV2

    "name": "LV2",
    "versions": ["LV2"],
    "targetType": "dynamicLibrary",
    "lflags-osx-ldc": [ "-exported_symbols_list", "module-lv2.lst", "-dead_strip" ]

Make sure you have the latest dplug-build installed and in your path and then run

dplug-build -c LV2

That’s it!

If you haven’t written any plug-ins yet with Dplug then I recommend looking at the Getting Started section on github.  Also the example plugins found in the repository are a great place to start learning.

If you have any questions or just want to chat about Dplug please feel free to join us in the public D Language Discord.  We have a channel called #dplug where you can ask away!


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *