Difference between revisions of "Max gen~"

From MOD Wiki
Jump to navigation Jump to search
Line 26: Line 26:
 
The most important part is the 'plugins' folder. Inside it there's more folders, each containing a separate plugin
 
The most important part is the 'plugins' folder. Inside it there's more folders, each containing a separate plugin
 
(with the exception of 'common', which provides the common/base code for gen~).
 
(with the exception of 'common', which provides the common/base code for gen~).
 +
 +
Taking the example of bitcrush, we have:
 +
* DistrhoPluginInfo.h
 +
* DistrhoPluginMaxGen.cpp
 +
* Makefile
 +
* gen_exported.cpp
 +
* gen_exported.h
 +
* gen~.bitcrush.maxpat

Revision as of 13:15, 28 October 2016

This page describes how to get Max gen~ objects working as LV2 plugins, with the purpose of running them on the MOD.
Note that the same procedure also allows for building cross-platform VST2 plugins (Linux, Mac and Windows), but without a custom graphical interface.
In this page we'll focus on LV2 and MOD.

NOTE: This is a work in progress! (specially this page!)
Except some information to be missing.

How it works

This works by mixing pre-existing plugin wrapper code with the gen~'s code export feature.
By exporting the code we can compile them together to create an LV2 plugin binary, then generate the meta-data from it.

The idea was based on the official gen-plugin-export project made by Cycling '74.
We're not using that project for MOD because it uses Juce, which requires quite a few things that unnecessary (not to mention a graphical server).

Based on that project was made DPF-Max-Gen, which uses the much simpler (and limited) DPF instead of Juce.
That way we no longer require X11, freetype and quite a few other things that Juce needs in Linux. The final binary code is also a lot smaller.
Since the plugin DSP code is all done in Max, the wrapper for exposing it as plugin does not really matter per se.
So we use the most lightweight and simple approach possible - in this case being DPF.

DPF-Max-Gen

If you open the DPF-Max-Gen project page, you'll see a few things inside.
The most important part is the 'plugins' folder. Inside it there's more folders, each containing a separate plugin (with the exception of 'common', which provides the common/base code for gen~).

Taking the example of bitcrush, we have:

  • DistrhoPluginInfo.h
  • DistrhoPluginMaxGen.cpp
  • Makefile
  • gen_exported.cpp
  • gen_exported.h
  • gen~.bitcrush.maxpat