1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<?xml version="1.0" ?>
<!DOCTYPE ladspa SYSTEM "ladspa-swh.dtd">
<?xml-stylesheet href="ladspa.css" type="text/css" ?>
<ladspa>
<global>
<meta name="maker" value="Alexander Ehlert <mag@glame.de>"/>
<meta name="copyright" value="GPL"/>
<meta name="properties" value="HARD_RT_CAPABLE"/>
<code>
#include "util/iir.h"
</code>
</global>
<plugin label="bandpass_a_iir" id="1893" class="BandpassPlugin">
<name>Glame Bandpass Analog Filter</name>
<p> IIR bandpass filter modeled after an analog circuit. This filter was ported from the glame multitrack editor to ladspa.
</p>
<callback event="instantiate">
sample_rate = s_rate;
</callback>
<callback event="run">
calc_2polebandpass(iirf, gt, center, width, sample_rate);
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count);
</callback>
<callback event="activate">
plugin_data->gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
plugin_data->iirf = init_iirf_t(plugin_data->gt);
calc_2polebandpass(iirf, plugin_data->gt, *(plugin_data->center), *(plugin_data->width), sample_rate);
</callback>
<callback event="cleanup">
free_iirf_t(plugin_data->iirf, plugin_data->gt);
free_iir_stage(plugin_data->gt);
</callback>
<port label="center" dir="input" type="control" hint="default_low, sample_rate, logarithmic">
<name>Center Frequency (Hz)</name>
<range min="0.0001" max="0.45"/>
</port>
<port label="width" dir="input" type="control" hint="default_middle, sample_rate, logarithmic">
<name>Bandwidth (Hz)</name>
<range min="0.0001" max="0.45"/>
</port>
<port label="input" dir="input" type="audio">
<name>Input</name>
</port>
<port label="output" dir="output" type="audio">
<name>Output</name>
</port>
<instance-data label="iirf" type="iirf_t*"/>
<instance-data label="gt" type="iir_stage_t*"/>
<instance-data label="sample_rate" type="long"/>
</plugin>
</ladspa>
|