-
Notifications
You must be signed in to change notification settings - Fork 52
/
butterworth_1902.xml
180 lines (145 loc) · 6.04 KB
/
butterworth_1902.xml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?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 <[email protected]>"/>
<meta name="copyright" value="GPL"/>
<meta name="properties" value="HARD_RT_CAPABLE"/>
<code>
#include "config.h"
#include "util/iir.h"
#include "util/buffer.h"
</code>
</global>
<plugin label="bwxover_iir" id="1902" class="BandpassPlugin">
<name>Glame Butterworth X-over Filter</name>
<p> Butterworth X-over filter
</p>
<callback event="instantiate">
sample_rate = s_rate;
</callback>
<callback event="run">
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
iir_process_buffer_1s_5(iirf, gt, input, lpoutput, sample_count,0);
buffer_sub(input, lpoutput, hpoutput, sample_count);
// Unused variable
(void)(run_adding_gain);
</callback>
<callback event="activate">
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
iirf = init_iirf_t(gt);
butterworth_stage(gt, 0, *(plugin_data->cutoff),
*(plugin_data->resonance),
sample_rate);
</callback>
<callback event="cleanup">
free_iirf_t(plugin_data->iirf, plugin_data->gt);
free_iir_stage(plugin_data->gt);
</callback>
<port label="cutoff" dir="input" type="control" hint="default_low, sample_rate, logarithmic">
<name>Cutoff Frequency (Hz)</name>
<range min="0.0001" max="0.45"/>
</port>
<port label="resonance" dir="input" type="control" hint="default_middle">
<name>Resonance</name>
<range min="0.1" max="1.41"/>
</port>
<port label="input" dir="input" type="audio">
<name>Input</name>
</port>
<port label="lpoutput" dir="output" type="audio">
<name>LP-Output</name>
</port>
<port label="hpoutput" dir="output" type="audio">
<name>HP-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>
<plugin label="buttlow_iir" id="1903" class="LowpassPlugin">
<name>GLAME Butterworth Lowpass</name>
<p> Butterworth lowpass filter
</p>
<callback event="instantiate">
sample_rate = s_rate;
</callback>
<callback event="run">
butterworth_stage(gt, 0, cutoff, resonance, sample_rate);
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
// Unused variable
(void)(run_adding_gain);
</callback>
<callback event="activate">
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
iirf = init_iirf_t(gt);
butterworth_stage(gt, 0, *(plugin_data->cutoff),
*(plugin_data->resonance),
sample_rate);
</callback>
<callback event="cleanup">
free_iirf_t(plugin_data->iirf, plugin_data->gt);
free_iir_stage(plugin_data->gt);
</callback>
<port label="cutoff" dir="input" type="control" hint="default_low, sample_rate, logarithmic">
<name>Cutoff Frequency (Hz)</name>
<range min="0.0001" max="0.45"/>
</port>
<port label="resonance" dir="input" type="control" hint="default_middle">
<name>Resonance</name>
<range min="0.1" max="1.41"/>
</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>
<plugin label="butthigh_iir" id="1904" class="HighpassPlugin">
<name>GLAME Butterworth Highpass</name>
<p> Butterworth highpass filter
</p>
<callback event="instantiate">
sample_rate = s_rate;
</callback>
<callback event="run">
butterworth_stage(gt, 1, cutoff, resonance, sample_rate);
iir_process_buffer_1s_5(iirf, gt, input, output, sample_count,0);
// Unused variable
(void)(run_adding_gain);
</callback>
<callback event="activate">
gt = init_iir_stage(IIR_STAGE_LOWPASS,1,3,2);
iirf = init_iirf_t(gt);
butterworth_stage(gt, 1, *(plugin_data->cutoff),
*(plugin_data->resonance),
sample_rate);
</callback>
<callback event="cleanup">
free_iirf_t(plugin_data->iirf, plugin_data->gt);
free_iir_stage(plugin_data->gt);
</callback>
<port label="cutoff" dir="input" type="control" hint="default_low, sample_rate, logarithmic">
<name>Cutoff Frequency (Hz)</name>
<range min="0.0001" max="0.45"/>
</port>
<port label="resonance" dir="input" type="control" hint="default_middle">
<name>Resonance</name>
<range min="0.1" max="1.41"/>
</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>