Subject: [linux-audio-dev] LADSPA XML stub generator
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Tue Oct 24 2000 - 23:03:27 EEST
Hi all,
I've just knocked up a perl script that takes an XML discription of a
simple plugin and generates the C code for it. Its very hacky, and
doesn't handle much, but it does work.
An example of a simple amplifier is:
<?xml version="1.0" ?>
<ladspa>
<global>
<maker>Steve Harris <steve_AT_totl.net></maker>
<copyright>GPL</copyright>
</global>
<plugin label="amp" id="2">
<name>Simple amplifier</name>
<callback event="run">
for (pos = 0; pos < sample_count; pos++) {
*(output++) = *(input++) * pow(gain/20, 10);
}
</callback>
<port label="gain" dir="input" type="control">
<name>Amps gain (in dB)</name>
<range min="-70" max="+70"/>
</port>
<port label="input" dir="input" type="audio">
<name>Input</name>
</port>
<port label="output" dir="output" type="audio">
<name>Output</name>
</port>
</plugin>
</ladspa>
If the callback element is empty then it just puts a stub there. run is
the only one supported, as its the only one I know how to use! Adding
others would be easy.
Plugins built entirly in XML aren't going to be very cool, but it will save
me a lot of typing/seding to get the stubs inplace.
I plan to add support for documentation generation from the XML too.
You can see the code, its output and a more useful plugin at
http://inanna.ecs.soton.ac.uk/~swh/Plugins/makestub/
beware the plugins have IDs < 1000, so don't install them.
Must eat...
- Steve
-- Stephen Harris MALIBU Technical Officer & JoDI Webmaster IAM Research Group University of Southampton, UK 07970 557047 swh_AT_ecs.soton.ac.uk 023 8059 2774
This archive was generated by hypermail 2b28 : Tue Oct 24 2000 - 23:39:57 EEST