The CMT LADSPA plugin collection is written in C++ and uses a little additional sophistication to make plugin writing easier. This document describes how to add a new plugin to the toolkit.
CMT plugins interpret
LADSPA_Handle entities as
pointers to objects derived from the
class. Plugin instance structures are defined by subclassing this, so
writing a descendent of
CMT_PluginInstance is the first
thing to do. The CMT library provides its own implementation of
cleanup() and a templated
CMT_Instantiate<>()). These calls assume that any
instantiation or cleanup mechanisms required will be written in the
constructor or destructor of the class.
When writing a plugin module, an initialisation function should be
included. To ensure this is called, add a call to the
initialise_modules() function in
descriptor.cpp. The module should also be added to the
Your initialisation function should construct new
CMT_Desctiptor plugin descriptor structures and pass them
CMT_Descriptor is directly descended from
LADSPA_Descriptor but provides constructor, destructor
All plugins need unique IDs. During development, use values between 1 and 1000. When the plugin is ready, please request a block of IDs from firstname.lastname@example.org.
In practice, CMT plugin writing is probably best learned by
example. For a simple case, see the
module. This defines a
SimpleMixer class to handle
instance data, a
runSimpleMixer() function for use with
it and a
mixer_descriptor() function to provide a
description of the plugin to the CMT core. The
mixer_descriptor() function is declared and referenced in
descriptor.cpp module. Additional information is
CMT plugins are licenced under GPL version 2. Please read and understand this license before submitting plugins to the library.