Building a plugin for MOD Duo and MOD Duo X

From MOD Wiki
Revision as of 12:58, 26 September 2019 by Leogermani (talk | contribs) (build root section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This is a quick start guide to get an LV2 plugin running in a MOD Duo device. Let's cut the chatter and get started.

LV2 Basics

This information is well described elsewhere. The SDK assumes that you have a working lv2 plugin for desktop linux. If you haven't gotten that far, you should start with these links:

Prepare build tools

This section needs to be updated with DuoX information

In order to run a plugin in the MOD Duo we must compile it for its specific architecture.

The Duo uses an ARMv7 processor running a very basic and stripped-down version of Linux.

Several audio-related libraries are included (fftw, libsndfile, libresample, etc) as well as generic libraries (boost, eigen, qt5core, etc).

We currently provide a custom build system that gives developers a similar system to what's available inside the Duo.

Do not use a regular Linux system, it might lead to issues due to mismatching library versions.

If you're running Linux just clone MOD Plugin Builder and follow the instructions.

In summary:

$ git clone git://
$ cd mod-plugin-builder
$ ./

This process should take at least 1 hour, probably more depending on your CPU. When it finishes you'll be able to build plugins for Duo.

Using docker

Alternatively, if you're familiar with docker or are not running Linux, you can also use our mod-plugin-builder image which includes an already built system.

See this HowTo for more information about docker and mod-plugin-builder.

Build using buildroot '.mk' files

In order to publish your plugin in Mod Labs cloud, you need to use buildroot. See this guide on how to use buildroot to build plugins.

Local development

For local development of plugins using buildroot can be bothersome and confusing.

You can use the cross-compiler and toolchain directly instead of going through buildroot methods.

Note that this expects that your source code build system is cross-compile friendly (ie, no hardcoded compiler and paths and uses pkg-config to find extra libraries).

Also this only works on a real Linux system, without using docker.

The setup is as simple as: (adjust as needed)

$ . ~/mod-plugin-builder/local.env
$ make

The local.env file will setup your Linux compiler environment variables (such as CC, CXX, CFLAGS, etc) to use mod-plugin-builder files.

If everything goes well, the resulting binaries will be ARMv7, MOD Duo compatible.

Quick example plugin

A quick example plugin is available inside mod-plugin-builder in make -C plugins/package/eg-amp-lv2/source/, which works with this cross-compilation setup.


Building this example plugin is as simple as:

$ . ~/mod-plugin-builder/local.env
$ make -C ~/mod-plugin-builder/plugins/package/eg-amp-lv2/source

That's it! After this the eg-amp.lv2 bundle is ready to be deployed into a MOD unit.