
If you ever wrote at least 2 audio plugins in your life, for sure you have noticed you had to write a lot of duplicated code. In other words, most of the times, writing a plugin there is very little entropy from your code.
My first approach to this problem was some years ago when i did a simple code generator of the base code of a clam plugin (see these clam-devel threads for more info ‘Commit #11195: templated plugins generator‘ and ‘Frontend for automatic generation of plugin code‘)
Now i’m with a simple but i think powerful project (derived from the needs i noticed at club de audio de la fiuba) to have an application to generate code of different standards using XML based specifications. Then, as before, you nearly only need to write the signal processing code of the plugin (and can forget about the mechanical work).
The idea is to get VST, LADSPA, lv2, CLAM, Audio Units and possibly others standards base code ready to compile for different operating systems and using different build systems. Indeed, once finished, will be easy to implement new modules for others plugins specifications since will consist only into implement an interface.
My proposed xml specification (comments and suggestions are welcome!), showed as a clam plugin definition example is here. Basically contains metadata, input and output ports and controls and other build definitions:
< !DOCTYPE AudioPlugin SYSTEM "AudioPluginDef.dtd">
<audioplugin Version="0.1">
<metadata>
<name>TestRtPlugin</name>
<description>This is a test realtime audio plugin</description>
<authors>Fulano, Sultano, Mengano</authors>
<copyright Year="2010">Club de Audio FIUBA</copyright>
<license>GPL</license>
<category>Plugins</category>
</metadata>
<inputs>
<port Name="L Input">AudioInPort</port>
<port Name="R Input">AudioInPort</port>
<control Name="Gain" Min="0." Max="1.0" DefaultValue=".5">InControlFloat</control>
</inputs>
<outputs>
<port Name="L Output">AudioOutPort</port>
<port Name="R Output">AudioOutPort</port>
</outputs>
<outputplugin Standard="CLAM" BuildSystem="Scons" OS="Linux">
<basetemplatename>Default</basetemplatename>
<clam_defaultconfig> <!-- CLAM plugin specific configuration -->
<baseclass>Processing</baseclass>
<withconfig>True</withconfig>
</clam_defaultconfig>
</outputplugin>
</audioplugin>
I also thought about an UID (Uniqued ID) field at metadata, there is not showed in the example since is not needed to clam plugins.
There is also a .dtd file to check the correctness of the plugin spec.











English
Español