MOD Duo provides a platform for you to express your musical creativity. There are infinite ways of combining audio effects into Pedalboards, each one producing its own unique sound. Finding that unique sound can be as much fun as playing itself. The Duo ships with 50 plugins pre-installed and another 120 can already be found in our Plugin Store for free. One of the most interesting thing about the Duo is that you can not only combine a multitude of audio effects but you can also create your own!

The purpose of these articles is to walk you through the tools and steps necessary to create and publish your own plugin, in LV2 format. We will explain how to start an LV2 plugin from scratch, how to gather the tools to build it and how to push it to your MOD for some fun time.

The requirements to follow these series are:

  • Familiar with Linux command line tools
  • Basic C knowledge
  • Be curious

These series will be composed of multiple posts. Part 1 will cover the basics of LV2 and discuss the overall idea behind creating an audio plugin. Part 2 will walk through the development of a plugin with a full source code example, plus the tools and steps to build it. Part 3 will show how to build and deploy specifically to MOD Duo and how to create a nice interface for it using our SDK wizard.

If you’re not a professional programmer don’t be scared. Just follow the steps in this series and by the end of it, you will have the sound of your instrument flowing through your own code inside MOD Duo’s metal and soul.

Even though this article will be running examples on a Linux box, thanks to Docker it’s perfectly possible to run them from any Windows or Mac computer. You don’t really need to have a full Linux distro installed as long as you can run the Docker engine in your computer. A standard Virtual Machine would work as well but using docker is a lot simpler as there’s already a Docker image for our mod-plugin-builder project which we’ll talk about later.

Before we start it’s worth mentioning that a lot of the content discussed in this post is explained in more detail in the following wiki pages (which will be more up-to-date than this blog post later on):

If the steps are not working for you or if you want to find alternatives you should definitely explore the wiki pages. Also, do not hesitate to join our MOD Forum where you can engage with the community and ask for help.

What is LV2 anyway?

From the wikipedia: “LV2 is an open standard for audio plugins. It includes support for audio synthesis (generation) and digital signal processing of digital audio and MIDI”.

And from the LV2 official page: “LV2 is an open standard for audio plugins, used by hundreds of plugins and other projects. At its core, LV2 is a simple stable interface, accompanied by extensions which add functionality to support the needs of increasingly powerful audio software”.

In short, what all this means is that you’re accepting a trade-off. In order to simplify the amount of work involved in implementing an audio plugin, you will be adopting a standard which enforces certain rules that you must follow.

Basically, a plugin will be running on a host which supports the LV2 standard. The host is responsible for capturing the audio input and delivering the signal (samples) to each plugin using a pre-defined contract. The audio data received depends on the audio in and out connections. As an LV2 plugin developer all you care about is receiving the audio samples (input); doing your magic, and then sending them to the output.

On the other side of the trade-off the developers have few responsibilities:

  • The source code must be implemented using the lv2.h definition
  • Every plugin must have an RDF file descriptor (manifest.ttl) defining the meta-data (including plugin name, description, control ports details, user interface definitions and more)

There are some other small details but those two are the key points.

The MOD Duo uses mod-host which is an open-source LV2 host running on top of Jack. That host is responsible for creating what we call a Pedalboard which is nothing but a bunch of plugins interconnected.

Other than the audio processing code and meta-data, plugins usually have their own UI (user interface) which allows you to change its parameters and eventually see some of its internal states. Because the Duo provides a single web UI specification for all plugins it means there’s an extra trade-off for developers: they have to provide a specifically-made web UI if they want their plugin to work nicely with the MOD. Luckily that there’s a wizard in our SDK which greatly helps in this regard. Some plugins have pretty simple UI and others take a step further and provide a very rich user experience.

As you can see there’s a lot to cover. This blog series only present a viable entry point to anybody that is interested in building an LV2 plugin. After that, it’s up to you to find ways to change the sound, experiment, test, and take it that extra step forward to discover the true power of software audio plugins.