Imported Debian patch 0.25.2-1
Roland Stigge authored 11 years ago
Ross Gammon committed 8 years ago
0 | guitarix2 (0.25.2) unstable; urgency=low | |
1 | * add ts9 tube screamer to lv2.plugs | |
2 | * add dunlop wah to lv2.plugs | |
3 | * add booster /treble/low to lv2.plugs | |
4 | * add factory settings file contributed by kokoko3k | |
5 | * add patch by Brendan Jones to set library install path | |
6 | * fix lv2 build on non ix86 arch | |
7 | * switch to use fixed block-size in zita-convolver for all lv2 amps | |
8 | ||
9 | -- brummer <brummer-@web.de> Fri, 31 Dec 2012 9:30:35 +0200 | |
10 | ||
0 | 11 | guitarix2 (0.25.1) unstable; urgency=low |
1 | 12 | * some fixes for the LV2 plugs |
2 | 13 |
0 | guitarix (0.25.2-1) experimental; urgency=low | |
1 | ||
2 | * New upstream release | |
3 | ||
4 | -- Roland Stigge <stigge@antcom.de> Sat, 09 Feb 2013 10:10:32 +0100 | |
5 | ||
0 | 6 | guitarix (0.25.1-1) experimental; urgency=low |
1 | 7 | |
2 | 8 | * New upstream release |
0 | 0 | [ |
1 | ["kokoko3k", "kokoko3k.gx"], | |
1 | 2 | ["funkmuscle", "funkmuscle.gx"], |
2 | 3 | ["zettberlin", "zettberlin.gx"], |
3 | 4 | ["autoandimat", "autoandimat.gx"], |
0 | ["gx_head_file_version", [1, 2, "0.26.0git"], | |
1 | "Dist1", { | |
2 | "engine": { | |
3 | "IR.auto_freq": "manual", | |
4 | "IR.bandwidth": 100, | |
5 | "IR.freq": 440, | |
6 | "IR.on_off": 0, | |
7 | "IR.peak": 1, | |
8 | "IR.position": 9, | |
9 | "IR.pp": "post", | |
10 | "abgate.attack": 4, | |
11 | "abgate.decay": 50, | |
12 | "abgate.gaterange": -30, | |
13 | "abgate.hold": 5, | |
14 | "abgate.on_off": 0, | |
15 | "abgate.position": 16, | |
16 | "abgate.pp": "post", | |
17 | "abgate.threshold": -70, | |
18 | "amp.balance": 0, | |
19 | "amp.bass_boost.on_off": 0, | |
20 | "amp.clip.on_off": 0, | |
21 | "amp.feed_on_off": 0, | |
22 | "amp.fuzz": 0, | |
23 | "amp.on_off": 0, | |
24 | "amp.out_amp": 0, | |
25 | "amp.out_master": 0, | |
26 | "amp.tonestack.Bass": 1, | |
27 | "amp.tonestack.Middle": 0.5, | |
28 | "amp.tonestack.Treble": 0.5, | |
29 | "amp.tonestack.on_off": 0, | |
30 | "amp.tonestack.position": 16, | |
31 | "amp.tonestack.pp": "post", | |
32 | "amp.tonestack.select": "default", | |
33 | "amp.wet_dry": 0, | |
34 | "amp2.stage1.Pregain": 20, | |
35 | "amp2.stage2.gain1": -20, | |
36 | "ampmodul.amp2.stage1.tube1": 6, | |
37 | "ampmodul.amp2.stage2.tube2": 6, | |
38 | "ampmodul.feedbac": 0, | |
39 | "ampmodul.feedback": 0, | |
40 | "ampmodul.level": -20, | |
41 | "ampmodul.on_off": 0, | |
42 | "ampmodul.position": 3, | |
43 | "ampmodul.wet_dry": 0, | |
44 | "bassbooster.Level": 10, | |
45 | "biquad.Freq": 1200, | |
46 | "biquad.on_off": 0, | |
47 | "biquad.position": 15, | |
48 | "biquad.pp": "post", | |
49 | "cab.Level": 1.72, | |
50 | "cab.bass": 0, | |
51 | "cab.on_off": 1, | |
52 | "cab.position": 3, | |
53 | "cab.pp": "post", | |
54 | "cab.select": "4x12", | |
55 | "cab.treble": 2.9, | |
56 | "chorus.delay": 0.02, | |
57 | "chorus.depth": 0.31, | |
58 | "chorus.freq": 0.23, | |
59 | "chorus.level": 0.7, | |
60 | "chorus.on_off": 1, | |
61 | "chorus.position": 0, | |
62 | "chorus_mono.freq": 2, | |
63 | "chorus_mono.level": 0.5, | |
64 | "chorus_mono.on_off": 0, | |
65 | "chorus_mono.position": 19, | |
66 | "chorus_mono.pp": "post", | |
67 | "chorus_mono.wet_dry": 100, | |
68 | "compressor.attack": 0.002, | |
69 | "compressor.knee": 3, | |
70 | "compressor.on_off": 1, | |
71 | "compressor.position": 0, | |
72 | "compressor.pp": "pre", | |
73 | "compressor.ratio": 2, | |
74 | "compressor.release": 0.5, | |
75 | "compressor.threshold": -20, | |
76 | "con.Level": 5, | |
77 | "con.on_off": 0, | |
78 | "crybaby.autowah": "auto", | |
79 | "crybaby.level": 0.65, | |
80 | "crybaby.on_off": 0, | |
81 | "crybaby.position": 4, | |
82 | "crybaby.pp": "post", | |
83 | "crybaby.wah": 0.7, | |
84 | "crybaby.wet_dry": 0.5, | |
85 | "delay.delay": 100, | |
86 | "delay.gain": -9.83626, | |
87 | "delay.on_off": 0, | |
88 | "delay.position": 7, | |
89 | "delay.pp": "post", | |
90 | "echo.on_off": 0, | |
91 | "echo.percent": 0, | |
92 | "echo.position": 6, | |
93 | "echo.pp": "post", | |
94 | "echo.time": 1, | |
95 | "eqs.Qs125": 50, | |
96 | "eqs.Qs16k": 50, | |
97 | "eqs.Qs1k": 50, | |
98 | "eqs.Qs250": 50, | |
99 | "eqs.Qs2k": 50, | |
100 | "eqs.Qs31_25": 50, | |
101 | "eqs.Qs4k": 50, | |
102 | "eqs.Qs500": 50, | |
103 | "eqs.Qs62_5": 50, | |
104 | "eqs.Qs8k": 50, | |
105 | "eqs.freq125": 125, | |
106 | "eqs.freq16k": 16000, | |
107 | "eqs.freq1k": 1000, | |
108 | "eqs.freq250": 250, | |
109 | "eqs.freq2k": 2000, | |
110 | "eqs.freq31_25": 31, | |
111 | "eqs.freq4k": 4000, | |
112 | "eqs.freq500": 500, | |
113 | "eqs.freq62_5": 62, | |
114 | "eqs.freq8k": 8000, | |
115 | "eqs.fs125": -12.8, | |
116 | "eqs.fs16k": 4, | |
117 | "eqs.fs1k": 0, | |
118 | "eqs.fs250": 0.4, | |
119 | "eqs.fs2k": 0, | |
120 | "eqs.fs31_25": -50, | |
121 | "eqs.fs4k": 0, | |
122 | "eqs.fs500": 0, | |
123 | "eqs.fs62_5": -21.2, | |
124 | "eqs.fs8k": 0, | |
125 | "eqs.on_off": 1, | |
126 | "eqs.position": 1, | |
127 | "eqs.pp": "post", | |
128 | "expander.attack": 0.001, | |
129 | "expander.knee": 3, | |
130 | "expander.on_off": 0, | |
131 | "expander.position": 8, | |
132 | "expander.pp": "post", | |
133 | "expander.ratio": 2, | |
134 | "expander.release": 0.1, | |
135 | "expander.threshold": -40, | |
136 | "feedback.feedback": 0, | |
137 | "feedback.on_off": 0, | |
138 | "feedback.position": 22, | |
139 | "feedback.pp": "post", | |
140 | "feedback.wet_dry": 100, | |
141 | "flanger.LFO freq": 0.2, | |
142 | "flanger.depth": 1, | |
143 | "flanger.feedback gain": 0, | |
144 | "flanger.flange delay": 10, | |
145 | "flanger.flange delay offset": 1, | |
146 | "flanger.invert": "linear", | |
147 | "flanger.level": 0, | |
148 | "flanger.on_off": 0, | |
149 | "flanger.position": 1, | |
150 | "flanger_mono.freq": 0.2, | |
151 | "flanger_mono.level": 0, | |
152 | "flanger_mono.on_off": 0, | |
153 | "flanger_mono.position": 20, | |
154 | "flanger_mono.pp": "post", | |
155 | "flanger_mono.wet_dry": 100, | |
156 | "flanger_mono_gx.depth": 0.5, | |
157 | "flanger_mono_gx.feedback": -0.707, | |
158 | "flanger_mono_gx.freq": 0.2, | |
159 | "flanger_mono_gx.mix": 0, | |
160 | "flanger_mono_gx.on_off": 0, | |
161 | "flanger_mono_gx.position": 21, | |
162 | "flanger_mono_gx.pp": "post", | |
163 | "flanger_mono_gx.wet": 100, | |
164 | "flanger_mono_gx.width": 5, | |
165 | "freeverb.RoomSize": 0.5, | |
166 | "freeverb.damp": 0.5, | |
167 | "freeverb.on_off": 0, | |
168 | "freeverb.position": 2, | |
169 | "freeverb.pp": "post", | |
170 | "freeverb.wet_dry": 0, | |
171 | "gx_distortion.drive": 0.64, | |
172 | "gx_distortion.gain": 2, | |
173 | "gx_distortion.high_drive": 1, | |
174 | "gx_distortion.high_gain": 10, | |
175 | "gx_distortion.level": 0.01, | |
176 | "gx_distortion.low_drive": 1, | |
177 | "gx_distortion.low_gain": 10, | |
178 | "gx_distortion.middle_h_drive": 1, | |
179 | "gx_distortion.middle_h_gain": 10, | |
180 | "gx_distortion.middle_l_drive": 1, | |
181 | "gx_distortion.middle_l_gain": 10, | |
182 | "gx_distortion.on_off": 0, | |
183 | "gx_distortion.position": 8, | |
184 | "gx_distortion.pp": "post", | |
185 | "gx_distortion.resonator.on_off": 0, | |
186 | "gx_distortion.split_high_freq": 1250, | |
187 | "gx_distortion.split_low_freq": 250, | |
188 | "gx_distortion.split_middle_freq": 650, | |
189 | "gx_distortion.trigger": 0.12, | |
190 | "gx_distortion.vibrato": 1, | |
191 | "gx_distortion.wet_dry": 100, | |
192 | "gxdistortion.drive": 1, | |
193 | "gxdistortion.wet_dry": 100, | |
194 | "highbooster.Level": 0.5, | |
195 | "highbooster.on_off": 0, | |
196 | "highbooster.position": 1, | |
197 | "highbooster.pp": "post", | |
198 | "jconv.balance": 0, | |
199 | "jconv.convolver": { | |
200 | "jconv.IRFile": "greathall.wav", | |
201 | "jconv.IRDir": "", | |
202 | "jconv.Gain": 0.598717, | |
203 | "jconv.GainCor": 1, | |
204 | "jconv.Offset": 0, | |
205 | "jconv.Length": 112561, | |
206 | "jconv.Delay": 0, | |
207 | "jconv.gainline": [[0, 0], [112560, 0]] | |
208 | }, | |
209 | "jconv.diff_delay": 0, | |
210 | "jconv.gain": -2.8, | |
211 | "jconv.on_off": 0, | |
212 | "jconv.position": 6, | |
213 | "jconv.wet_dry": 20.5, | |
214 | "jconv_mono.convolver": { | |
215 | "jconv.IRFile": "greathall.wav", | |
216 | "jconv.IRDir": "", | |
217 | "jconv.Gain": 0.598717, | |
218 | "jconv.GainCor": 1, | |
219 | "jconv.Offset": 0, | |
220 | "jconv.Length": 112561, | |
221 | "jconv.Delay": 0, | |
222 | "jconv.gainline": [[0, 0], [112560, 0]] | |
223 | }, | |
224 | "jconv_mono.gain": 0, | |
225 | "jconv_mono.on_off": 0, | |
226 | "jconv_mono.position": 13, | |
227 | "jconv_mono.pp": "post", | |
228 | "jconv_mono.wet_dry": 100, | |
229 | "low_high_pass.lhc.high_freq": 5000, | |
230 | "low_high_pass.lhc.low_freq": 130, | |
231 | "low_high_pass.lhc.on_off": 0, | |
232 | "low_high_pass.lhp.high_freq": 130, | |
233 | "low_high_pass.lhp.low_freq": 5000, | |
234 | "low_high_pass.lhp.on_off": 0, | |
235 | "low_highpass.on_off": 0, | |
236 | "low_highpass.position": 1, | |
237 | "low_highpass.pp": "post", | |
238 | "midi_out.beat_detector.atack_gain": 5, | |
239 | "midi_out.beat_detector.beat_gain": 1, | |
240 | "midi_out.beat_detector.midi_gain": 1, | |
241 | "midi_out.beat_detector.note_off": 2, | |
242 | "midi_out.beat_detector.stepper": 1, | |
243 | "midi_out.channel_1.auto_pitch": 0, | |
244 | "midi_out.channel_1.autogain": 0, | |
245 | "midi_out.channel_1.channel": 0, | |
246 | "midi_out.channel_1.oktave": 0, | |
247 | "midi_out.channel_1.program": 0, | |
248 | "midi_out.channel_1.sensity": 20, | |
249 | "midi_out.channel_1.velocity": 64, | |
250 | "midi_out.channel_1.volume": 64, | |
251 | "midi_out.channel_2.auto_pitch": 0, | |
252 | "midi_out.channel_2.autogain": 0, | |
253 | "midi_out.channel_2.channel": 0, | |
254 | "midi_out.channel_2.oktave": 0, | |
255 | "midi_out.channel_2.on_off": 0, | |
256 | "midi_out.channel_2.program": 0, | |
257 | "midi_out.channel_2.sensity": 20, | |
258 | "midi_out.channel_2.velocity": 64, | |
259 | "midi_out.channel_2.volume": 64, | |
260 | "midi_out.channel_3.auto_pitch": 0, | |
261 | "midi_out.channel_3.autogain": 0, | |
262 | "midi_out.channel_3.channel": 0, | |
263 | "midi_out.channel_3.oktave": 0, | |
264 | "midi_out.channel_3.on_off": 0, | |
265 | "midi_out.channel_3.program": 0, | |
266 | "midi_out.channel_3.sensity": 20, | |
267 | "midi_out.channel_3.velocity": 64, | |
268 | "midi_out.channel_3.volume": 64, | |
269 | "midi_out.on_off": 0, | |
270 | "moog.Q": 1, | |
271 | "moog.fr": 3000, | |
272 | "moog.on_off": 0, | |
273 | "moog.position": 4, | |
274 | "noise_gate.on_off": 1, | |
275 | "noise_gate.threshold": 0.107, | |
276 | "oscilloscope.on_off": 0, | |
277 | "oscilloscope.position": 14, | |
278 | "oscilloscope.pp": "post", | |
279 | "overdrive.drive": 1, | |
280 | "overdrive.on_off": 0, | |
281 | "overdrive.position": 11, | |
282 | "overdrive.pp": "post", | |
283 | "overdrive.wet_dry": 100, | |
284 | "phaser.MaxNotch1Freq": 800, | |
285 | "phaser.MinNotch1Freq": 100, | |
286 | "phaser.Notch width": 1000, | |
287 | "phaser.NotchFreq": 1.5, | |
288 | "phaser.Speed": 0.5, | |
289 | "phaser.VibratoMode": "direct ", | |
290 | "phaser.depth": 1, | |
291 | "phaser.feedback gain": 0, | |
292 | "phaser.invert": "linear", | |
293 | "phaser.level": 0, | |
294 | "phaser.on_off": 0, | |
295 | "phaser.position": 2, | |
296 | "phaser_mono.Speed": 0.5, | |
297 | "phaser_mono.level": 0, | |
298 | "phaser_mono.on_off": 0, | |
299 | "phaser_mono.position": 18, | |
300 | "phaser_mono.pp": "post", | |
301 | "phaser_mono.wet_dry": 100, | |
302 | "pre.Level": 1, | |
303 | "pre.bass": 0, | |
304 | "pre.on_off": 0, | |
305 | "pre.position": 13, | |
306 | "pre.pp": "post", | |
307 | "pre.select": "AC30", | |
308 | "pre.treble": 0, | |
309 | "shaper.on_off": 0, | |
310 | "shaper.sharper": 1, | |
311 | "stereodelay.LFO freq": 0.2, | |
312 | "stereodelay.invert": "linear", | |
313 | "stereodelay.l_delay": 0, | |
314 | "stereodelay.l_gain": 0, | |
315 | "stereodelay.on_off": 0, | |
316 | "stereodelay.position": 5, | |
317 | "stereodelay.r_delay": 0, | |
318 | "stereodelay.r_gain": 0, | |
319 | "stereoecho.LFO freq": 0.2, | |
320 | "stereoecho.invert": "linear", | |
321 | "stereoecho.on_off": 0, | |
322 | "stereoecho.percent_l": 0, | |
323 | "stereoecho.percent_r": 0, | |
324 | "stereoecho.position": 3, | |
325 | "stereoecho.time_l": 1, | |
326 | "stereoecho.time_r": 1, | |
327 | "stereoverb.LFO freq": 0.2, | |
328 | "stereoverb.RoomSize": 0.725, | |
329 | "stereoverb.damp": 0.6, | |
330 | "stereoverb.invert": "linear", | |
331 | "stereoverb.on_off": 0, | |
332 | "stereoverb.position": 7, | |
333 | "stereoverb.wet_dry": 57, | |
334 | "tonemodul.Bass": 0, | |
335 | "tonemodul.Middle": 0, | |
336 | "tonemodul.ON": 0, | |
337 | "tonemodul.Treble": 0, | |
338 | "tonemodul.on_off": 0, | |
339 | "tonemodul.position": 8, | |
340 | "tonemodul.sharper": -2, | |
341 | "tremolo.SINE": "triangle", | |
342 | "tremolo.depth": 0.5, | |
343 | "tremolo.freq": 5, | |
344 | "tremolo.on_off": 0, | |
345 | "tremolo.position": 17, | |
346 | "tremolo.pp": "post", | |
347 | "tremolo.wet_dry": 100, | |
348 | "ts9sim.drive": 0.5, | |
349 | "ts9sim.level": -16, | |
350 | "ts9sim.on_off": 0, | |
351 | "ts9sim.position": 6, | |
352 | "ts9sim.pp": "post", | |
353 | "ts9sim.tone": 400, | |
354 | "tube.select": "12ax7", | |
355 | "ui.IR": 0, | |
356 | "ui.abgate": 0, | |
357 | "ui.amp.tonestack": 0, | |
358 | "ui.ampmodul": 0, | |
359 | "ui.biquad": 0, | |
360 | "ui.cab": 1, | |
361 | "ui.chorus": 1, | |
362 | "ui.chorus_mono": 0, | |
363 | "ui.compressor": 1, | |
364 | "ui.crybaby": 0, | |
365 | "ui.delay": 0, | |
366 | "ui.echo": 0, | |
367 | "ui.eqs": 1, | |
368 | "ui.expander": 0, | |
369 | "ui.feedback": 0, | |
370 | "ui.flanger": 0, | |
371 | "ui.flanger_mono": 0, | |
372 | "ui.flanger_mono_gx": 0, | |
373 | "ui.freeverb": 0, | |
374 | "ui.gx_distortion": 0, | |
375 | "ui.highbooster": 0, | |
376 | "ui.jconv": 0, | |
377 | "ui.jconv_mono": 0, | |
378 | "ui.low_highpass": 0, | |
379 | "ui.midi_out": 0, | |
380 | "ui.moog": 0, | |
381 | "ui.oscilloscope": 0, | |
382 | "ui.overdrive": 0, | |
383 | "ui.phaser": 0, | |
384 | "ui.phaser_mono": 0, | |
385 | "ui.pre": 0, | |
386 | "ui.stereodelay": 0, | |
387 | "ui.stereoecho": 0, | |
388 | "ui.stereoverb": 0, | |
389 | "ui.tonemodul": 0, | |
390 | "ui.tremolo": 0, | |
391 | "ui.ts9sim": 0, | |
392 | "ui.univibe": 0, | |
393 | "ui.univibe_mono": 0, | |
394 | "ui.zita_rev1": 1, | |
395 | "univibe.depth": 0.37, | |
396 | "univibe.fb": -0.6, | |
397 | "univibe.freq": 4.4, | |
398 | "univibe.lrcross": 0, | |
399 | "univibe.on_off": 0, | |
400 | "univibe.panning": 0, | |
401 | "univibe.position": 5, | |
402 | "univibe.stereo": 0.11, | |
403 | "univibe.wet_dry": 1, | |
404 | "univibe.width": 0.5, | |
405 | "univibe_mono.depth": 0.37, | |
406 | "univibe_mono.fb": -0.6, | |
407 | "univibe_mono.freq": 4.4, | |
408 | "univibe_mono.on_off": 0, | |
409 | "univibe_mono.position": 27, | |
410 | "univibe_mono.pp": "post", | |
411 | "univibe_mono.wet_dry": 1, | |
412 | "univibe_mono.width": 0.5, | |
413 | "zita_rev1.decay_times.hf_damping": 6000, | |
414 | "zita_rev1.decay_times.lf_x": 200, | |
415 | "zita_rev1.decay_times.low_rt60": 3, | |
416 | "zita_rev1.decay_times.mid_rt60": 2, | |
417 | "zita_rev1.equalizer1.eq1_freq": 315, | |
418 | "zita_rev1.equalizer1.eq1_level": 0, | |
419 | "zita_rev1.equalizer2.eq2_freq": 315, | |
420 | "zita_rev1.equalizer2.eq2_level": 0, | |
421 | "zita_rev1.input.in_delay": 60, | |
422 | "zita_rev1.on_off": 1, | |
423 | "zita_rev1.output.dry_wet_mix": -0.54, | |
424 | "zita_rev1.output.level": 0, | |
425 | "zita_rev1.position": 8 | |
426 | } | |
427 | }, | |
428 | "Dist2", { | |
429 | "engine": { | |
430 | "IR.auto_freq": "manual", | |
431 | "IR.bandwidth": 100, | |
432 | "IR.freq": 440, | |
433 | "IR.on_off": 0, | |
434 | "IR.peak": 1, | |
435 | "IR.position": 5, | |
436 | "IR.pp": "post", | |
437 | "abgate.attack": 4, | |
438 | "abgate.decay": 50, | |
439 | "abgate.gaterange": -30, | |
440 | "abgate.hold": 5, | |
441 | "abgate.on_off": 0, | |
442 | "abgate.position": 16, | |
443 | "abgate.pp": "post", | |
444 | "abgate.threshold": -70, | |
445 | "amp.balance": 0, | |
446 | "amp.bass_boost.on_off": 0, | |
447 | "amp.clip.on_off": 0, | |
448 | "amp.feed_on_off": 0, | |
449 | "amp.fuzz": 1.9502, | |
450 | "amp.on_off": 0, | |
451 | "amp.out_amp": -3.92, | |
452 | "amp.out_master": -0.05, | |
453 | "amp.tonestack.Bass": 0.4, | |
454 | "amp.tonestack.Middle": 0.4, | |
455 | "amp.tonestack.Treble": 0.75, | |
456 | "amp.tonestack.on_off": 0, | |
457 | "amp.tonestack.position": 14, | |
458 | "amp.tonestack.pp": "post", | |
459 | "amp.tonestack.select": "M2199", | |
460 | "amp.wet_dry": 0, | |
461 | "amp2.stage1.Pregain": 20, | |
462 | "amp2.stage2.gain1": -20, | |
463 | "ampmodul.amp2.stage1.tube1": 6, | |
464 | "ampmodul.amp2.stage2.tube2": 6, | |
465 | "ampmodul.feedbac": 0, | |
466 | "ampmodul.feedback": 0, | |
467 | "ampmodul.level": -20, | |
468 | "ampmodul.on_off": 0, | |
469 | "ampmodul.position": 3, | |
470 | "ampmodul.wet_dry": 0, | |
471 | "bassbooster.Level": 10, | |
472 | "biquad.Freq": 1200, | |
473 | "biquad.on_off": 0, | |
474 | "biquad.position": 12, | |
475 | "biquad.pp": "post", | |
476 | "cab.Level": 1.72, | |
477 | "cab.bass": 0, | |
478 | "cab.on_off": 1, | |
479 | "cab.position": 3, | |
480 | "cab.pp": "post", | |
481 | "cab.select": "4x12", | |
482 | "cab.treble": -0.4, | |
483 | "chorus.delay": 0.02, | |
484 | "chorus.depth": 0.31, | |
485 | "chorus.freq": 0.23, | |
486 | "chorus.level": 0.7, | |
487 | "chorus.on_off": 1, | |
488 | "chorus.position": 0, | |
489 | "chorus_mono.freq": 2, | |
490 | "chorus_mono.level": 0.5, | |
491 | "chorus_mono.on_off": 0, | |
492 | "chorus_mono.position": 19, | |
493 | "chorus_mono.pp": "post", | |
494 | "chorus_mono.wet_dry": 100, | |
495 | "compressor.attack": 0.002, | |
496 | "compressor.knee": 3, | |
497 | "compressor.on_off": 1, | |
498 | "compressor.position": 0, | |
499 | "compressor.pp": "pre", | |
500 | "compressor.ratio": 2, | |
501 | "compressor.release": 0.5, | |
502 | "compressor.threshold": -20, | |
503 | "con.Level": 5, | |
504 | "con.on_off": 1, | |
505 | "crybaby.autowah": "auto", | |
506 | "crybaby.level": 0.65, | |
507 | "crybaby.on_off": 0, | |
508 | "crybaby.position": 4, | |
509 | "crybaby.pp": "post", | |
510 | "crybaby.wah": 0.7, | |
511 | "crybaby.wet_dry": 0.5, | |
512 | "delay.delay": 100, | |
513 | "delay.gain": -9.83626, | |
514 | "delay.on_off": 0, | |
515 | "delay.position": 6, | |
516 | "delay.pp": "post", | |
517 | "echo.on_off": 0, | |
518 | "echo.percent": 0, | |
519 | "echo.position": 7, | |
520 | "echo.pp": "post", | |
521 | "echo.time": 1, | |
522 | "eqs.Qs125": 50, | |
523 | "eqs.Qs16k": 50, | |
524 | "eqs.Qs1k": 50, | |
525 | "eqs.Qs250": 50, | |
526 | "eqs.Qs2k": 50, | |
527 | "eqs.Qs31_25": 50, | |
528 | "eqs.Qs4k": 50, | |
529 | "eqs.Qs500": 50, | |
530 | "eqs.Qs62_5": 50, | |
531 | "eqs.Qs8k": 50, | |
532 | "eqs.freq125": 125, | |
533 | "eqs.freq16k": 16000, | |
534 | "eqs.freq1k": 1000, | |
535 | "eqs.freq250": 250, | |
536 | "eqs.freq2k": 2000, | |
537 | "eqs.freq31_25": 31, | |
538 | "eqs.freq4k": 4000, | |
539 | "eqs.freq500": 500, | |
540 | "eqs.freq62_5": 62, | |
541 | "eqs.freq8k": 8000, | |
542 | "eqs.fs125": -12.8, | |
543 | "eqs.fs16k": 4, | |
544 | "eqs.fs1k": 0, | |
545 | "eqs.fs250": 0.4, | |
546 | "eqs.fs2k": 0, | |
547 | "eqs.fs31_25": -50, | |
548 | "eqs.fs4k": 0, | |
549 | "eqs.fs500": 0, | |
550 | "eqs.fs62_5": -21.2, | |
551 | "eqs.fs8k": 0, | |
552 | "eqs.on_off": 1, | |
553 | "eqs.position": 1, | |
554 | "eqs.pp": "post", | |
555 | "expander.attack": 0.001, | |
556 | "expander.knee": 3, | |
557 | "expander.on_off": 0, | |
558 | "expander.position": 8, | |
559 | "expander.pp": "post", | |
560 | "expander.ratio": 2, | |
561 | "expander.release": 0.1, | |
562 | "expander.threshold": -40, | |
563 | "feedback.feedback": 0, | |
564 | "feedback.on_off": 0, | |
565 | "feedback.position": 22, | |
566 | "feedback.pp": "post", | |
567 | "feedback.wet_dry": 100, | |
568 | "flanger.LFO freq": 0.2, | |
569 | "flanger.depth": 1, | |
570 | "flanger.feedback gain": 0, | |
571 | "flanger.flange delay": 10, | |
572 | "flanger.flange delay offset": 1, | |
573 | "flanger.invert": "linear", | |
574 | "flanger.level": 0, | |
575 | "flanger.on_off": 0, | |
576 | "flanger.position": 1, | |
577 | "flanger_mono.freq": 0.2, | |
578 | "flanger_mono.level": 0, | |
579 | "flanger_mono.on_off": 0, | |
580 | "flanger_mono.position": 20, | |
581 | "flanger_mono.pp": "post", | |
582 | "flanger_mono.wet_dry": 100, | |
583 | "flanger_mono_gx.depth": 0.5, | |
584 | "flanger_mono_gx.feedback": -0.707, | |
585 | "flanger_mono_gx.freq": 0.2, | |
586 | "flanger_mono_gx.mix": 0, | |
587 | "flanger_mono_gx.on_off": 0, | |
588 | "flanger_mono_gx.position": 21, | |
589 | "flanger_mono_gx.pp": "post", | |
590 | "flanger_mono_gx.wet": 100, | |
591 | "flanger_mono_gx.width": 5, | |
592 | "freeverb.RoomSize": 1, | |
593 | "freeverb.damp": 0.425, | |
594 | "freeverb.on_off": 0, | |
595 | "freeverb.position": 2, | |
596 | "freeverb.pp": "post", | |
597 | "freeverb.wet_dry": 29, | |
598 | "gx_distortion.drive": 0.64, | |
599 | "gx_distortion.gain": 2, | |
600 | "gx_distortion.high_drive": 1, | |
601 | "gx_distortion.high_gain": 10, | |
602 | "gx_distortion.level": 0.01, | |
603 | "gx_distortion.low_drive": 1, | |
604 | "gx_distortion.low_gain": 10, | |
605 | "gx_distortion.middle_h_drive": 1, | |
606 | "gx_distortion.middle_h_gain": 10, | |
607 | "gx_distortion.middle_l_drive": 1, | |
608 | "gx_distortion.middle_l_gain": 10, | |
609 | "gx_distortion.on_off": 0, | |
610 | "gx_distortion.position": 5, | |
611 | "gx_distortion.pp": "post", | |
612 | "gx_distortion.resonator.on_off": 0, | |
613 | "gx_distortion.split_high_freq": 1250, | |
614 | "gx_distortion.split_low_freq": 250, | |
615 | "gx_distortion.split_middle_freq": 650, | |
616 | "gx_distortion.trigger": 0.12, | |
617 | "gx_distortion.vibrato": 1, | |
618 | "gx_distortion.wet_dry": 100, | |
619 | "gxdistortion.drive": 1, | |
620 | "gxdistortion.wet_dry": 100, | |
621 | "highbooster.Level": 0.5, | |
622 | "highbooster.on_off": 0, | |
623 | "highbooster.position": 2, | |
624 | "highbooster.pp": "post", | |
625 | "jconv.balance": 0, | |
626 | "jconv.convolver": { | |
627 | "jconv.IRFile": "greathall.wav", | |
628 | "jconv.IRDir": "", | |
629 | "jconv.Gain": 0.598717, | |
630 | "jconv.GainCor": 1, | |
631 | "jconv.Offset": 0, | |
632 | "jconv.Length": 112561, | |
633 | "jconv.Delay": 0, | |
634 | "jconv.gainline": [[0, 0], [112560, 0]] | |
635 | }, | |
636 | "jconv.diff_delay": 0, | |
637 | "jconv.gain": 0, | |
638 | "jconv.on_off": 0, | |
639 | "jconv.position": 5, | |
640 | "jconv.wet_dry": 100, | |
641 | "jconv_mono.convolver": { | |
642 | "jconv.IRFile": "greathall.wav", | |
643 | "jconv.IRDir": "", | |
644 | "jconv.Gain": 0.598717, | |
645 | "jconv.GainCor": 1, | |
646 | "jconv.Offset": 0, | |
647 | "jconv.Length": 112561, | |
648 | "jconv.Delay": 0, | |
649 | "jconv.gainline": [[0, 0], [112560, 0]] | |
650 | }, | |
651 | "jconv_mono.gain": 0, | |
652 | "jconv_mono.on_off": 0, | |
653 | "jconv_mono.position": 13, | |
654 | "jconv_mono.pp": "post", | |
655 | "jconv_mono.wet_dry": 100, | |
656 | "low_high_pass.lhc.high_freq": 5000, | |
657 | "low_high_pass.lhc.low_freq": 130, | |
658 | "low_high_pass.lhc.on_off": 0, | |
659 | "low_high_pass.lhp.high_freq": 130, | |
660 | "low_high_pass.lhp.low_freq": 5000, | |
661 | "low_high_pass.lhp.on_off": 0, | |
662 | "low_highpass.on_off": 0, | |
663 | "low_highpass.position": 1, | |
664 | "low_highpass.pp": "post", | |
665 | "midi_out.beat_detector.atack_gain": 5, | |
666 | "midi_out.beat_detector.beat_gain": 1, | |
667 | "midi_out.beat_detector.midi_gain": 1, | |
668 | "midi_out.beat_detector.note_off": 2, | |
669 | "midi_out.beat_detector.stepper": 1, | |
670 | "midi_out.channel_1.auto_pitch": 0, | |
671 | "midi_out.channel_1.autogain": 0, | |
672 | "midi_out.channel_1.channel": 0, | |
673 | "midi_out.channel_1.oktave": 0, | |
674 | "midi_out.channel_1.program": 0, | |
675 | "midi_out.channel_1.sensity": 20, | |
676 | "midi_out.channel_1.velocity": 64, | |
677 | "midi_out.channel_1.volume": 64, | |
678 | "midi_out.channel_2.auto_pitch": 0, | |
679 | "midi_out.channel_2.autogain": 0, | |
680 | "midi_out.channel_2.channel": 0, | |
681 | "midi_out.channel_2.oktave": 0, | |
682 | "midi_out.channel_2.on_off": 0, | |
683 | "midi_out.channel_2.program": 0, | |
684 | "midi_out.channel_2.sensity": 20, | |
685 | "midi_out.channel_2.velocity": 64, | |
686 | "midi_out.channel_2.volume": 64, | |
687 | "midi_out.channel_3.auto_pitch": 0, | |
688 | "midi_out.channel_3.autogain": 0, | |
689 | "midi_out.channel_3.channel": 0, | |
690 | "midi_out.channel_3.oktave": 0, | |
691 | "midi_out.channel_3.on_off": 0, | |
692 | "midi_out.channel_3.program": 0, | |
693 | "midi_out.channel_3.sensity": 20, | |
694 | "midi_out.channel_3.velocity": 64, | |
695 | "midi_out.channel_3.volume": 64, | |
696 | "midi_out.on_off": 0, | |
697 | "moog.Q": 0, | |
698 | "moog.fr": 3108.8, | |
699 | "moog.on_off": 0, | |
700 | "moog.position": 0, | |
701 | "noise_gate.on_off": 1, | |
702 | "noise_gate.threshold": 0.097, | |
703 | "oscilloscope.on_off": 0, | |
704 | "oscilloscope.position": 11, | |
705 | "oscilloscope.pp": "post", | |
706 | "overdrive.drive": 1, | |
707 | "overdrive.on_off": 0, | |
708 | "overdrive.position": 7, | |
709 | "overdrive.pp": "post", | |
710 | "overdrive.wet_dry": 100, | |
711 | "phaser.MaxNotch1Freq": 800, | |
712 | "phaser.MinNotch1Freq": 100, | |
713 | "phaser.Notch width": 1000, | |
714 | "phaser.NotchFreq": 1.5, | |
715 | "phaser.Speed": 0.5, | |
716 | "phaser.VibratoMode": "direct ", | |
717 | "phaser.depth": 1, | |
718 | "phaser.feedback gain": 0, | |
719 | "phaser.invert": "linear", | |
720 | "phaser.level": 0, | |
721 | "phaser.on_off": 0, | |
722 | "phaser.position": 2, | |
723 | "phaser_mono.Speed": 0.5, | |
724 | "phaser_mono.level": 0, | |
725 | "phaser_mono.on_off": 0, | |
726 | "phaser_mono.position": 18, | |
727 | "phaser_mono.pp": "post", | |
728 | "phaser_mono.wet_dry": 100, | |
729 | "pre.Level": 1, | |
730 | "pre.bass": 0, | |
731 | "pre.on_off": 0, | |
732 | "pre.position": 25, | |
733 | "pre.pp": "post", | |
734 | "pre.select": "AC30", | |
735 | "pre.treble": 0, | |
736 | "shaper.on_off": 0, | |
737 | "shaper.sharper": 10, | |
738 | "stereodelay.LFO freq": 0.2, | |
739 | "stereodelay.invert": "linear", | |
740 | "stereodelay.l_delay": 0, | |
741 | "stereodelay.l_gain": 0, | |
742 | "stereodelay.on_off": 0, | |
743 | "stereodelay.position": 4, | |
744 | "stereodelay.r_delay": 0, | |
745 | "stereodelay.r_gain": 0, | |
746 | "stereoecho.LFO freq": 0.2, | |
747 | "stereoecho.invert": "linear", | |
748 | "stereoecho.on_off": 0, | |
749 | "stereoecho.percent_l": 0, | |
750 | "stereoecho.percent_r": 0, | |
751 | "stereoecho.position": 4, | |
752 | "stereoecho.time_l": 1, | |
753 | "stereoecho.time_r": 1, | |
754 | "stereoverb.LFO freq": 0.2, | |
755 | "stereoverb.RoomSize": 0.5, | |
756 | "stereoverb.damp": 0.5, | |
757 | "stereoverb.invert": "linear", | |
758 | "stereoverb.on_off": 0, | |
759 | "stereoverb.position": 7, | |
760 | "stereoverb.wet_dry": 50, | |
761 | "tonemodul.Bass": 0, | |
762 | "tonemodul.Middle": 0, | |
763 | "tonemodul.ON": 0, | |
764 | "tonemodul.Treble": 0, | |
765 | "tonemodul.on_off": 0, | |
766 | "tonemodul.position": 8, | |
767 | "tonemodul.sharper": -2, | |
768 | "tremolo.SINE": "triangle", | |
769 | "tremolo.depth": 0.5, | |
770 | "tremolo.freq": 5, | |
771 | "tremolo.on_off": 0, | |
772 | "tremolo.position": 17, | |
773 | "tremolo.pp": "post", | |
774 | "tremolo.wet_dry": 100, | |
775 | "ts9sim.drive": 0.5, | |
776 | "ts9sim.level": -16, | |
777 | "ts9sim.on_off": 0, | |
778 | "ts9sim.position": 6, | |
779 | "ts9sim.pp": "post", | |
780 | "ts9sim.tone": 400, | |
781 | "tube.select": "12ax7", | |
782 | "ui.IR": 0, | |
783 | "ui.abgate": 0, | |
784 | "ui.amp.tonestack": 0, | |
785 | "ui.ampmodul": 0, | |
786 | "ui.biquad": 0, | |
787 | "ui.cab": 1, | |
788 | "ui.chorus": 1, | |
789 | "ui.chorus_mono": 0, | |
790 | "ui.compressor": 1, | |
791 | "ui.crybaby": 0, | |
792 | "ui.delay": 0, | |
793 | "ui.echo": 0, | |
794 | "ui.eqs": 1, | |
795 | "ui.expander": 0, | |
796 | "ui.feedback": 0, | |
797 | "ui.flanger": 0, | |
798 | "ui.flanger_mono": 0, | |
799 | "ui.flanger_mono_gx": 0, | |
800 | "ui.freeverb": 0, | |
801 | "ui.gx_distortion": 0, | |
802 | "ui.highbooster": 0, | |
803 | "ui.jconv": 0, | |
804 | "ui.jconv_mono": 0, | |
805 | "ui.low_highpass": 0, | |
806 | "ui.midi_out": 0, | |
807 | "ui.moog": 0, | |
808 | "ui.oscilloscope": 0, | |
809 | "ui.overdrive": 0, | |
810 | "ui.phaser": 0, | |
811 | "ui.phaser_mono": 0, | |
812 | "ui.pre": 0, | |
813 | "ui.stereodelay": 0, | |
814 | "ui.stereoecho": 0, | |
815 | "ui.stereoverb": 0, | |
816 | "ui.tonemodul": 0, | |
817 | "ui.tremolo": 0, | |
818 | "ui.ts9sim": 0, | |
819 | "ui.univibe": 0, | |
820 | "ui.univibe_mono": 0, | |
821 | "ui.zita_rev1": 1, | |
822 | "univibe.depth": 0.37, | |
823 | "univibe.fb": -0.6, | |
824 | "univibe.freq": 4.4, | |
825 | "univibe.lrcross": 0, | |
826 | "univibe.on_off": 0, | |
827 | "univibe.panning": 0, | |
828 | "univibe.position": 6, | |
829 | "univibe.stereo": 0.11, | |
830 | "univibe.wet_dry": 1, | |
831 | "univibe.width": 0.5, | |
832 | "univibe_mono.depth": 0.37, | |
833 | "univibe_mono.fb": -0.6, | |
834 | "univibe_mono.freq": 4.4, | |
835 | "univibe_mono.on_off": 0, | |
836 | "univibe_mono.position": 27, | |
837 | "univibe_mono.pp": "post", | |
838 | "univibe_mono.wet_dry": 1, | |
839 | "univibe_mono.width": 0.5, | |
840 | "zita_rev1.decay_times.hf_damping": 6000, | |
841 | "zita_rev1.decay_times.lf_x": 200, | |
842 | "zita_rev1.decay_times.low_rt60": 3, | |
843 | "zita_rev1.decay_times.mid_rt60": 2, | |
844 | "zita_rev1.equalizer1.eq1_freq": 315, | |
845 | "zita_rev1.equalizer1.eq1_level": 0, | |
846 | "zita_rev1.equalizer2.eq2_freq": 315, | |
847 | "zita_rev1.equalizer2.eq2_level": 0, | |
848 | "zita_rev1.input.in_delay": 60, | |
849 | "zita_rev1.on_off": 1, | |
850 | "zita_rev1.output.dry_wet_mix": -0.49, | |
851 | "zita_rev1.output.level": 0, | |
852 | "zita_rev1.position": 8 | |
853 | } | |
854 | }, | |
855 | "Chorus Clean", { | |
856 | "engine": { | |
857 | "IR.auto_freq": "manual", | |
858 | "IR.bandwidth": 100, | |
859 | "IR.freq": 440, | |
860 | "IR.on_off": 0, | |
861 | "IR.peak": 1, | |
862 | "IR.position": 5, | |
863 | "IR.pp": "post", | |
864 | "abgate.attack": 4, | |
865 | "abgate.decay": 50, | |
866 | "abgate.gaterange": -30, | |
867 | "abgate.hold": 5, | |
868 | "abgate.on_off": 0, | |
869 | "abgate.position": 26, | |
870 | "abgate.pp": "post", | |
871 | "abgate.threshold": -70, | |
872 | "amp.balance": 0, | |
873 | "amp.bass_boost.on_off": 0, | |
874 | "amp.clip.on_off": 0, | |
875 | "amp.feed_on_off": 0, | |
876 | "amp.fuzz": 0, | |
877 | "amp.on_off": 0, | |
878 | "amp.out_amp": 0, | |
879 | "amp.out_master": 0, | |
880 | "amp.tonestack.Bass": 0, | |
881 | "amp.tonestack.Middle": 0, | |
882 | "amp.tonestack.Treble": 0.6, | |
883 | "amp.tonestack.on_off": 0, | |
884 | "amp.tonestack.position": 23, | |
885 | "amp.tonestack.pp": "post", | |
886 | "amp.tonestack.select": "Princeton", | |
887 | "amp.wet_dry": 0, | |
888 | "amp2.stage1.Pregain": 3.97252e-16, | |
889 | "amp2.stage2.gain1": 0.2, | |
890 | "ampmodul.amp2.stage1.tube1": 6, | |
891 | "ampmodul.amp2.stage2.tube2": 6, | |
892 | "ampmodul.feedbac": 0, | |
893 | "ampmodul.feedback": 0, | |
894 | "ampmodul.level": -20, | |
895 | "ampmodul.on_off": 0, | |
896 | "ampmodul.position": 5, | |
897 | "ampmodul.wet_dry": 0, | |
898 | "bassbooster.Level": 10, | |
899 | "biquad.Freq": 718.5, | |
900 | "biquad.on_off": 0, | |
901 | "biquad.position": 8, | |
902 | "biquad.pp": "post", | |
903 | "cab.Level": 1, | |
904 | "cab.bass": 0, | |
905 | "cab.on_off": 1, | |
906 | "cab.position": 6, | |
907 | "cab.pp": "post", | |
908 | "cab.select": "4x12", | |
909 | "cab.treble": 10, | |
910 | "chorus.delay": 0.02, | |
911 | "chorus.depth": 0.31, | |
912 | "chorus.freq": 0.23, | |
913 | "chorus.level": 0.75, | |
914 | "chorus.on_off": 1, | |
915 | "chorus.position": 0, | |
916 | "chorus_mono.freq": 2, | |
917 | "chorus_mono.level": 0.5, | |
918 | "chorus_mono.on_off": 0, | |
919 | "chorus_mono.position": 19, | |
920 | "chorus_mono.pp": "post", | |
921 | "chorus_mono.wet_dry": 100, | |
922 | "compressor.attack": 0.002, | |
923 | "compressor.knee": 3, | |
924 | "compressor.on_off": 0, | |
925 | "compressor.position": 3, | |
926 | "compressor.pp": "post", | |
927 | "compressor.ratio": 9.9807, | |
928 | "compressor.release": 0.5, | |
929 | "compressor.threshold": -8.99634, | |
930 | "con.Level": 5, | |
931 | "con.on_off": 1, | |
932 | "crybaby.autowah": "manual", | |
933 | "crybaby.level": 0.1, | |
934 | "crybaby.on_off": 0, | |
935 | "crybaby.position": 2, | |
936 | "crybaby.pp": "post", | |
937 | "crybaby.wah": 0, | |
938 | "crybaby.wet_dry": 0, | |
939 | "delay.delay": 0, | |
940 | "delay.gain": 0, | |
941 | "delay.on_off": 0, | |
942 | "delay.position": 4, | |
943 | "delay.pp": "post", | |
944 | "echo.on_off": 0, | |
945 | "echo.percent": 55, | |
946 | "echo.position": 5, | |
947 | "echo.pp": "post", | |
948 | "echo.time": 200, | |
949 | "eqs.Qs125": 50, | |
950 | "eqs.Qs16k": 50, | |
951 | "eqs.Qs1k": 50, | |
952 | "eqs.Qs250": 50, | |
953 | "eqs.Qs2k": 50, | |
954 | "eqs.Qs31_25": 50, | |
955 | "eqs.Qs4k": 50, | |
956 | "eqs.Qs500": 50, | |
957 | "eqs.Qs62_5": 50, | |
958 | "eqs.Qs8k": 50, | |
959 | "eqs.freq125": 125, | |
960 | "eqs.freq16k": 16000, | |
961 | "eqs.freq1k": 1000, | |
962 | "eqs.freq250": 250, | |
963 | "eqs.freq2k": 2000, | |
964 | "eqs.freq31_25": 31, | |
965 | "eqs.freq4k": 4000, | |
966 | "eqs.freq500": 500, | |
967 | "eqs.freq62_5": 62, | |
968 | "eqs.freq8k": 8000, | |
969 | "eqs.fs125": 0, | |
970 | "eqs.fs16k": 0, | |
971 | "eqs.fs1k": -50, | |
972 | "eqs.fs250": 0, | |
973 | "eqs.fs2k": 0, | |
974 | "eqs.fs31_25": 0, | |
975 | "eqs.fs4k": 0, | |
976 | "eqs.fs500": 0, | |
977 | "eqs.fs62_5": 0, | |
978 | "eqs.fs8k": 0, | |
979 | "eqs.on_off": 0, | |
980 | "eqs.position": 9, | |
981 | "eqs.pp": "post", | |
982 | "expander.attack": 0.001, | |
983 | "expander.knee": 3, | |
984 | "expander.on_off": 0, | |
985 | "expander.position": 9, | |
986 | "expander.pp": "post", | |
987 | "expander.ratio": 2, | |
988 | "expander.release": 0.1, | |
989 | "expander.threshold": -40, | |
990 | "feedback.feedback": 0, | |
991 | "feedback.on_off": 0, | |
992 | "feedback.position": 22, | |
993 | "feedback.pp": "post", | |
994 | "feedback.wet_dry": 100, | |
995 | "flanger.LFO freq": 0.2, | |
996 | "flanger.depth": 1, | |
997 | "flanger.feedback gain": 0, | |
998 | "flanger.flange delay": 10, | |
999 | "flanger.flange delay offset": 1, | |
1000 | "flanger.invert": "linear", | |
1001 | "flanger.level": 0, | |
1002 | "flanger.on_off": 0, | |
1003 | "flanger.position": 1, | |
1004 | "flanger_mono.freq": 0.2, | |
1005 | "flanger_mono.level": 0, | |
1006 | "flanger_mono.on_off": 0, | |
1007 | "flanger_mono.position": 20, | |
1008 | "flanger_mono.pp": "post", | |
1009 | "flanger_mono.wet_dry": 100, | |
1010 | "flanger_mono_gx.depth": 0.5, | |
1011 | "flanger_mono_gx.feedback": -0.707, | |
1012 | "flanger_mono_gx.freq": 0.2, | |
1013 | "flanger_mono_gx.mix": 0, | |
1014 | "flanger_mono_gx.on_off": 0, | |
1015 | "flanger_mono_gx.position": 21, | |
1016 | "flanger_mono_gx.pp": "post", | |
1017 | "flanger_mono_gx.wet": 100, | |
1018 | "flanger_mono_gx.width": 5, | |
1019 | "freeverb.RoomSize": 0.7, | |
1020 | "freeverb.damp": 0.65, | |
1021 | "freeverb.on_off": 1, | |
1022 | "freeverb.position": 5, | |
1023 | "freeverb.pp": "post", | |
1024 | "freeverb.wet_dry": 0.1, | |
1025 | "gx_distortion.drive": 0.64, | |
1026 | "gx_distortion.gain": 2, | |
1027 | "gx_distortion.high_drive": 1, | |
1028 | "gx_distortion.high_gain": 10, | |
1029 | "gx_distortion.level": 0.01, | |
1030 | "gx_distortion.low_drive": 1, | |
1031 | "gx_distortion.low_gain": 10, | |
1032 | "gx_distortion.middle_h_drive": 1, | |
1033 | "gx_distortion.middle_h_gain": 10, | |
1034 | "gx_distortion.middle_l_drive": 1, | |
1035 | "gx_distortion.middle_l_gain": 10, | |
1036 | "gx_distortion.on_off": 0, | |
1037 | "gx_distortion.position": 4, | |
1038 | "gx_distortion.pp": "post", | |
1039 | "gx_distortion.resonator.on_off": 0, | |
1040 | "gx_distortion.split_high_freq": 1250, | |
1041 | "gx_distortion.split_low_freq": 250, | |
1042 | "gx_distortion.split_middle_freq": 650, | |
1043 | "gx_distortion.trigger": 0.12, | |
1044 | "gx_distortion.vibrato": 1, | |
1045 | "gx_distortion.wet_dry": 100, | |
1046 | "gxdistortion.drive": 0, | |
1047 | "gxdistortion.wet_dry": 100, | |
1048 | "highbooster.Level": 0.5, | |
1049 | "highbooster.on_off": 0, | |
1050 | "highbooster.position": 1, | |
1051 | "highbooster.pp": "post", | |
1052 | "jconv.balance": 0, | |
1053 | "jconv.convolver": { | |
1054 | "jconv.IRFile": "greathall.wav", | |
1055 | "jconv.IRDir": "", | |
1056 | "jconv.Gain": 0.598717, | |
1057 | "jconv.GainCor": 1, | |
1058 | "jconv.Offset": 0, | |
1059 | "jconv.Length": 112561, | |
1060 | "jconv.Delay": 0, | |
1061 | "jconv.gainline": [[0, 0], [112560, 0]] | |
1062 | }, | |
1063 | "jconv.diff_delay": 0, | |
1064 | "jconv.gain": 0, | |
1065 | "jconv.on_off": 0, | |
1066 | "jconv.position": 6, | |
1067 | "jconv.wet_dry": 100, | |
1068 | "jconv_mono.convolver": { | |
1069 | "jconv.IRFile": "greathall.wav", | |
1070 | "jconv.IRDir": "", | |
1071 | "jconv.Gain": 0.598717, | |
1072 | "jconv.GainCor": 1, | |
1073 | "jconv.Offset": 0, | |
1074 | "jconv.Length": 112561, | |
1075 | "jconv.Delay": 0, | |
1076 | "jconv.gainline": [[0, 0], [112560, 0]] | |
1077 | }, | |
1078 | "jconv_mono.gain": 0, | |
1079 | "jconv_mono.on_off": 0, | |
1080 | "jconv_mono.position": 13, | |
1081 | "jconv_mono.pp": "post", | |
1082 | "jconv_mono.wet_dry": 100, | |
1083 | "low_high_pass.lhc.high_freq": 6000, | |
1084 | "low_high_pass.lhc.low_freq": 145.395, | |
1085 | "low_high_pass.lhc.on_off": 1, | |
1086 | "low_high_pass.lhp.high_freq": 150, | |
1087 | "low_high_pass.lhp.low_freq": 6000, | |
1088 | "low_high_pass.lhp.on_off": 0, | |
1089 | "low_highpass.on_off": 0, | |
1090 | "low_highpass.position": 7, | |
1091 | "low_highpass.pp": "post", | |
1092 | "midi_out.beat_detector.atack_gain": 5, | |
1093 | "midi_out.beat_detector.beat_gain": 1, | |
1094 | "midi_out.beat_detector.midi_gain": 1, | |
1095 | "midi_out.beat_detector.note_off": 2, | |
1096 | "midi_out.beat_detector.stepper": 1, | |
1097 | "midi_out.channel_1.auto_pitch": 0, | |
1098 | "midi_out.channel_1.autogain": 0, | |
1099 | "midi_out.channel_1.channel": 0, | |
1100 | "midi_out.channel_1.oktave": 0, | |
1101 | "midi_out.channel_1.program": 0, | |
1102 | "midi_out.channel_1.sensity": 20, | |
1103 | "midi_out.channel_1.velocity": 64, | |
1104 | "midi_out.channel_1.volume": 64, | |
1105 | "midi_out.channel_2.auto_pitch": 0, | |
1106 | "midi_out.channel_2.autogain": 0, | |
1107 | "midi_out.channel_2.channel": 0, | |
1108 | "midi_out.channel_2.oktave": 0, | |
1109 | "midi_out.channel_2.on_off": 0, | |
1110 | "midi_out.channel_2.program": 0, | |
1111 | "midi_out.channel_2.sensity": 20, | |
1112 | "midi_out.channel_2.velocity": 64, | |
1113 | "midi_out.channel_2.volume": 64, | |
1114 | "midi_out.channel_3.auto_pitch": 0, | |
1115 | "midi_out.channel_3.autogain": 0, | |
1116 | "midi_out.channel_3.channel": 0, | |
1117 | "midi_out.channel_3.oktave": 0, | |
1118 | "midi_out.channel_3.on_off": 0, | |
1119 | "midi_out.channel_3.program": 0, | |
1120 | "midi_out.channel_3.sensity": 20, | |
1121 | "midi_out.channel_3.velocity": 64, | |
1122 | "midi_out.channel_3.volume": 64, | |
1123 | "midi_out.on_off": 0, | |
1124 | "moog.Q": 1, | |
1125 | "moog.fr": 3000, | |
1126 | "moog.on_off": 0, | |
1127 | "moog.position": 4, | |
1128 | "noise_gate.on_off": 0, | |
1129 | "noise_gate.threshold": 0.017, | |
1130 | "oscilloscope.on_off": 0, | |
1131 | "oscilloscope.position": 11, | |
1132 | "oscilloscope.pp": "post", | |
1133 | "overdrive.drive": 1, | |
1134 | "overdrive.on_off": 0, | |
1135 | "overdrive.position": 7, | |
1136 | "overdrive.pp": "post", | |
1137 | "overdrive.wet_dry": 100, | |
1138 | "phaser.MaxNotch1Freq": 800, | |
1139 | "phaser.MinNotch1Freq": 100, | |
1140 | "phaser.Notch width": 1000, | |
1141 | "phaser.NotchFreq": 1.5, | |
1142 | "phaser.Speed": 0.5, | |
1143 | "phaser.VibratoMode": "direct ", | |
1144 | "phaser.depth": 1, | |
1145 | "phaser.feedback gain": 0, | |
1146 | "phaser.invert": "linear", | |
1147 | "phaser.level": 0, | |
1148 | "phaser.on_off": 0, | |
1149 | "phaser.position": 2, | |
1150 | "phaser_mono.Speed": 0.5, | |
1151 | "phaser_mono.level": 0, | |
1152 | "phaser_mono.on_off": 0, | |
1153 | "phaser_mono.position": 18, | |
1154 | "phaser_mono.pp": "post", | |
1155 | "phaser_mono.wet_dry": 100, | |
1156 | "pre.Level": 1, | |
1157 | "pre.bass": 0, | |
1158 | "pre.on_off": 0, | |
1159 | "pre.position": 10, | |
1160 | "pre.pp": "post", | |
1161 | "pre.select": "AC30", | |
1162 | "pre.treble": 0, | |
1163 | "shaper.on_off": 0, | |
1164 | "shaper.sharper": 9, | |
1165 | "stereodelay.LFO freq": 0.2, | |
1166 | "stereodelay.invert": "linear", | |
1167 | "stereodelay.l_delay": 0, | |
1168 | "stereodelay.l_gain": 0, | |
1169 | "stereodelay.on_off": 0, | |
1170 | "stereodelay.position": 4, | |
1171 | "stereodelay.r_delay": 0, | |
1172 | "stereodelay.r_gain": 0, | |
1173 | "stereoecho.LFO freq": 0.2, | |
1174 | "stereoecho.invert": "linear", | |
1175 | "stereoecho.on_off": 0, | |
1176 | "stereoecho.percent_l": 0, | |
1177 | "stereoecho.percent_r": 0, | |
1178 | "stereoecho.position": 3, | |
1179 | "stereoecho.time_l": 1, | |
1180 | "stereoecho.time_r": 1, | |
1181 | "stereoverb.LFO freq": 0.2, | |
1182 | "stereoverb.RoomSize": 0.5, | |
1183 | "stereoverb.damp": 0.5, | |
1184 | "stereoverb.invert": "linear", | |
1185 | "stereoverb.on_off": 0, | |
1186 | "stereoverb.position": 7, | |
1187 | "stereoverb.wet_dry": 50, | |
1188 | "tonemodul.Bass": 0, | |
1189 | "tonemodul.Middle": 0, | |
1190 | "tonemodul.ON": 0, | |
1191 | "tonemodul.Treble": 0, | |
1192 | "tonemodul.on_off": 0, | |
1193 | "tonemodul.position": 8, | |
1194 | "tonemodul.sharper": -2, | |
1195 | "tremolo.SINE": "triangle", | |
1196 | "tremolo.depth": 0.5, | |
1197 | "tremolo.freq": 5, | |
1198 | "tremolo.on_off": 0, | |
1199 | "tremolo.position": 17, | |
1200 | "tremolo.pp": "post", | |
1201 | "tremolo.wet_dry": 100, | |
1202 | "ts9sim.drive": 0.5, | |
1203 | "ts9sim.level": -16, | |
1204 | "ts9sim.on_off": 0, | |
1205 | "ts9sim.position": 6, | |
1206 | "ts9sim.pp": "post", | |
1207 | "ts9sim.tone": 400, | |
1208 | "tube.select": "12ax7", | |
1209 | "ui.IR": 0, | |
1210 | "ui.abgate": 0, | |
1211 | "ui.amp.tonestack": 0, | |
1212 | "ui.ampmodul": 0, | |
1213 | "ui.biquad": 0, | |
1214 | "ui.cab": 1, | |
1215 | "ui.chorus": 1, | |
1216 | "ui.chorus_mono": 0, | |
1217 | "ui.compressor": 0, | |
1218 | "ui.crybaby": 0, | |
1219 | "ui.delay": 0, | |
1220 | "ui.echo": 0, | |
1221 | "ui.eqs": 1, | |
1222 | "ui.expander": 0, | |
1223 | "ui.feedback": 0, | |
1224 | "ui.flanger": 0, | |
1225 | "ui.flanger_mono": 0, | |
1226 | "ui.flanger_mono_gx": 0, | |
1227 | "ui.freeverb": 1, | |
1228 | "ui.gx_distortion": 0, | |
1229 | "ui.highbooster": 0, | |
1230 | "ui.jconv": 0, | |
1231 | "ui.jconv_mono": 0, | |
1232 | "ui.low_highpass": 0, | |
1233 | "ui.midi_out": 0, | |
1234 | "ui.moog": 0, | |
1235 | "ui.oscilloscope": 0, | |
1236 | "ui.overdrive": 0, | |
1237 | "ui.phaser": 0, | |
1238 | "ui.phaser_mono": 0, | |
1239 | "ui.pre": 0, | |
1240 | "ui.stereodelay": 0, | |
1241 | "ui.stereoecho": 0, | |
1242 | "ui.stereoverb": 0, | |
1243 | "ui.tonemodul": 0, | |
1244 | "ui.tremolo": 0, | |
1245 | "ui.ts9sim": 0, | |
1246 | "ui.univibe": 0, | |
1247 | "ui.univibe_mono": 0, | |
1248 | "ui.zita_rev1": 0, | |
1249 | "univibe.depth": 0.37, | |
1250 | "univibe.fb": -0.6, | |
1251 | "univibe.freq": 4.4, | |
1252 | "univibe.lrcross": 0, | |
1253 | "univibe.on_off": 0, | |
1254 | "univibe.panning": 0, | |
1255 | "univibe.position": 9, | |
1256 | "univibe.stereo": 0.11, | |
1257 | "univibe.wet_dry": 1, | |
1258 | "univibe.width": 0.5, | |
1259 | "univibe_mono.depth": 0.37, | |
1260 | "univibe_mono.fb": -0.6, | |
1261 | "univibe_mono.freq": 4.4, | |
1262 | "univibe_mono.on_off": 0, | |
1263 | "univibe_mono.position": 27, | |
1264 | "univibe_mono.pp": "post", | |
1265 | "univibe_mono.wet_dry": 1, | |
1266 | "univibe_mono.width": 0.5, | |
1267 | "zita_rev1.decay_times.hf_damping": 6000, | |
1268 | "zita_rev1.decay_times.lf_x": 200, | |
1269 | "zita_rev1.decay_times.low_rt60": 3, | |
1270 | "zita_rev1.decay_times.mid_rt60": 2, | |
1271 | "zita_rev1.equalizer1.eq1_freq": 315, | |
1272 | "zita_rev1.equalizer1.eq1_level": 0, | |
1273 | "zita_rev1.equalizer2.eq2_freq": 315, | |
1274 | "zita_rev1.equalizer2.eq2_level": 0, | |
1275 | "zita_rev1.input.in_delay": 60, | |
1276 | "zita_rev1.on_off": 0, | |
1277 | "zita_rev1.output.dry_wet_mix": 0, | |
1278 | "zita_rev1.output.level": 0, | |
1279 | "zita_rev1.position": 8 | |
1280 | } | |
1281 | } | |
1282 | ] |
0 | 0 | prefix=/path |
1 | 1 | exec_prefix=${prefix} |
2 | libdir=${exec_prefix}/lib | |
2 | libdir=/path | |
3 | 3 | datarootdir=${prefix}/share |
4 | 4 | datadir=${datarootdir} |
5 | 5 | includedir=${prefix}/include |
Binary diff not shown
0 | 0 | prefix=/path |
1 | 1 | exec_prefix=${prefix} |
2 | libdir=${exec_prefix}/lib | |
2 | libdir=/path | |
3 | 3 | datarootdir=${prefix}/share |
4 | 4 | datadir=${datarootdir} |
5 | 5 | includedir=${prefix}/include |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | Ampf::Ampf() | |
20 | { | |
21 | } | |
22 | ||
23 | Ampf::~Ampf() | |
24 | { | |
25 | } | |
26 | ||
27 | inline void Ampf::init(uint32_t samplingFreq) | |
28 | { | |
29 | fSamplingFreq = samplingFreq; | |
30 | } | |
31 | ||
32 | inline void Ampf::compute(int32_t count, float *input0, float *output0, float value) | |
33 | { | |
34 | double fSlow0 = value * value * 0.01; | |
35 | //double fSlow1 = (fSlow0 * pow(10,(0 - (0.1 * fSlow0)))); | |
36 | for (int32_t i=0; i<count; i++) | |
37 | { | |
38 | output0[i] = fSlow0 * input0[i]; | |
39 | } | |
40 | } | |
41 | ||
42 | void Ampf::connect(uint32_t port,void* data) | |
43 | { | |
44 | switch ((PortIndex)port) | |
45 | { | |
46 | case AMP_MASTERGAIN: | |
47 | break; | |
48 | case AMP_PREGAIN: | |
49 | break; | |
50 | case AMP_WET_DRY: | |
51 | break; | |
52 | case AMP_DRIVE: | |
53 | break; | |
54 | case MID: | |
55 | break; | |
56 | case BASS: | |
57 | break; | |
58 | case TREBLE: | |
59 | break; | |
60 | case CLevel: | |
61 | break; | |
62 | case ALevel: | |
63 | break; | |
64 | case AMP_CONTROL: | |
65 | break; | |
66 | case AMP_NOTIFY: | |
67 | break; | |
68 | case AMP_OUTPUT: | |
69 | break; | |
70 | case AMP_INPUT: | |
71 | break; | |
72 | case AMP_OUTPUT1: | |
73 | break; | |
74 | case AMP_INPUT1: | |
75 | break; | |
76 | } | |
77 | } | |
78 | ||
79 | void Ampf::connect_static(uint32_t port,void* data, Ampf *p) | |
80 | { | |
81 | static_cast<Ampf*>(p)->connect(port, data); | |
82 | } | |
83 | ||
84 | void Ampf::init_static(uint32_t samplingFreq, Ampf *p) | |
85 | { | |
86 | static_cast<Ampf*>(p)->init(samplingFreq); | |
87 | } | |
88 |
15 | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
16 | 16 | * -------------------------------------------------------------------------- |
17 | 17 | */ |
18 | #include <stdint.h> | |
18 | 19 | |
19 | 20 | class Ampf |
20 | 21 | { |
21 | private: | |
22 | int32_t fSamplingFreq; | |
23 | void init(uint32_t samplingFreq); | |
24 | void connect(uint32_t port,void* data); | |
25 | ||
26 | 22 | public: |
27 | void compute(int32_t count, float *input0, float *output0, float value); | |
28 | static void connect_static(uint32_t port,void* data, Ampf *p); | |
29 | static void init_static(uint32_t samplingFreq, Ampf *p); | |
30 | Ampf(); | |
31 | ~Ampf(); | |
23 | inline void compute(int32_t count, float *input0, float *output0, float value) { | |
24 | double fSlow0 = value * value * 0.01; | |
25 | for (int32_t i=0; i<count; i++) { | |
26 | output0[i] = fSlow0 * input0[i]; | |
27 | } | |
28 | }; | |
29 | Ampf() {}; | |
30 | ~Ampf() {}; | |
32 | 31 | }; |
33 | 32 |
151 | 151 | case AMP_DRIVE: |
152 | 152 | fslider3_ = (float*)data; |
153 | 153 | break; |
154 | case MID: | |
155 | break; | |
156 | case BASS: | |
157 | break; | |
158 | case TREBLE: | |
159 | break; | |
160 | case CLevel: | |
161 | break; | |
162 | case ALevel: | |
163 | break; | |
164 | case AMP_CONTROL: | |
165 | break; | |
166 | case AMP_NOTIFY: | |
167 | break; | |
168 | case AMP_OUTPUT: | |
169 | break; | |
170 | case AMP_INPUT: | |
171 | break; | |
172 | case AMP_OUTPUT1: | |
173 | break; | |
174 | case AMP_INPUT1: | |
154 | default: | |
175 | 155 | break; |
176 | 156 | } |
177 | 157 | } |
835 | 815 | } |
836 | 816 | |
837 | 817 | |
838 | void GxAmpMono::run_static(uint32_t n_samples, float* input, float* output, GxAmpMono *p) | |
839 | { | |
840 | (p->*_a_ptr)(n_samples, input, output); | |
841 | } | |
842 | ||
843 | 818 | /////////////////////////////// STEREO ///////////////////////////////// |
844 | 819 | |
845 | 820 | |
1011 | 986 | case AMP_DRIVE: |
1012 | 987 | fslider3_ = (float*)data; |
1013 | 988 | break; |
1014 | case MID: | |
1015 | break; | |
1016 | case BASS: | |
1017 | break; | |
1018 | case TREBLE: | |
1019 | break; | |
1020 | case CLevel: | |
1021 | break; | |
1022 | case ALevel: | |
1023 | break; | |
1024 | case AMP_OUTPUT: | |
1025 | //output = (float*)data; | |
1026 | break; | |
1027 | case AMP_INPUT: | |
1028 | //input = (float*)data; | |
1029 | break; | |
1030 | case AMP_OUTPUT1: | |
1031 | //output = (float*)data; | |
1032 | break; | |
1033 | case AMP_INPUT1: | |
1034 | //input = (float*)data; | |
1035 | break; | |
1036 | case AMP_CONTROL: | |
1037 | break; | |
1038 | case AMP_NOTIFY: | |
989 | default: | |
1039 | 990 | break; |
1040 | 991 | } |
1041 | 992 | } |
2192 | 2143 | { |
2193 | 2144 | p->connect(port, data); |
2194 | 2145 | } |
2195 | ||
2196 | ||
2197 | void GxAmpStereo::run_static(uint32_t n_samples, float* input, float* input1, float* output, float* output1, GxAmpStereo *p) | |
2198 | { | |
2199 | (p->*_as_ptr)(n_samples, input, input1, output, output1); | |
2200 | } | |
2201 |
27 | 27 | class GxAmpMono |
28 | 28 | { |
29 | 29 | private: |
30 | int32_t fSamplingFreq; | |
30 | uint32_t fSamplingFreq; | |
31 | 31 | float fslider0; |
32 | 32 | float *fslider0_; |
33 | 33 | double fRec0[2]; |
154 | 154 | void run_6DJ8(uint32_t n_samples, float* input, float* output); |
155 | 155 | static void init_static(uint32_t samplingFreq, GxAmpMono *p); |
156 | 156 | static void connect_static(uint32_t port,void* data, GxAmpMono *p); |
157 | static void run_static(uint32_t n_samples, float* input, float* output, GxAmpMono *p); | |
157 | //static void run_static(uint32_t n_samples, float* input, float* output, GxAmpMono *p); | |
158 | 158 | GxAmpMono() {}; |
159 | 159 | ~GxAmpMono() {}; |
160 | 160 | }; |
161 | // define run pointer typs | |
162 | typedef void (GxAmpMono::*run_this) | |
163 | (uint32_t count,float* input, float* output); | |
164 | ||
165 | run_this _a_ptr; | |
166 | 161 | |
167 | 162 | |
168 | 163 | class GxAmpStereo |
169 | 164 | { |
170 | 165 | private: |
171 | int32_t fSamplingFreq; | |
166 | uint32_t fSamplingFreq; | |
172 | 167 | float fslider0; |
173 | 168 | float *fslider0_; |
174 | 169 | double fRec0[2]; |
331 | 326 | void run_6DJ8(uint32_t n_samples, float* input,float* input1, float* output, float* output1); |
332 | 327 | static void init_static(uint32_t samplingFreq, GxAmpStereo *p); |
333 | 328 | static void connect_static(uint32_t port,void* data, GxAmpStereo *p); |
334 | static void run_static(uint32_t n_samples, float* input,float* input1, float* output, float* output1, GxAmpStereo *p); | |
329 | //static void run_static(uint32_t n_samples, float* input,float* input1, float* output, float* output1, GxAmpStereo *p); | |
335 | 330 | GxAmpStereo() {}; |
336 | 331 | ~GxAmpStereo() {}; |
337 | 332 | }; |
338 | 333 | |
339 | // define run pointer typs | |
340 | typedef void (GxAmpStereo::*run_stereo) | |
341 | (uint32_t count,float* input, float* input1, float* output, float* output1); | |
342 | ||
343 | run_stereo _as_ptr; | |
344 | 334 | |
345 | 335 | |
346 | 336 | #endif //SRC_HEADERS_GX_AMP_H_ |
180 | 180 | bufsize = Convproc::MINPART; |
181 | 181 | } |
182 | 182 | if (Convproc::configure(1, 1, count, buffersize, |
183 | bufsize, Convproc::MAXPART)) | |
183 | bufsize, bufsize)) // Convproc::MAXPART | |
184 | 184 | { |
185 | 185 | printf("no configure\n"); |
186 | 186 | return false; |
266 | 266 | bufsize = Convproc::MINPART; |
267 | 267 | } |
268 | 268 | if (Convproc::configure(2, 2, count, buffersize, |
269 | bufsize, Convproc::MAXPART)) | |
269 | bufsize, bufsize)) // Convproc::MAXPART | |
270 | 270 | { |
271 | 271 | printf("no configure\n"); |
272 | 272 | return false; |
37 | 37 | { |
38 | 38 | switch ((PortIndex)port) |
39 | 39 | { |
40 | case AMP_MASTERGAIN: | |
41 | break; | |
42 | case AMP_PREGAIN: | |
43 | break; | |
44 | case AMP_WET_DRY: | |
45 | break; | |
46 | case AMP_DRIVE: | |
47 | break; | |
48 | 40 | case MID: |
49 | 41 | fslider0_ = (float*)data; |
50 | 42 | break; |
54 | 46 | case TREBLE: |
55 | 47 | fslider2_ = (float*)data; |
56 | 48 | break; |
57 | case CLevel: | |
58 | break; | |
59 | case ALevel: | |
60 | break; | |
61 | case AMP_CONTROL: | |
62 | break; | |
63 | case AMP_NOTIFY: | |
64 | break; | |
65 | case AMP_OUTPUT: | |
66 | break; | |
67 | case AMP_INPUT: | |
68 | break; | |
69 | case AMP_OUTPUT1: | |
70 | break; | |
71 | case AMP_INPUT1: | |
49 | default: | |
72 | 50 | break; |
73 | 51 | } |
74 | 52 | } |
253 | 231 | void TonestackMono::connect_static(uint32_t port,void* data, TonestackMono *p) |
254 | 232 | { |
255 | 233 | p->connect(port, data); |
256 | } | |
257 | ||
258 | void TonestackMono::run_static(uint32_t n_samples, TonestackMono *p, float *output) | |
259 | { | |
260 | (p->*_t_ptr)(n_samples, output); | |
261 | 234 | } |
262 | 235 | |
263 | 236 | ////////////////////////////// STEREO ////////////////////////////////// |
284 | 257 | { |
285 | 258 | switch ((PortIndex)port) |
286 | 259 | { |
287 | case AMP_MASTERGAIN: | |
288 | break; | |
289 | case AMP_PREGAIN: | |
290 | break; | |
291 | case AMP_WET_DRY: | |
292 | break; | |
293 | case AMP_DRIVE: | |
294 | break; | |
295 | 260 | case MID: |
296 | 261 | fslider0_ = (float*)data; |
297 | 262 | break; |
301 | 266 | case TREBLE: |
302 | 267 | fslider2_ = (float*)data; |
303 | 268 | break; |
304 | case CLevel: | |
305 | break; | |
306 | case ALevel: | |
307 | break; | |
308 | case AMP_OUTPUT: | |
309 | break; | |
310 | case AMP_INPUT: | |
311 | break; | |
312 | case AMP_OUTPUT1: | |
313 | break; | |
314 | case AMP_INPUT1: | |
315 | break; | |
316 | case AMP_CONTROL: | |
317 | break; | |
318 | case AMP_NOTIFY: | |
269 | default: | |
319 | 270 | break; |
320 | 271 | } |
321 | 272 | } |
511 | 462 | { |
512 | 463 | p->connect(port, data); |
513 | 464 | } |
514 | ||
515 | void TonestackStereo::run_static(uint32_t n_samples, TonestackStereo *p, float *output, float *output1) | |
516 | { | |
517 | (p->*_ts_ptr)(n_samples, output, output1); | |
518 | } |
47 | 47 | void run_ampeg(uint32_t n_samples, float *output); |
48 | 48 | static void init_static(uint32_t samplingFreq, TonestackMono *p); |
49 | 49 | static void connect_static(uint32_t port,void* data, TonestackMono *p); |
50 | static void run_static(uint32_t n_samples, TonestackMono*, float *output); | |
50 | //static void run_static(uint32_t n_samples, TonestackMono*, float *output); | |
51 | 51 | |
52 | 52 | TonestackMono() {}; |
53 | 53 | ~TonestackMono() {}; |
54 | 54 | }; |
55 | 55 | |
56 | // define run pointer typs | |
57 | typedef void (TonestackMono::*run_tonestack_mono) | |
58 | (uint32_t count, float *output); | |
59 | ||
60 | run_tonestack_mono _t_ptr; | |
61 | 56 | |
62 | 57 | |
63 | 58 | class TonestackStereo |
86 | 81 | void run_ampeg(uint32_t n_samples, float *output, float *output1); |
87 | 82 | static void init_static(uint32_t samplingFreq, TonestackStereo *p); |
88 | 83 | static void connect_static(uint32_t port,void* data, TonestackStereo *p); |
89 | static void run_static(uint32_t n_samples, TonestackStereo*, float *output, float *output1); | |
84 | //static void run_static(uint32_t n_samples, TonestackStereo*, float *output, float *output1); | |
90 | 85 | TonestackStereo() {}; |
91 | 86 | ~TonestackStereo() {}; |
92 | 87 | }; |
93 | 88 | |
94 | // define run pointer typs | |
95 | typedef void (TonestackStereo::*run_tonestack_stereo) | |
96 | (uint32_t count, float *output, float *output1); | |
97 | ||
98 | run_tonestack_stereo _ts_ptr; | |
99 | 89 | |
100 | 90 | |
101 | 91 | #endif //SRC_HEADERS_GX_TONESTACK_H_ |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | Impf::Impf() | |
20 | { | |
21 | } | |
22 | ||
23 | Impf::~Impf() | |
24 | { | |
25 | } | |
26 | ||
27 | inline void Impf::init(uint32_t samplingFreq) | |
28 | { | |
29 | fSamplingFreq = samplingFreq; | |
30 | } | |
31 | ||
32 | inline void Impf::compute(int32_t count, float *input0, float *output0, float value) | |
33 | { | |
34 | double fSlow0 = value* value * 0.01; | |
35 | //double fSlow1 = (fSlow0 * pow(10,(0 - (0.1 * fSlow0)))); | |
36 | for (int32_t i=0; i<count; i++) | |
37 | { | |
38 | output0[i] = fSlow0 * input0[i]; | |
39 | } | |
40 | } | |
41 | ||
42 | void Impf::connect(uint32_t port,void* data) | |
43 | { | |
44 | switch ((PortIndex)port) | |
45 | { | |
46 | case AMP_MASTERGAIN: | |
47 | break; | |
48 | case AMP_PREGAIN: | |
49 | break; | |
50 | case AMP_WET_DRY: | |
51 | break; | |
52 | case AMP_DRIVE: | |
53 | break; | |
54 | case MID: | |
55 | break; | |
56 | case BASS: | |
57 | break; | |
58 | case TREBLE: | |
59 | break; | |
60 | case CLevel: | |
61 | break; | |
62 | case ALevel: | |
63 | break; | |
64 | case AMP_CONTROL: | |
65 | break; | |
66 | case AMP_NOTIFY: | |
67 | break; | |
68 | case AMP_OUTPUT: | |
69 | break; | |
70 | case AMP_INPUT: | |
71 | break; | |
72 | case AMP_OUTPUT1: | |
73 | break; | |
74 | case AMP_INPUT1: | |
75 | break; | |
76 | } | |
77 | } | |
78 | ||
79 | void Impf::connect_static(uint32_t port,void* data, Impf *p) | |
80 | { | |
81 | static_cast<Impf*>(p)->connect(port, data); | |
82 | } | |
83 | ||
84 | void Impf::init_static(uint32_t samplingFreq, Impf *p) | |
85 | { | |
86 | static_cast<Impf*>(p)->init(samplingFreq); | |
87 | } | |
88 |
16 | 16 | * -------------------------------------------------------------------------- |
17 | 17 | */ |
18 | 18 | |
19 | #include <stdint.h> | |
19 | 20 | |
20 | 21 | class Impf |
21 | 22 | { |
22 | private: | |
23 | int32_t fSamplingFreq; | |
24 | void init(uint32_t samplingFreq); | |
25 | void connect(uint32_t port,void* data); | |
26 | ||
27 | 23 | public: |
28 | void compute(int32_t count, float *input0, float *output0, float value); | |
29 | static void connect_static(uint32_t port,void* data, Impf *p); | |
30 | static void init_static(uint32_t samplingFreq, Impf *p); | |
31 | Impf(); | |
32 | ~Impf(); | |
24 | inline void compute(int32_t count, float *input0, float *output0, float value) { | |
25 | double fSlow0 = value* value * 0.01; | |
26 | for (int32_t i=0; i<count; i++) { | |
27 | output0[i] = fSlow0 * input0[i]; | |
28 | } | |
29 | }; | |
30 | Impf() {}; | |
31 | ~Impf() {}; | |
33 | 32 | }; |
34 | 33 |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
125 | 125 | #include "impulse_former.h" |
126 | 126 | #include "ampulse_former.h" |
127 | 127 | |
128 | // define run pointer typs | |
129 | typedef void (GxAmpStereo::*run_amp_stereo) | |
130 | (uint32_t count,float* input, float* input1, float* output, float* output1); | |
131 | ||
132 | typedef void (TonestackStereo::*run_tonestack_stereo) | |
133 | (uint32_t count, float *output, float *output1); | |
134 | ||
128 | 135 | //////////////////////////// STEREO //////////////////////////////////// |
129 | 136 | |
130 | 137 | class GxPluginStereo |
138 | 145 | uint32_t tubesel; |
139 | 146 | int32_t prio; |
140 | 147 | TonestackStereo ts; |
148 | run_tonestack_stereo _ts_ptr; | |
141 | 149 | GxAmpStereo amplifier; |
150 | run_amp_stereo _as_ptr; | |
142 | 151 | gx_resample::BufferResampler resamp; |
143 | 152 | GxSimpleConvolver cabconv; |
144 | 153 | Impf impf; |
231 | 240 | #include "cab_data.cc" |
232 | 241 | #include "gx_tonestack.cc" |
233 | 242 | #include "gx_amp.cc" |
234 | #include "impulse_former.cc" | |
235 | #include "ampulse_former.cc" | |
236 | ||
237 | 243 | |
238 | 244 | // plugin stuff |
239 | 245 | |
380 | 386 | { |
381 | 387 | switch ((PortIndex)port) |
382 | 388 | { |
383 | case AMP_MASTERGAIN: | |
384 | break; | |
385 | case AMP_PREGAIN: | |
386 | break; | |
387 | case AMP_WET_DRY: | |
388 | break; | |
389 | case AMP_DRIVE: | |
390 | break; | |
391 | case MID: | |
392 | break; | |
393 | case BASS: | |
394 | break; | |
395 | case TREBLE: | |
396 | break; | |
397 | 389 | case CLevel: |
398 | 390 | clevel = static_cast<float*>(data); |
399 | 391 | break; |
418 | 410 | case AMP_INPUT1: |
419 | 411 | input1 = static_cast<float*>(data); |
420 | 412 | break; |
413 | default: | |
414 | break; | |
421 | 415 | } |
422 | 416 | } |
423 | 417 | |
424 | 418 | void GxPluginStereo::run_dsp_stereo(uint32_t n_samples) |
425 | 419 | { |
426 | 420 | // run dsp |
427 | amplifier.run_static(n_samples, input, input1, output, output1, &lifier); | |
421 | (&lifier->*_as_ptr)(n_samples, input, input1, output, output1); | |
422 | //amplifier.run_static(n_samples, input, input1, output, output1, &lifier); | |
428 | 423 | ampconv.run_static_stereo(n_samples, &conv, output, output1); |
429 | ts.run_static(n_samples, &ts, output, output1); | |
424 | //ts.run_static(n_samples, &ts, output, output1); | |
425 | (&ts->*_ts_ptr)(n_samples, output, output1); | |
430 | 426 | cabconv.run_static_stereo(n_samples, &cabconv, output, output1); |
431 | 427 | // work ? |
432 | 428 | if (!atomic_get(schedule_wait) && val_changed()) |
29 | 29 | src2.append('../../../zita-resampler-1.1.0/resampler.cc') |
30 | 30 | src2.append('../../../zita-resampler-1.1.0/resampler-table.cc') |
31 | 31 | incl2.append('../../../zita-resampler-1.1.0') |
32 | cxxflag1 =[] | |
33 | if not bld.env['OPT']: | |
32 | cxxflag2 =[] | |
33 | if not bld.env['OPT'] and bld.env['SSE2']: | |
34 | 34 | cxxflag2 = [ "-msse2", "-mfpmath=sse"] |
35 | 35 | lv2_plugin_stereo = bld( |
36 | 36 | features='cxx cshlib ', |
125 | 125 | #include "impulse_former.h" |
126 | 126 | #include "ampulse_former.h" |
127 | 127 | |
128 | // define run pointer typs | |
129 | typedef void (GxAmpMono::*run_amp_mono) | |
130 | (uint32_t count,float* input, float* output); | |
131 | ||
132 | typedef void (TonestackMono::*run_tonestack_mono) | |
133 | (uint32_t count, float *output); | |
134 | ||
128 | 135 | ////////////////////////////// MONO //////////////////////////////////// |
129 | 136 | |
130 | 137 | class GxPluginMono |
136 | 143 | uint32_t tubesel; |
137 | 144 | int32_t prio; |
138 | 145 | TonestackMono ts; |
146 | run_tonestack_mono _t_ptr; | |
139 | 147 | GxAmpMono amplifier; |
148 | run_amp_mono _a_ptr; | |
140 | 149 | gx_resample::BufferResampler resamp; |
141 | 150 | GxSimpleConvolver cabconv; |
142 | 151 | Impf impf; |
225 | 234 | #include "cab_data.cc" |
226 | 235 | #include "gx_tonestack.cc" |
227 | 236 | #include "gx_amp.cc" |
228 | #include "impulse_former.cc" | |
229 | #include "ampulse_former.cc" | |
230 | 237 | |
231 | 238 | // plugin stuff |
232 | 239 | |
373 | 380 | { |
374 | 381 | switch ((PortIndex)port) |
375 | 382 | { |
376 | case AMP_MASTERGAIN: | |
377 | break; | |
378 | case AMP_PREGAIN: | |
379 | break; | |
380 | case AMP_WET_DRY: | |
381 | break; | |
382 | case AMP_DRIVE: | |
383 | break; | |
384 | case MID: | |
385 | break; | |
386 | case BASS: | |
387 | break; | |
388 | case TREBLE: | |
389 | break; | |
390 | 383 | case CLevel: |
391 | 384 | clevel = static_cast<float*>(data); |
392 | 385 | break; |
405 | 398 | case AMP_INPUT: |
406 | 399 | input = static_cast<float*>(data); |
407 | 400 | break; |
408 | case AMP_OUTPUT1: | |
401 | default: | |
409 | 402 | break; |
410 | case AMP_INPUT1: | |
411 | break; | |
412 | 403 | } |
413 | 404 | } |
414 | 405 | |
415 | 406 | void GxPluginMono::run_dsp_mono(uint32_t n_samples) |
416 | 407 | { |
417 | 408 | // run dsp |
418 | amplifier.run_static(n_samples, input, output, &lifier); | |
409 | (&lifier->*_a_ptr)(n_samples, input, output); | |
410 | //amplifier.run_static(n_samples, input, output, &lifier); | |
419 | 411 | ampconv.run_static(n_samples, &conv, output); |
420 | ts.run_static(n_samples, &ts, output); | |
412 | //ts.run_static(n_samples, &ts, output); | |
413 | (&ts->*_t_ptr)(n_samples, output); | |
421 | 414 | cabconv.run_static(n_samples, &cabconv, output); |
422 | 415 | // work ? |
423 | 416 | if (!atomic_get(schedule_wait) && val_changed()) |
83 | 83 | { |
84 | 84 | Glib::ustring toparse = "pixmap_path "; |
85 | 85 | toparse += " '"; |
86 | toparse += GX_STYLE_DIR; | |
86 | toparse += GX_LV2_STYLE_DIR; | |
87 | 87 | toparse += "/'\n"; |
88 | 88 | toparse += "style \"gx_"; |
89 | 89 | toparse += plug_name; |
132 | 132 | { |
133 | 133 | //Gtk::Label* pr = new Gtk::Label(label, 0); |
134 | 134 | //pr->set_name("amplabel"); |
135 | Glib::ustring label_image = GX_STYLE_DIR; | |
135 | Glib::ustring label_image = GX_LV2_STYLE_DIR; | |
136 | 136 | label_image += "/"; |
137 | 137 | label_image += label; |
138 | 138 | label_image += "-label.png"; |
205 | 205 | alevel = value; |
206 | 206 | m_smallknob5.cp_set_value(alevel); |
207 | 207 | break; |
208 | case AMP_CONTROL: | |
209 | break; | |
210 | case AMP_NOTIFY: | |
211 | break; | |
212 | case AMP_OUTPUT: | |
213 | break; | |
214 | case AMP_INPUT: | |
215 | break; | |
216 | case AMP_OUTPUT1: | |
217 | break; | |
218 | case AMP_INPUT1: | |
208 | default: | |
219 | 209 | break; |
220 | 210 | } |
221 | 211 | } |
225 | 215 | { |
226 | 216 | mastergain = m_bigknob.get_value(); |
227 | 217 | //std::cout << "mastergain = " << mastergain << std::endl; |
228 | write_function( controller, 0, sizeof(float), 0, (const void*)&mastergain); | |
218 | write_function(controller, (PortIndex)AMP_MASTERGAIN, | |
219 | sizeof(float), 0, (const void*)&mastergain); | |
229 | 220 | } |
230 | 221 | |
231 | 222 | void Widget::on_knob1_value_changed() |
232 | 223 | { |
233 | 224 | pregain = m_bigknob1.get_value(); |
234 | 225 | //std::cout << "pregain = " << pregain << std::endl; |
235 | write_function( controller, 1, sizeof(float), 0, (const void*)&pregain); | |
226 | write_function(controller, (PortIndex)AMP_PREGAIN, | |
227 | sizeof(float), 0, (const void*)&pregain); | |
236 | 228 | } |
237 | 229 | |
238 | 230 | void Widget::on_knob2_value_changed() |
239 | 231 | { |
240 | 232 | wet_dry = m_bigknob2.get_value(); |
241 | 233 | //std::cout << "wet_dry = " << wet_dry << std::endl; |
242 | write_function( controller, 2, sizeof(float), 0, (const void*)&wet_dry); | |
234 | write_function(controller, (PortIndex)AMP_WET_DRY, | |
235 | sizeof(float), 0, (const void*)&wet_dry); | |
243 | 236 | } |
244 | 237 | |
245 | 238 | void Widget::on_knob3_value_changed() |
246 | 239 | { |
247 | 240 | drive = m_bigknob3.get_value(); |
248 | 241 | //std::cout << "drive = " << drive << std::endl; |
249 | write_function( controller, 3, sizeof(float), 0, (const void*)&drive); | |
242 | write_function(controller, (PortIndex)AMP_DRIVE, | |
243 | sizeof(float), 0, (const void*)&drive); | |
250 | 244 | } |
251 | 245 | |
252 | 246 | void Widget::on_knob4_value_changed() |
253 | 247 | { |
254 | 248 | mid = m_smallknob1.get_value(); |
255 | 249 | //std::cout << "mid = " << mid << std::endl; |
256 | write_function( controller, 4, sizeof(float), 0, (const void*)&mid); | |
250 | write_function(controller, (PortIndex)MID, | |
251 | sizeof(float), 0, (const void*)&mid); | |
257 | 252 | } |
258 | 253 | |
259 | 254 | void Widget::on_knob5_value_changed() |
260 | 255 | { |
261 | 256 | bass = m_smallknob2.get_value(); |
262 | 257 | //std::cout << "bass = " << bass << std::endl; |
263 | write_function( controller, 5, sizeof(float), 0, (const void*)&bass); | |
258 | write_function(controller, (PortIndex)BASS, | |
259 | sizeof(float), 0, (const void*)&bass); | |
264 | 260 | } |
265 | 261 | |
266 | 262 | void Widget::on_knob6_value_changed() |
267 | 263 | { |
268 | 264 | treble = m_smallknob3.get_value(); |
269 | 265 | //std::cout << "treble = " << treble << std::endl; |
270 | write_function( controller, 6, sizeof(float), 0, (const void*)&treble); | |
266 | write_function(controller, (PortIndex)TREBLE, | |
267 | sizeof(float), 0, (const void*)&treble); | |
271 | 268 | } |
272 | 269 | |
273 | 270 | void Widget::on_knob7_value_changed() |
274 | 271 | { |
275 | 272 | clevel = m_smallknob4.get_value(); |
276 | 273 | //std::cout << "treble = " << clevel << std::endl; |
277 | write_function( controller, 7, sizeof(float), 0, (const void*)&clevel); | |
274 | write_function(controller, (PortIndex)CLevel, | |
275 | sizeof(float), 0, (const void*)&clevel); | |
278 | 276 | } |
279 | 277 | |
280 | 278 | void Widget::on_knob8_value_changed() |
281 | 279 | { |
282 | 280 | alevel = m_smallknob5.get_value(); |
283 | 281 | //std::cout << "treble = " << alevel << std::endl; |
284 | write_function( controller, 8, sizeof(float), 0, (const void*)&alevel); | |
285 | } | |
282 | write_function(controller, (PortIndex)ALevel, | |
283 | sizeof(float), 0, (const void*)&alevel); | |
284 | } |
30 | 30 | src.append('../../zita-resampler-1.1.0/resampler-table.cc') |
31 | 31 | incl.append('../../zita-resampler-1.1.0') |
32 | 32 | cxxflag =[] |
33 | if not bld.env['OPT']: | |
33 | if not bld.env['OPT'] and bld.env['SSE2']: | |
34 | 34 | cxxflag = [ "-msse2", "-mfpmath=sse"] |
35 | 35 | lv2_plugin = bld( |
36 | 36 | features='cxx cshlib ', |
80 | 80 | install_path = '${LV2DIR}/%s' % bundle, |
81 | 81 | bld.install_files('${LV2DIR}/gxamp.lv2', 'manifest.ttl') |
82 | 82 | bld.install_files('${LV2DIR}/gxamp.lv2', 'gxamp.ttl') |
83 | ||
84 | gxlv2style_files = [ | |
85 | 'GUI/amp21.png', | |
86 | 'GUI/amp22.png', | |
87 | 'GUI/amp23.png', | |
88 | 'GUI/amp24.png', | |
89 | 'GUI/amp25.png', | |
90 | 'GUI/mastergain-label.png', | |
91 | 'GUI/pregain-label.png', | |
92 | 'GUI/drive-label.png', | |
93 | 'GUI/distortion-label.png', | |
94 | 'GUI/cabinet-label.png', | |
95 | 'GUI/presence-label.png', | |
96 | 'GUI/presence-label.png', | |
97 | 'GUI/bass-label.png', | |
98 | 'GUI/treble-label.png', | |
99 | 'GUI/mid-label.png', | |
100 | 'GUI/knob.png', | |
101 | 'GUI/knob-middle.png', | |
102 | 'GUI/knob-small.png', | |
103 | 'GUI/metalic1-knob.png', | |
104 | 'GUI/metalic1-knob-middle.png', | |
105 | 'GUI/metalic1-knob-small.png', | |
106 | 'GUI/black-knob.png', | |
107 | 'GUI/black-knob-middle.png', | |
108 | 'GUI/black-knob-small.png',] | |
109 | 83 | |
110 | bld.install_files(bld.env['GX_STYLE_DIR'], gxlv2style_files, chmod=0o644) | |
111 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | class dunwahauto { | |
20 | private: | |
21 | uint32_t fSamplingFreq; | |
22 | int32_t iConst0; | |
23 | double fConst1; | |
24 | double fConst2; | |
25 | double fRec2[2]; | |
26 | double fConst3; | |
27 | double fRec1[2]; | |
28 | double fConst4; | |
29 | double fConst5; | |
30 | double fRec3[2]; | |
31 | double fConst6; | |
32 | double fRec4[2]; | |
33 | double fRec0[4]; | |
34 | double fConst7; | |
35 | double fConst8; | |
36 | double fConst9; | |
37 | double fConst10; | |
38 | double fConst11; | |
39 | double fConst12; | |
40 | double fConst13; | |
41 | public: | |
42 | void clear_state_f(); | |
43 | void init(uint32_t samplingFreq); | |
44 | void run(uint32_t count, float *input0, float *output0); | |
45 | dunwahauto(); | |
46 | ~dunwahauto(); | |
47 | }; | |
48 | ||
49 | dunwahauto::dunwahauto() { | |
50 | } | |
51 | ||
52 | dunwahauto::~dunwahauto() { | |
53 | } | |
54 | ||
55 | inline void dunwahauto::clear_state_f() | |
56 | { | |
57 | for (int32_t i=0; i<2; i++) fRec2[i] = 0; | |
58 | for (int32_t i=0; i<2; i++) fRec1[i] = 0; | |
59 | for (int32_t i=0; i<2; i++) fRec3[i] = 0; | |
60 | for (int32_t i=0; i<2; i++) fRec4[i] = 0; | |
61 | for (int32_t i=0; i<4; i++) fRec0[i] = 0; | |
62 | } | |
63 | ||
64 | inline void dunwahauto::init(uint32_t samplingFreq) | |
65 | { | |
66 | fSamplingFreq = samplingFreq; | |
67 | iConst0 = min(192000, max(1, fSamplingFreq)); | |
68 | fConst1 = exp((0 - (1e+01 / iConst0))); | |
69 | fConst2 = (1.0 - fConst1); | |
70 | fConst3 = (0.007000000000000006 * ((iConst0 * (1.73888e-06 - (8.38823e-12 * iConst0))) - 0.193457)); | |
71 | fConst4 = (0.5 / iConst0); | |
72 | fConst5 = (1.0 / iConst0); | |
73 | fConst6 = exp((0 - (1236.9027460477864 / iConst0))); | |
74 | fConst7 = (1.77528e-06 - (8.52216e-12 * iConst0)); | |
75 | fConst8 = (0.879905 + (iConst0 * fConst7)); | |
76 | fConst9 = (1.54419e-05 - (6.43963e-11 * iConst0)); | |
77 | fConst10 = ((iConst0 * fConst9) - 0.386688); | |
78 | fConst11 = (fConst10 * (0 - (1.00038 * fConst8))); | |
79 | fConst12 = ((fConst10 * fConst8) + (1.00038 * (fConst10 + fConst8))); | |
80 | fConst13 = (0 - ((iConst0 * (fConst9 + fConst7)) + 1.4935970000000003)); | |
81 | clear_state_f(); | |
82 | } | |
83 | ||
84 | inline void dunwahauto::run(uint32_t count, float *input0, float *output0) | |
85 | { | |
86 | for (uint32_t i=0; i<count; i++) { | |
87 | double fTemp0 = min(1.0,fabs((double)input0[i])); | |
88 | fRec2[0] = ((fConst2 * fTemp0) + (fConst1 * max(fTemp0, fRec2[1]))); | |
89 | fRec1[0] = ((fConst3 * (0 - ((1.0 / ((fRec2[0] * (0.270546 + (fRec2[0] * ((fRec2[0] * (3.64419 + (fRec2[0] * ((2.85511 * fRec2[0]) - 5.20364)))) - 0.86331)))) - 0.814203)) + 0.933975))) + (0.993 * fRec1[1])); | |
90 | double fTemp1 = (1973.48 - (1000 / ((fRec2[0] * (1.9841 + (fRec2[0] * (5.76598 + (fRec2[0] * ((fRec2[0] * (49.9836 + (fRec2[0] * ((12.499 * fRec2[0]) - 40.3658)))) - 28.3434)))))) - 1.6086))); | |
91 | double fTemp2 = (1 - (fConst4 * (fTemp1 / (21.9737 + (fRec2[0] * ((fRec2[0] * (42.2734 + (fRec2[0] * ((fRec2[0] * (115.375 - (52.3051 * fRec2[0]))) - 99.7712)))) - 24.555)))))); | |
92 | fRec3[0] = ((0.007000000000000006 * (cos((fConst5 * fTemp1)) * (0 - (2.0 * fTemp2)))) + (0.993 * fRec3[1])); | |
93 | fRec4[0] = ((0.007000000000000006 * faustpower<2>(fTemp2)) + (0.993 * fRec4[1])); | |
94 | fRec0[0] = (0 - (((fRec0[1] * (fRec3[0] - fConst6)) + ((fConst6 * ((0 - fRec4[0]) * fRec0[3])) + (fRec0[2] * (fRec4[0] - (fConst6 * fRec3[0]))))) - ((double)input0[i] * fRec1[0]))); | |
95 | output0[i] = (float)((fConst13 * fRec0[1]) + ((fConst12 * fRec0[2]) + (fRec0[0] + (fConst11 * fRec0[3])))); | |
96 | // post processing | |
97 | for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1]; | |
98 | fRec4[1] = fRec4[0]; | |
99 | fRec3[1] = fRec3[0]; | |
100 | fRec1[1] = fRec1[0]; | |
101 | fRec2[1] = fRec2[0]; | |
102 | } | |
103 | } | |
104 | ||
105 | ////////////////////////////////////////////////////////////////////// | |
106 | ||
107 | class dunwah { | |
108 | private: | |
109 | uint32_t fSamplingFreq; | |
110 | float *fslider0_; | |
111 | float fslider0; | |
112 | int32_t iConst0; | |
113 | double fConst1; | |
114 | double fRec1[2]; | |
115 | double fConst2; | |
116 | double fConst3; | |
117 | double fRec2[2]; | |
118 | double fConst4; | |
119 | double fRec3[2]; | |
120 | double fRec0[4]; | |
121 | double fConst5; | |
122 | double fConst6; | |
123 | double fConst7; | |
124 | double fConst8; | |
125 | double fConst9; | |
126 | double fConst10; | |
127 | double fConst11; | |
128 | public: | |
129 | void clear_state_fd(); | |
130 | void init_d(uint32_t samplingFreq); | |
131 | void run_d(uint32_t count, float *input0, float *output0); | |
132 | void connect_d(uint32_t port,void* data); | |
133 | dunwah(); | |
134 | ~dunwah(); | |
135 | }; | |
136 | ||
137 | dunwah::dunwah() { | |
138 | } | |
139 | ||
140 | dunwah::~dunwah() { | |
141 | } | |
142 | ||
143 | inline void dunwah::clear_state_fd() | |
144 | { | |
145 | for (int32_t i=0; i<2; i++) fRec1[i] = 0; | |
146 | for (int32_t i=0; i<2; i++) fRec2[i] = 0; | |
147 | for (int32_t i=0; i<2; i++) fRec3[i] = 0; | |
148 | for (int32_t i=0; i<4; i++) fRec0[i] = 0; | |
149 | } | |
150 | ||
151 | void dunwah::connect_d(uint32_t port,void* data) | |
152 | { | |
153 | switch ((EffectPortIndex)port) | |
154 | { | |
155 | case WAH: | |
156 | fslider0_ = (float*)data; | |
157 | break; | |
158 | default: | |
159 | break; | |
160 | } | |
161 | } | |
162 | ||
163 | inline void dunwah::init_d(uint32_t samplingFreq) | |
164 | { | |
165 | fSamplingFreq = samplingFreq; | |
166 | iConst0 = min(192000, max(1, fSamplingFreq)); | |
167 | fConst1 = (0.007000000000000006 * ((iConst0 * (1.73888e-06 - (8.38823e-12 * iConst0))) - 0.193457)); | |
168 | fConst2 = (0.5 / iConst0); | |
169 | fConst3 = (1.0 / iConst0); | |
170 | fConst4 = exp((0 - (1236.9027460477864 / iConst0))); | |
171 | fConst5 = (1.77528e-06 - (8.52216e-12 * iConst0)); | |
172 | fConst6 = (0.879905 + (iConst0 * fConst5)); | |
173 | fConst7 = (1.54419e-05 - (6.43963e-11 * iConst0)); | |
174 | fConst8 = ((iConst0 * fConst7) - 0.386688); | |
175 | fConst9 = (fConst8 * (0 - (1.00038 * fConst6))); | |
176 | fConst10 = ((fConst8 * fConst6) + (1.00038 * (fConst8 + fConst6))); | |
177 | fConst11 = (0 - ((iConst0 * (fConst7 + fConst5)) + 1.4935970000000003)); | |
178 | clear_state_fd(); | |
179 | } | |
180 | ||
181 | inline void dunwah::run_d(uint32_t count, float *input0, float *output0) | |
182 | { | |
183 | fslider0 = (*fslider0_); | |
184 | double fSlow0 = fslider0; | |
185 | double fSlow1 = (fConst1 * (0 - ((1.0 / ((fSlow0 * (0.270546 + (fSlow0 * ((fSlow0 * (3.64419 + (fSlow0 * ((2.85511 * fSlow0) - 5.20364)))) - 0.86331)))) - 0.814203)) + 0.933975))); | |
186 | double fSlow2 = (1973.48 - (1000 / ((fSlow0 * (1.9841 + (fSlow0 * (5.76598 + (fSlow0 * ((fSlow0 * (49.9836 + (fSlow0 * ((12.499 * fSlow0) - 40.3658)))) - 28.3434)))))) - 1.6086))); | |
187 | double fSlow3 = (1 - (fConst2 * (fSlow2 / (21.9737 + (fSlow0 * ((fSlow0 * (42.2734 + (fSlow0 * ((fSlow0 * (115.375 - (52.3051 * fSlow0))) - 99.7712)))) - 24.555)))))); | |
188 | double fSlow4 = (0.007000000000000006 * (cos((fConst3 * fSlow2)) * (0 - (2.0 * fSlow3)))); | |
189 | double fSlow5 = (0.007000000000000006 * faustpower<2>(fSlow3)); | |
190 | for (uint32_t i=0; i<count; i++) { | |
191 | fRec1[0] = (fSlow1 + (0.993 * fRec1[1])); | |
192 | fRec2[0] = (fSlow4 + (0.993 * fRec2[1])); | |
193 | fRec3[0] = (fSlow5 + (0.993 * fRec3[1])); | |
194 | fRec0[0] = (0 - (((fRec0[1] * (fRec2[0] - fConst4)) + ((fConst4 * ((0 - fRec3[0]) * fRec0[3])) + (fRec0[2] * (fRec3[0] - (fConst4 * fRec2[0]))))) - ((double)input0[i] * fRec1[0]))); | |
195 | output0[i] = (float)((fConst11 * fRec0[1]) + ((fConst10 * fRec0[2]) + (fRec0[0] + (fConst9 * fRec0[3])))); | |
196 | // post processing | |
197 | for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1]; | |
198 | fRec3[1] = fRec3[0]; | |
199 | fRec2[1] = fRec2[0]; | |
200 | fRec1[1] = fRec1[0]; | |
201 | } | |
202 | } | |
203 | ||
204 | class crybaby: public dunwahauto, public dunwah | |
205 | { | |
206 | public: | |
207 | crybaby(){}; | |
208 | ~crybaby(){}; | |
209 | }; |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #include <cstdlib> | |
20 | #include <cmath> | |
21 | #include <iostream> | |
22 | #include <cstring> | |
23 | #include <unistd.h> | |
24 | ||
25 | #ifdef __SSE__ | |
26 | /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero) | |
27 | flags to avoid costly denormals */ | |
28 | #ifdef __SSE3__ | |
29 | #include <pmmintrin.h> | |
30 | inline void AVOIDDENORMALS() | |
31 | { | |
32 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | |
33 | _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); | |
34 | } | |
35 | #else | |
36 | #include <xmmintrin.h> | |
37 | inline void AVOIDDENORMALS() | |
38 | { | |
39 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | |
40 | } | |
41 | #endif //__SSE3__ | |
42 | ||
43 | #else | |
44 | inline void AVOIDDENORMALS() {} | |
45 | #endif //__SSE__ | |
46 | ||
47 | #define max(x, y) (((x) > (y)) ? (x) : (y)) | |
48 | #define min(x, y) (((x) < (y)) ? (x) : (y)) | |
49 | template <int32_t N> inline float faustpower(float x) | |
50 | { | |
51 | return powf(x, N); | |
52 | } | |
53 | template <int32_t N> inline double faustpower(double x) | |
54 | { | |
55 | return pow(x, N); | |
56 | } | |
57 | template <int32_t N> inline int32_t faustpower(int32_t x) | |
58 | { | |
59 | return faustpower<N/2>(x) * faustpower<N-N/2>(x); | |
60 | } | |
61 | template <> inline int32_t faustpower<0>(int32_t x) | |
62 | { | |
63 | return 1; | |
64 | } | |
65 | template <> inline int32_t faustpower<1>(int32_t x) | |
66 | { | |
67 | return x; | |
68 | } | |
69 | ||
70 | #include "gxautowah.h" | |
71 | #include "dunwahauto.cc" | |
72 | ||
73 | // define run pointer typs | |
74 | typedef void (crybaby::*run_crybaby) | |
75 | (uint32_t count,float* input, float* output); | |
76 | ||
77 | ////////////////////////////// MONO //////////////////////////////////// | |
78 | ||
79 | class Gxautowah | |
80 | { | |
81 | private: | |
82 | // internal stuff | |
83 | float* output; | |
84 | float* input; | |
85 | crybaby wah; | |
86 | run_crybaby _wah; | |
87 | bool a_w; | |
88 | //dunwahauto wah; | |
89 | public: | |
90 | void activate_f(); | |
91 | inline void run_dsp_mono(uint32_t n_samples); | |
92 | void connect_mono(uint32_t port,void* data); | |
93 | inline void init_dsp_mono(uint32_t rate, const LV2_Descriptor* descriptor); | |
94 | inline void connect_all_mono_ports(uint32_t port, void* data); | |
95 | // constructor | |
96 | Gxautowah() : | |
97 | output(NULL), | |
98 | input(NULL), | |
99 | wah(crybaby()), | |
100 | _wah(NULL), | |
101 | a_w(true) | |
102 | { | |
103 | }; | |
104 | // destructor | |
105 | ~Gxautowah() | |
106 | { | |
107 | }; | |
108 | }; | |
109 | ||
110 | // plugin stuff | |
111 | ||
112 | void Gxautowah::init_dsp_mono(uint32_t rate, const LV2_Descriptor* descriptor) | |
113 | { | |
114 | AVOIDDENORMALS(); | |
115 | if (strcmp("http://guitarix.sourceforge.net/plugins/gxautowah#autowah",descriptor->URI)== 0) | |
116 | { | |
117 | _wah = &crybaby::run; | |
118 | wah.init(rate); | |
119 | a_w = true; | |
120 | } | |
121 | else if (strcmp("http://guitarix.sourceforge.net/plugins/gxautowah#wah",descriptor->URI)== 0) | |
122 | { | |
123 | _wah = &crybaby::run_d; | |
124 | wah.init_d(rate); | |
125 | a_w = false; | |
126 | } | |
127 | else | |
128 | { | |
129 | _wah = &crybaby::run; | |
130 | wah.init(rate); | |
131 | a_w = true; | |
132 | } | |
133 | } | |
134 | ||
135 | void Gxautowah::connect_mono(uint32_t port,void* data) | |
136 | { | |
137 | switch ((EffectPortIndex)port) | |
138 | { | |
139 | case AUTOWAH_OUTPUT: | |
140 | output = static_cast<float*>(data); | |
141 | break; | |
142 | case AUTOWAH_INPUT: | |
143 | input = static_cast<float*>(data); | |
144 | break; | |
145 | default: | |
146 | break; | |
147 | } | |
148 | } | |
149 | ||
150 | void Gxautowah::activate_f() | |
151 | { | |
152 | if(a_w) wah.clear_state_f(); | |
153 | else wah.clear_state_fd(); | |
154 | } | |
155 | ||
156 | void Gxautowah::run_dsp_mono(uint32_t n_samples) | |
157 | { | |
158 | // run dsp | |
159 | (&wah->*_wah)(n_samples, input, output); | |
160 | } | |
161 | ||
162 | void Gxautowah::connect_all_mono_ports(uint32_t port, void* data) | |
163 | { | |
164 | connect_mono(port,data); | |
165 | if (!a_w) wah.connect_d(port,data); | |
166 | } | |
167 | ||
168 | ///////////////////////////// LV2 defines ////////////////////////////// | |
169 | ||
170 | static LV2_Handle | |
171 | instantiate(const LV2_Descriptor* descriptor, | |
172 | double rate, | |
173 | const char* bundle_path, | |
174 | const LV2_Feature* const* features) | |
175 | { | |
176 | ||
177 | Gxautowah *self = new Gxautowah(); | |
178 | if (!self) | |
179 | { | |
180 | return NULL; | |
181 | } | |
182 | ||
183 | self->init_dsp_mono((uint32_t)rate, descriptor); | |
184 | ||
185 | return (LV2_Handle)self; | |
186 | } | |
187 | ||
188 | static void | |
189 | connect_port(LV2_Handle instance, | |
190 | uint32_t port, | |
191 | void* data) | |
192 | { | |
193 | Gxautowah* self = (Gxautowah*)instance; | |
194 | self->connect_all_mono_ports(port, data); | |
195 | } | |
196 | ||
197 | static void | |
198 | run(LV2_Handle instance, uint32_t n_samples) | |
199 | { | |
200 | Gxautowah* self = (Gxautowah*)instance; | |
201 | self->run_dsp_mono(n_samples); | |
202 | } | |
203 | ||
204 | static void | |
205 | activate(LV2_Handle instance) | |
206 | { | |
207 | Gxautowah* self = (Gxautowah*)instance; | |
208 | self->activate_f(); | |
209 | } | |
210 | ||
211 | static void | |
212 | cleanup(LV2_Handle instance) | |
213 | { | |
214 | Gxautowah* self = (Gxautowah*)instance; | |
215 | delete self; | |
216 | } | |
217 | ||
218 | ////////////////////////////////////////////////////////////////// | |
219 | ||
220 | static const LV2_Descriptor descriptor = | |
221 | { | |
222 | GXPLUGIN_URI "#autowah", | |
223 | instantiate, | |
224 | connect_port, | |
225 | activate, | |
226 | run, | |
227 | NULL, | |
228 | cleanup, | |
229 | NULL | |
230 | }; | |
231 | ||
232 | static const LV2_Descriptor descriptor1 = | |
233 | { | |
234 | GXPLUGIN_URI "#wah", | |
235 | instantiate, | |
236 | connect_port, | |
237 | activate, | |
238 | run, | |
239 | NULL, | |
240 | cleanup, | |
241 | NULL | |
242 | }; | |
243 | ||
244 | extern "C" | |
245 | LV2_SYMBOL_EXPORT | |
246 | const LV2_Descriptor* | |
247 | lv2_descriptor(uint32_t index) | |
248 | { | |
249 | switch (index) | |
250 | { | |
251 | case 0: | |
252 | return &descriptor; | |
253 | case 1: | |
254 | return &descriptor1; | |
255 | default: | |
256 | return NULL; | |
257 | } | |
258 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #pragma once | |
20 | ||
21 | #ifndef SRC_HEADERS_GXAUTOWAH_H_ | |
22 | #define SRC_HEADERS_GXAUTOWAH_H_ | |
23 | ||
24 | #include <lv2.h> | |
25 | ||
26 | #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxautowah" | |
27 | #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxautowah#gui" | |
28 | ||
29 | ||
30 | typedef enum | |
31 | { | |
32 | AUTOWAH_OUTPUT, | |
33 | AUTOWAH_INPUT, | |
34 | WAH, | |
35 | } EffectPortIndex; | |
36 | ||
37 | #endif //SRC_HEADERS_GXAUTOWAH_H_ |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | ||
20 | @prefix doap: <http://usefulinc.com/ns/doap#> . | |
21 | @prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
22 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
23 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
24 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
25 | @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>. | |
26 | ||
27 | <http://guitarix.sourceforge.net#me> | |
28 | a foaf:Person ; | |
29 | foaf:name "Hermann Meyer" ; | |
30 | foaf:mbox <mailto:brummer@web.de> ; | |
31 | rdfs:seeAlso <http://guitarix.sourceforge.net> . | |
32 | ||
33 | <http://guitarix.sourceforge.net/plugins/gxautowah> | |
34 | a doap:Project ; | |
35 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
36 | doap:name "GxAutoWah" . | |
37 | ||
38 | <http://guitarix.sourceforge.net/plugins/gxautowah#autowah> | |
39 | a lv2:Plugin , | |
40 | lv2:EffectPlugin ; | |
41 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
42 | doap:name "GxAutoWah"; | |
43 | doap:license <http://opensource.org/licenses/isc> ; | |
44 | lv2:project <http://guitarix.sourceforge.net/plugins/gxautowah> ; | |
45 | lv2:optionalFeature lv2:hardRTCapable ; | |
46 | ||
47 | guiext:ui <http://guitarix.sourceforge.net/plugins/gxautowah#gui>; | |
48 | ||
49 | lv2:port [ | |
50 | a lv2:AudioPort , | |
51 | lv2:OutputPort ; | |
52 | lv2:index 0 ; | |
53 | lv2:symbol "out" ; | |
54 | lv2:name "Out" | |
55 | ] , [ | |
56 | a lv2:AudioPort , | |
57 | lv2:InputPort ; | |
58 | lv2:index 1 ; | |
59 | lv2:symbol "in" ; | |
60 | lv2:name "in" | |
61 | ]. | |
62 | ||
63 | <http://guitarix.sourceforge.net/plugins/gxautowah#wah> | |
64 | a lv2:Plugin , | |
65 | lv2:EffectPlugin ; | |
66 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
67 | doap:name "GxWah"; | |
68 | doap:license <http://opensource.org/licenses/isc> ; | |
69 | lv2:project <http://guitarix.sourceforge.net/plugins/gxautowah> ; | |
70 | lv2:optionalFeature lv2:hardRTCapable ; | |
71 | ||
72 | guiext:ui <http://guitarix.sourceforge.net/plugins/gxautowah#gui>; | |
73 | ||
74 | lv2:port [ | |
75 | a lv2:AudioPort , | |
76 | lv2:OutputPort ; | |
77 | lv2:index 0 ; | |
78 | lv2:symbol "out" ; | |
79 | lv2:name "Out" | |
80 | ] , [ | |
81 | a lv2:AudioPort , | |
82 | lv2:InputPort ; | |
83 | lv2:index 1 ; | |
84 | lv2:symbol "in" ; | |
85 | lv2:name "in" | |
86 | ] , [ | |
87 | a lv2:InputPort , | |
88 | lv2:ControlPort ; | |
89 | lv2:index 2 ; | |
90 | lv2:symbol "fslider1_" ; | |
91 | lv2:name "Wah"; | |
92 | lv2:default 0.0 ; | |
93 | lv2:minimum 0.0 ; | |
94 | lv2:maximum 1.0 ; | |
95 | ]. | |
96 | ||
97 | <http://guitarix.sourceforge.net/plugins/gxautowah#gui> | |
98 | a guiext:GtkUI; | |
99 | guiext:binary <gxautowah_gui.so>; | |
100 | guiext:requiredFeature guiext:makeResident . | |
101 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | #include <string> | |
21 | #include <iostream> | |
22 | ||
23 | #include <gtkmm.h> | |
24 | #include "gxautowah.h" | |
25 | #include "widget.h" | |
26 | ||
27 | ||
28 | #include <lv2.h> | |
29 | #include <lv2/lv2plug.in/ns/extensions/ui/ui.h> | |
30 | ||
31 | using namespace std; | |
32 | ||
33 | class GxautowahGUI | |
34 | { | |
35 | private: | |
36 | Glib::ustring plugskin; | |
37 | Glib::ustring addKnob; | |
38 | Glib::ustring plug_name; | |
39 | void set_knob(Glib::ustring knob); | |
40 | void set_skin(); | |
41 | void set_plug_name(const char * plugin_uri); | |
42 | GtkWidget* make_gui(); | |
43 | public: | |
44 | ||
45 | Widget* widget; | |
46 | static void set_plug_name_static(GxautowahGUI *self, const char * plugin_uri) | |
47 | { | |
48 | self->set_plug_name(plugin_uri); | |
49 | } | |
50 | static GtkWidget* make_gui_static(GxautowahGUI *self) | |
51 | { | |
52 | return self->make_gui(); | |
53 | } | |
54 | ||
55 | GxautowahGUI () {}; | |
56 | ~GxautowahGUI () {}; | |
57 | } ; | |
58 | ||
59 | void GxautowahGUI::set_knob( Glib::ustring knob) | |
60 | { | |
61 | addKnob = " style 'gx_"; | |
62 | addKnob += plug_name; | |
63 | addKnob += "_dark_skin_icons'\n" | |
64 | " { \n" | |
65 | " stock['bigknob'] = {{'"; | |
66 | addKnob += knob; | |
67 | addKnob += ".png'}}\n" | |
68 | " stock['smallknob'] = {{'"; | |
69 | addKnob += knob; | |
70 | addKnob += ".png'}}\n" | |
71 | " stock['smallknobr'] = {{'"; | |
72 | addKnob += knob; | |
73 | addKnob += ".png'}}\n"; | |
74 | addKnob += "GxKnob::framecount = 18\n" | |
75 | " }\n" | |
76 | "widget '*."; | |
77 | addKnob += plug_name; | |
78 | addKnob += "' style 'gx_"; | |
79 | addKnob += plug_name; | |
80 | addKnob += "_dark_skin_icons' "; | |
81 | } | |
82 | ||
83 | void GxautowahGUI::set_skin() | |
84 | { | |
85 | Glib::ustring toparse = "pixmap_path "; | |
86 | toparse += " '"; | |
87 | toparse += GX_LV2_STYLE_DIR; | |
88 | toparse += "/'\n"; | |
89 | toparse += "style \"gx_"; | |
90 | toparse += plug_name; | |
91 | toparse += "_dark-paintbox\"\n" | |
92 | " { \n" | |
93 | "GxPaintBox::skin-gradient = {\n" | |
94 | "{ 65536, 0, 0, 13107, 52428 }, \n" | |
95 | "{ 52428, 0, 0, 0, 52428 },\n" | |
96 | "{ 13107, 0, 0, 13107, 13107 }}\n" | |
97 | " GxPaintBox::icon-set =7\n" | |
98 | " stock['amp_skin'] = {{'"; | |
99 | toparse += plugskin; | |
100 | toparse += "'}}\n" | |
101 | " }\n" | |
102 | "\n" | |
103 | "style 'gx_head_boost_box' \n" | |
104 | " { \n" | |
105 | " fg[NORMAL] = '#838383' \n" | |
106 | " }\n"; | |
107 | toparse += addKnob; | |
108 | ||
109 | toparse += " widget '*.amplabel' style:highest 'gx_head_boost_box'\n" | |
110 | "widget '*."; | |
111 | toparse += plug_name; | |
112 | toparse += "' style 'gx_"; | |
113 | toparse += plug_name; | |
114 | toparse += "_dark-paintbox' "; | |
115 | ||
116 | gtk_rc_parse_string (toparse.c_str()); | |
117 | } | |
118 | ||
119 | void GxautowahGUI::set_plug_name( const char * plugin_uri) | |
120 | { | |
121 | addKnob = ""; | |
122 | ||
123 | if (strcmp("http://guitarix.sourceforge.net/plugins/gxautowah#autowah", plugin_uri) == 0) | |
124 | { | |
125 | plugskin = "autowah.png"; | |
126 | plug_name = "autowah"; | |
127 | } | |
128 | else if (strcmp("http://guitarix.sourceforge.net/plugins/gxautowah#wah", plugin_uri) == 0) | |
129 | { | |
130 | plugskin = "wah.png"; | |
131 | plug_name = "wah"; | |
132 | set_knob("wah-pedal"); | |
133 | } | |
134 | else | |
135 | { | |
136 | plugskin = "autowah.png"; | |
137 | plug_name = "autowah"; | |
138 | //set_knob("autowah-knob"); | |
139 | } | |
140 | } | |
141 | ||
142 | GtkWidget* GxautowahGUI::make_gui() | |
143 | { | |
144 | // init the gxwmm library | |
145 | Gxw::init(); | |
146 | set_skin(); | |
147 | GtkWidget* container = gtk_vbox_new(FALSE, 2); | |
148 | widget = new Widget(plug_name); | |
149 | GtkWidget* cWidget = (GtkWidget*)widget->gobj(); | |
150 | gtk_container_add( (GtkContainer*)container, cWidget ); | |
151 | ||
152 | return container; | |
153 | } | |
154 | ||
155 | ||
156 | static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor, | |
157 | const char * plugin_uri, | |
158 | const char * bundle_path, | |
159 | LV2UI_Write_Function write_function, | |
160 | LV2UI_Controller controller, | |
161 | LV2UI_Widget * widget, | |
162 | const LV2_Feature * const * features) | |
163 | { | |
164 | GxautowahGUI* self = new GxautowahGUI(); | |
165 | if (self == NULL) return NULL; | |
166 | self->set_plug_name_static(self, plugin_uri); | |
167 | *widget = (LV2UI_Widget)self->make_gui_static(self); | |
168 | self->widget->controller = controller; | |
169 | self->widget->write_function = write_function; | |
170 | return (LV2UI_Handle)self; | |
171 | } | |
172 | ||
173 | static void cleanup(LV2UI_Handle ui) | |
174 | { | |
175 | GxautowahGUI *pluginGui = (GxautowahGUI *) ui; | |
176 | delete pluginGui->widget; | |
177 | delete pluginGui; | |
178 | } | |
179 | ||
180 | static void port_event(LV2UI_Handle ui, | |
181 | uint32_t port_index, | |
182 | uint32_t buffer_size, | |
183 | uint32_t format, | |
184 | const void * buffer) | |
185 | { | |
186 | GxautowahGUI *self = (GxautowahGUI *) ui; | |
187 | self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget); | |
188 | return; | |
189 | } | |
190 | ||
191 | static LV2UI_Descriptor descriptors[] = | |
192 | { | |
193 | {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL} | |
194 | }; | |
195 | ||
196 | const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index) | |
197 | { | |
198 | //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index); | |
199 | if (index >= sizeof(descriptors) / sizeof(descriptors[0])) | |
200 | { | |
201 | return NULL; | |
202 | } | |
203 | return descriptors + index; | |
204 | } | |
205 |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
20 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
21 | ||
22 | <http://guitarix.sourceforge.net/plugins/gxautowah#autowah> | |
23 | a lv2:Plugin ; | |
24 | lv2:binary <gxautowah.so> ; | |
25 | rdfs:seeAlso <gxautowah.ttl> . | |
26 | ||
27 | <http://guitarix.sourceforge.net/plugins/gxautowah#wah> | |
28 | a lv2:Plugin ; | |
29 | lv2:binary <gxautowah.so> ; | |
30 | rdfs:seeAlso <gxautowah.ttl> . |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
20 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
21 | ||
22 | <http://guitarix.sourceforge.net/plugins/gxautowah#autowah> | |
23 | a lv2:Plugin ; | |
24 | lv2:binary <gxautowah@LIB_EXT@> ; | |
25 | rdfs:seeAlso <gxautowah.ttl> . | |
26 | ||
27 | <http://guitarix.sourceforge.net/plugins/gxautowah#wah> | |
28 | a lv2:Plugin ; | |
29 | lv2:binary <gxautowah@LIB_EXT@> ; | |
30 | rdfs:seeAlso <gxautowah.ttl> . |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | #include "widget.h" | |
21 | ||
22 | Widget::Widget(Glib::ustring plug_name) | |
23 | { | |
24 | // set propertys for the main paintbox holding the skin | |
25 | m_paintbox.set_name(plug_name); | |
26 | m_paintbox.property_paint_func() = "amp_skin_expose"; | |
27 | add(m_paintbox); | |
28 | if(strcmp("wah",plug_name.c_str()) == 0) | |
29 | { | |
30 | make_controller_box(&m_vbox, &m_bigknob, "wah", 0, 1, 0.01, wah, plug_name); | |
31 | m_bigknob.signal_value_changed().connect(sigc::mem_fun(*this, | |
32 | &Widget::on_knob_value_changed)); | |
33 | ||
34 | m_paintbox.pack_start(m_vbox); | |
35 | set_size_request(225,157); | |
36 | } | |
37 | else | |
38 | { | |
39 | set_size_request(175,100); | |
40 | } | |
41 | set_app_paintable(true); | |
42 | show_all(); | |
43 | } | |
44 | ||
45 | Widget::~Widget() | |
46 | { | |
47 | ||
48 | } | |
49 | ||
50 | // create stackboxes with controllers from gxw | |
51 | void Widget::make_controller_box(Gtk::VBox *box, | |
52 | Gxw::Regler *regler, | |
53 | Glib::ustring label, | |
54 | float min, float max, | |
55 | float digits, float value, | |
56 | Glib::ustring plug_name) | |
57 | { | |
58 | //Gtk::Label* pr = new Gtk::Label(label, 0); | |
59 | //pr->set_name("amplabel"); | |
60 | /*Glib::ustring label_image = GX_STYLE_DIR; | |
61 | label_image += "/"; | |
62 | label_image += label; | |
63 | label_image += "-label.png"; | |
64 | Gtk::Image *pr = new Gtk::Image(label_image);*/ | |
65 | ||
66 | //Gtk::VBox* b1 = new Gtk::VBox(); | |
67 | //box->set_border_width(5); | |
68 | //box->pack_start( *Gtk::manage(b1), Gtk::PACK_SHRINK); | |
69 | //box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK); | |
70 | regler->cp_configure("KNOB", label, min, max, digits); | |
71 | regler->set_show_value(false); | |
72 | regler->cp_set_value(value); | |
73 | regler->set_name(plug_name); | |
74 | box->pack_start(*regler,Gtk::PACK_SHRINK); | |
75 | Gtk::VBox* b2 = new Gtk::VBox(); | |
76 | box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING); | |
77 | } | |
78 | ||
79 | // receive controller value changes from host | |
80 | void Widget::set_value(uint32_t port_index, | |
81 | uint32_t format, | |
82 | const void * buffer) | |
83 | { | |
84 | if ( format == 0 ) | |
85 | { | |
86 | float value = *(float *)buffer; | |
87 | switch ((EffectPortIndex)port_index ) | |
88 | { | |
89 | case WAH: | |
90 | wah = value; | |
91 | m_bigknob.cp_set_value(wah); | |
92 | break; | |
93 | default: | |
94 | break; | |
95 | } | |
96 | } | |
97 | } | |
98 | // write value changes to the host->engine | |
99 | void Widget::on_knob_value_changed() | |
100 | { | |
101 | wah = m_bigknob.get_value(); | |
102 | //std::cout << "mastergain = " << mastergain << std::endl; | |
103 | write_function(controller, (EffectPortIndex)WAH, | |
104 | sizeof(float), 0, (const void*)&wah); | |
105 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #pragma once | |
20 | ||
21 | #ifndef SRC_HEADERS_WIDGET_H_ | |
22 | #define SRC_HEADERS_WIDGET_H_ | |
23 | ||
24 | #include <gtkmm.h> | |
25 | #include <gxwmm.h> | |
26 | #include "gxautowah.h" | |
27 | #include "../config.h" // for GX_STYLE_DIR | |
28 | // LV2UI stuff | |
29 | #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" | |
30 | ||
31 | class Widget : public Gtk::HBox | |
32 | { | |
33 | private: | |
34 | float wah; | |
35 | void set_value(uint32_t port_index, | |
36 | uint32_t format, | |
37 | const void * buffer); | |
38 | ||
39 | void make_controller_box(Gtk::VBox *box, | |
40 | Gxw::Regler *regler, | |
41 | Glib::ustring label, | |
42 | float min, float max, | |
43 | float digits, float value, | |
44 | Glib::ustring plug_name); | |
45 | public: | |
46 | // public Lv2 communication stuff | |
47 | LV2UI_Controller controller; | |
48 | LV2UI_Write_Function write_function; | |
49 | static void set_value_static(uint32_t port_index, | |
50 | uint32_t buffer_size, | |
51 | uint32_t format, | |
52 | const void * buffer, Widget *self) | |
53 | { | |
54 | self->set_value(port_index,format,buffer); | |
55 | } | |
56 | ||
57 | Widget(Glib::ustring plug_name); | |
58 | ~Widget(); | |
59 | ||
60 | protected: | |
61 | Gxw::PaintBox m_paintbox; | |
62 | Gxw::BigKnob m_bigknob; | |
63 | Gtk::VBox m_vbox; | |
64 | ||
65 | void on_knob_value_changed(); | |
66 | }; | |
67 | ||
68 | #endif //SRC_HEADERS_WIDGET_H_ |
0 | #!/usr/bin/env python | |
1 | # encoding: utf-8 | |
2 | ||
3 | import sys, os, TaskGen, ctypes | |
4 | ||
5 | def configure(conf): | |
6 | pass | |
7 | ||
8 | def build(bld): | |
9 | bundle = 'gxautowah.lv2' | |
10 | ||
11 | src = ['gxautowah.cpp' | |
12 | ] | |
13 | incl = ['./'] | |
14 | lib = [] | |
15 | if sys.platform.startswith("linux"): | |
16 | lib.append('dl') | |
17 | uselib = ['LV2CORE'] | |
18 | cxxflag =[] | |
19 | if not bld.env['OPT'] and bld.env['SSE2']: | |
20 | cxxflag = [ "-msse2", "-mfpmath=sse"] | |
21 | lv2_effects = bld( | |
22 | features='cxx cshlib ', | |
23 | includes = incl, | |
24 | lib = lib, | |
25 | uselib = uselib, | |
26 | obj_ext = '_5.o', | |
27 | cxxflags = cxxflag, | |
28 | defines = ["LV2_SO"], | |
29 | target = 'gxautowah', | |
30 | source = src, | |
31 | install_path = '${LV2DIR}/%s' % bundle, | |
32 | chmod = 0o755, | |
33 | ) | |
34 | lv2_effects.env['shlib_PATTERN'] = '%s.so' | |
35 | ||
36 | uselib_local6 = [] | |
37 | libpath6 = [] | |
38 | lib6 = [] | |
39 | incl6 = ['../../../libgxwmm','../../../libgxw','../'] | |
40 | if sys.platform.startswith("linux"): | |
41 | lib6.append('dl') | |
42 | if bld.env["GX_LIB_SHARED"]: | |
43 | lib6 += ['gxwmm','gxw'] | |
44 | libpath6 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env), | |
45 | bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)] | |
46 | else: | |
47 | uselib_local6 += ['gxwmm','gxw'] | |
48 | ||
49 | lv2_effetcs_gui = bld( | |
50 | features='cxx cshlib ', | |
51 | includes = incl6, | |
52 | lib = lib6, | |
53 | uselib = 'LV2CORE GTKMM', | |
54 | libpath = libpath6, | |
55 | uselib_local = uselib_local6, | |
56 | linkflags = '-Wl,-z,nodelete', | |
57 | defines = ["LV2_GUI"], | |
58 | target = 'gxautowah_gui', | |
59 | source = 'widget.cpp gxautowah_gui.cpp', | |
60 | install_path = '${LV2DIR}/%s' % bundle, | |
61 | chmod = 0o755, | |
62 | ) | |
63 | lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so' | |
64 | ||
65 | ||
66 | install_path = '${LV2DIR}/%s' % bundle, | |
67 | bld.install_files('${LV2DIR}/gxautowah.lv2', 'manifest.ttl') | |
68 | bld.install_files('${LV2DIR}/gxautowah.lv2', 'gxautowah.ttl') | |
69 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | class BassBooster { | |
21 | private: | |
22 | uint32_t fSamplingFreq; | |
23 | double fConst0; | |
24 | double fConst1; | |
25 | double fConst2; | |
26 | double fConst3; | |
27 | double fConst4; | |
28 | double fRec0[3]; | |
29 | float *fslider1_; | |
30 | float fslider1; | |
31 | void clear_state_f(); | |
32 | void init(uint32_t samplingFreq); | |
33 | void run(uint32_t count, float *input0, float *output0); | |
34 | void connect(uint32_t port,void* data); | |
35 | ||
36 | public: | |
37 | static void init_static(uint32_t samplingFreq, BassBooster*); | |
38 | static void run_static(uint32_t count, float *input0, float *output0, BassBooster*); | |
39 | static void connect_static(uint32_t port,void* data, BassBooster *p); | |
40 | static void clear_state_static(BassBooster*); | |
41 | BassBooster(); | |
42 | ~BassBooster(); | |
43 | }; | |
44 | ||
45 | ||
46 | void BassBooster::connect(uint32_t port,void* data) | |
47 | { | |
48 | switch ((EffectPortIndex)port) | |
49 | { | |
50 | case B_LEVEL: | |
51 | fslider1_ = (float*)data; | |
52 | break; | |
53 | default: | |
54 | break; | |
55 | } | |
56 | } | |
57 | ||
58 | ||
59 | BassBooster::BassBooster() { | |
60 | } | |
61 | ||
62 | BassBooster::~BassBooster() { | |
63 | } | |
64 | ||
65 | inline void BassBooster::clear_state_f() | |
66 | { | |
67 | for (int32_t i=0; i<3; i++) fRec0[i] = 0; | |
68 | } | |
69 | ||
70 | inline void BassBooster::init(uint32_t samplingFreq) | |
71 | { | |
72 | fSamplingFreq = samplingFreq; | |
73 | fConst0 = tan((376.99111843077515 / min(192000, max(1, fSamplingFreq)))); | |
74 | fConst1 = faustpower<2>(fConst0); | |
75 | fConst2 = (2 * (fConst1 - 1)); | |
76 | fConst3 = (1 + (fConst0 * (fConst0 - 1.4142135623730951))); | |
77 | fConst4 = (1.0 / (1 + (fConst0 * (1.4142135623730951 + fConst0)))); | |
78 | clear_state_f(); | |
79 | } | |
80 | ||
81 | inline void BassBooster::run(uint32_t count, float *input0, float *output0) | |
82 | { | |
83 | fslider1 = (*fslider1_); | |
84 | double fSlow0 = pow(10,(0.05 * fslider1)); | |
85 | double fSlow1 = sqrt((2 * fSlow0)); | |
86 | double fSlow2 = (fConst0 * fSlow0); | |
87 | double fSlow3 = (1 + (fConst0 * (fSlow2 - fSlow1))); | |
88 | double fSlow4 = (2 * ((fConst1 * fSlow0) - 1)); | |
89 | double fSlow5 = (1 + (fConst0 * (fSlow2 + fSlow1))); | |
90 | for (uint32_t i=0; i<count; i++) { | |
91 | fRec0[0] = ((double)input0[i] - (fConst4 * ((fConst3 * fRec0[2]) + (fConst2 * fRec0[1])))); | |
92 | output0[i] = (float)(fConst4 * (((fSlow5 * fRec0[0]) + (fSlow4 * fRec0[1])) + (fSlow3 * fRec0[2]))); | |
93 | // post processing | |
94 | fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0]; | |
95 | } | |
96 | } | |
97 | ||
98 | void BassBooster::run_static(uint32_t count, float *input0, float *output0, BassBooster *p) | |
99 | { | |
100 | p->run(count, input0, output0); | |
101 | } | |
102 | ||
103 | void BassBooster::init_static(uint32_t samplingFreq, BassBooster *p) | |
104 | { | |
105 | p->init(samplingFreq); | |
106 | } | |
107 | ||
108 | void BassBooster::connect_static(uint32_t port,void* data, BassBooster *p) | |
109 | { | |
110 | p->connect(port, data); | |
111 | } | |
112 | ||
113 | void BassBooster::clear_state_static(BassBooster *p) | |
114 | { | |
115 | p->clear_state_f(); | |
116 | } | |
117 | ||
118 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #include <cstdlib> | |
20 | #include <cmath> | |
21 | #include <iostream> | |
22 | #include <cstring> | |
23 | #include <unistd.h> | |
24 | ||
25 | #ifdef __SSE__ | |
26 | /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero) | |
27 | flags to avoid costly denormals */ | |
28 | #ifdef __SSE3__ | |
29 | #include <pmmintrin.h> | |
30 | inline void AVOIDDENORMALS() | |
31 | { | |
32 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | |
33 | _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); | |
34 | } | |
35 | #else | |
36 | #include <xmmintrin.h> | |
37 | inline void AVOIDDENORMALS() | |
38 | { | |
39 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | |
40 | } | |
41 | #endif //__SSE3__ | |
42 | ||
43 | #else | |
44 | inline void AVOIDDENORMALS() {} | |
45 | #endif //__SSE__ | |
46 | ||
47 | #define max(x, y) (((x) > (y)) ? (x) : (y)) | |
48 | #define min(x, y) (((x) < (y)) ? (x) : (y)) | |
49 | template <int32_t N> inline float faustpower(float x) | |
50 | { | |
51 | return powf(x, N); | |
52 | } | |
53 | template <int32_t N> inline double faustpower(double x) | |
54 | { | |
55 | return pow(x, N); | |
56 | } | |
57 | template <int32_t N> inline int32_t faustpower(int32_t x) | |
58 | { | |
59 | return faustpower<N/2>(x) * faustpower<N-N/2>(x); | |
60 | } | |
61 | template <> inline int32_t faustpower<0>(int32_t x) | |
62 | { | |
63 | return 1; | |
64 | } | |
65 | template <> inline int32_t faustpower<1>(int32_t x) | |
66 | { | |
67 | return x; | |
68 | } | |
69 | ||
70 | #include "gxbooster.h" | |
71 | #include "bassbooster.cc" | |
72 | #include "highbooster.cc" | |
73 | ||
74 | ////////////////////////////// MONO //////////////////////////////////// | |
75 | ||
76 | class Gxbooster | |
77 | { | |
78 | private: | |
79 | // internal stuff | |
80 | float* output; | |
81 | float* input; | |
82 | BassBooster bb; | |
83 | HighBooster hb; | |
84 | public: | |
85 | ||
86 | inline void run_dsp_mono(uint32_t n_samples); | |
87 | void connect_mono(uint32_t port,void* data); | |
88 | inline void init_dsp_mono(uint32_t rate); | |
89 | inline void connect_all_mono_ports(uint32_t port, void* data); | |
90 | void activate_f(); | |
91 | // constructor | |
92 | Gxbooster() : | |
93 | output(NULL), | |
94 | input(NULL), | |
95 | bb(BassBooster()), | |
96 | hb(HighBooster()) | |
97 | { | |
98 | }; | |
99 | // destructor | |
100 | ~Gxbooster() | |
101 | { | |
102 | }; | |
103 | }; | |
104 | ||
105 | // plugin stuff | |
106 | ||
107 | void Gxbooster::init_dsp_mono(uint32_t rate) | |
108 | { | |
109 | AVOIDDENORMALS(); | |
110 | bb.init_static(rate, &bb); | |
111 | hb.init_static(rate, &hb); | |
112 | } | |
113 | ||
114 | void Gxbooster::connect_mono(uint32_t port,void* data) | |
115 | { | |
116 | switch ((EffectPortIndex)port) | |
117 | { | |
118 | case EFFECTS_OUTPUT: | |
119 | output = static_cast<float*>(data); | |
120 | break; | |
121 | case EFFECTS_INPUT: | |
122 | input = static_cast<float*>(data); | |
123 | break; | |
124 | default: | |
125 | break; | |
126 | } | |
127 | } | |
128 | ||
129 | void Gxbooster::activate_f() | |
130 | { | |
131 | bb.clear_state_static(&bb); | |
132 | hb.clear_state_static(&hb); | |
133 | } | |
134 | ||
135 | void Gxbooster::run_dsp_mono(uint32_t n_samples) | |
136 | { | |
137 | // run dsp | |
138 | bb.run_static(n_samples, input, output, &bb); | |
139 | hb.run_static(n_samples, output, output, &hb); | |
140 | } | |
141 | ||
142 | void Gxbooster::connect_all_mono_ports(uint32_t port, void* data) | |
143 | { | |
144 | connect_mono(port,data); | |
145 | bb.connect_static(port,data, &bb); | |
146 | hb.connect_static(port,data, &hb); | |
147 | } | |
148 | ||
149 | ///////////////////////////// LV2 defines ////////////////////////////// | |
150 | ||
151 | static LV2_Handle | |
152 | instantiate(const LV2_Descriptor* descriptor, | |
153 | double rate, | |
154 | const char* bundle_path, | |
155 | const LV2_Feature* const* features) | |
156 | { | |
157 | ||
158 | Gxbooster *self = new Gxbooster(); | |
159 | if (!self) | |
160 | { | |
161 | return NULL; | |
162 | } | |
163 | ||
164 | self->init_dsp_mono((uint32_t)rate); | |
165 | ||
166 | return (LV2_Handle)self; | |
167 | } | |
168 | ||
169 | static void | |
170 | connect_port(LV2_Handle instance, | |
171 | uint32_t port, | |
172 | void* data) | |
173 | { | |
174 | Gxbooster* self = (Gxbooster*)instance; | |
175 | self->connect_all_mono_ports(port, data); | |
176 | } | |
177 | ||
178 | static void | |
179 | activate(LV2_Handle instance) | |
180 | { | |
181 | Gxbooster* self = (Gxbooster*)instance; | |
182 | self->activate_f(); | |
183 | } | |
184 | ||
185 | static void | |
186 | run(LV2_Handle instance, uint32_t n_samples) | |
187 | { | |
188 | Gxbooster* self = (Gxbooster*)instance; | |
189 | self->run_dsp_mono(n_samples); | |
190 | } | |
191 | ||
192 | static void | |
193 | cleanup(LV2_Handle instance) | |
194 | { | |
195 | Gxbooster* self = (Gxbooster*)instance; | |
196 | delete self; | |
197 | } | |
198 | ||
199 | ////////////////////////////////////////////////////////////////// | |
200 | ||
201 | static const LV2_Descriptor descriptor = | |
202 | { | |
203 | GXPLUGIN_URI "#booster", | |
204 | instantiate, | |
205 | connect_port, | |
206 | activate, | |
207 | run, | |
208 | NULL, | |
209 | cleanup, | |
210 | NULL | |
211 | }; | |
212 | ||
213 | extern "C" | |
214 | LV2_SYMBOL_EXPORT | |
215 | const LV2_Descriptor* | |
216 | lv2_descriptor(uint32_t index) | |
217 | { | |
218 | switch (index) | |
219 | { | |
220 | case 0: | |
221 | return &descriptor; | |
222 | default: | |
223 | return NULL; | |
224 | } | |
225 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #pragma once | |
20 | ||
21 | #ifndef SRC_HEADERS_GXEFFECTS_H_ | |
22 | #define SRC_HEADERS_GXEFFECTS_H_ | |
23 | ||
24 | #include <lv2.h> | |
25 | ||
26 | #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxbooster" | |
27 | #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxbooster#gui" | |
28 | ||
29 | ||
30 | typedef enum | |
31 | { | |
32 | T_LEVEL, | |
33 | B_LEVEL, | |
34 | EFFECTS_OUTPUT, | |
35 | EFFECTS_INPUT, | |
36 | } EffectPortIndex; | |
37 | ||
38 | #endif //SRC_HEADERS_GXEFFECTS_H_ |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | ||
20 | @prefix doap: <http://usefulinc.com/ns/doap#> . | |
21 | @prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
22 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
23 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
24 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
25 | @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>. | |
26 | ||
27 | <http://guitarix.sourceforge.net#me> | |
28 | a foaf:Person ; | |
29 | foaf:name "Hermann Meyer" ; | |
30 | foaf:mbox <mailto:brummer@web.de> ; | |
31 | rdfs:seeAlso <http://guitarix.sourceforge.net> . | |
32 | ||
33 | <http://guitarix.sourceforge.net/plugins/gxbooster> | |
34 | a doap:Project ; | |
35 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
36 | doap:name "Gxbooster" . | |
37 | ||
38 | <http://guitarix.sourceforge.net/plugins/gxbooster#booster> | |
39 | a lv2:Plugin , | |
40 | lv2:EffectPlugin ; | |
41 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
42 | doap:name "GxBooster"; | |
43 | doap:license <http://opensource.org/licenses/isc> ; | |
44 | lv2:project <http://guitarix.sourceforge.net/plugins/gxbooster> ; | |
45 | lv2:optionalFeature lv2:hardRTCapable ; | |
46 | ||
47 | guiext:ui <http://guitarix.sourceforge.net/plugins/gxbooster#gui>; | |
48 | ||
49 | lv2:port [ | |
50 | a lv2:InputPort , | |
51 | lv2:ControlPort ; | |
52 | lv2:index 0 ; | |
53 | lv2:symbol "fslider0_" ; | |
54 | lv2:name "H Level"; | |
55 | lv2:default 1.0 ; | |
56 | lv2:minimum 0.5 ; | |
57 | lv2:maximum 20.0 ; | |
58 | ] , [ | |
59 | a lv2:InputPort , | |
60 | lv2:ControlPort ; | |
61 | lv2:index 1 ; | |
62 | lv2:symbol "fslider1_" ; | |
63 | lv2:name "B Level"; | |
64 | lv2:default 1.0 ; | |
65 | lv2:minimum 0.5 ; | |
66 | lv2:maximum 20.0 ; | |
67 | ] , [ | |
68 | a lv2:AudioPort , | |
69 | lv2:OutputPort ; | |
70 | lv2:index 2 ; | |
71 | lv2:symbol "out" ; | |
72 | lv2:name "Out" | |
73 | ] , [ | |
74 | a lv2:AudioPort , | |
75 | lv2:InputPort ; | |
76 | lv2:index 3 ; | |
77 | lv2:symbol "in" ; | |
78 | lv2:name "in" | |
79 | ]. | |
80 | ||
81 | <http://guitarix.sourceforge.net/plugins/gxbooster#gui> | |
82 | a guiext:GtkUI; | |
83 | guiext:binary <gxbooster_gui.so>; | |
84 | guiext:requiredFeature guiext:makeResident . | |
85 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | #include <string> | |
21 | #include <iostream> | |
22 | ||
23 | #include <gtkmm.h> | |
24 | #include "gxbooster.h" | |
25 | #include "widget.h" | |
26 | ||
27 | ||
28 | #include <lv2.h> | |
29 | #include <lv2/lv2plug.in/ns/extensions/ui/ui.h> | |
30 | ||
31 | using namespace std; | |
32 | ||
33 | class GxboosterGUI | |
34 | { | |
35 | private: | |
36 | Glib::ustring plugskin; | |
37 | Glib::ustring addKnob; | |
38 | Glib::ustring plug_name; | |
39 | void set_knob(Glib::ustring knob); | |
40 | void set_skin(); | |
41 | void set_plug_name(const char * plugin_uri); | |
42 | GtkWidget* make_gui(); | |
43 | public: | |
44 | ||
45 | Widget* widget; | |
46 | static void set_plug_name_static(GxboosterGUI *self, const char * plugin_uri) | |
47 | { | |
48 | self->set_plug_name(plugin_uri); | |
49 | } | |
50 | static GtkWidget* make_gui_static(GxboosterGUI *self) | |
51 | { | |
52 | return self->make_gui(); | |
53 | } | |
54 | ||
55 | GxboosterGUI () {}; | |
56 | ~GxboosterGUI () {}; | |
57 | } ; | |
58 | ||
59 | void GxboosterGUI::set_knob( Glib::ustring knob) | |
60 | { | |
61 | addKnob = " style 'gx_"; | |
62 | addKnob += plug_name; | |
63 | addKnob += "_dark_skin_icons'\n" | |
64 | " { \n" | |
65 | " stock['bigknob'] = {{'"; | |
66 | addKnob += knob; | |
67 | addKnob += ".png'}}\n" | |
68 | " stock['smallknob'] = {{'"; | |
69 | addKnob += knob; | |
70 | addKnob += ".png'}}\n" | |
71 | " stock['smallknobr'] = {{'"; | |
72 | addKnob += knob; | |
73 | addKnob += ".png'}}\n" | |
74 | " }\n" | |
75 | "widget '*."; | |
76 | addKnob += plug_name; | |
77 | addKnob += "' style 'gx_"; | |
78 | addKnob += plug_name; | |
79 | addKnob += "_dark_skin_icons' "; | |
80 | } | |
81 | ||
82 | void GxboosterGUI::set_skin() | |
83 | { | |
84 | Glib::ustring toparse = "pixmap_path "; | |
85 | toparse += " '"; | |
86 | toparse += GX_LV2_STYLE_DIR; | |
87 | toparse += "/'\n"; | |
88 | toparse += "style \"gx_"; | |
89 | toparse += plug_name; | |
90 | toparse += "_dark-paintbox\"\n" | |
91 | " { \n" | |
92 | "GxPaintBox::skin-gradient = {\n" | |
93 | "{ 65536, 0, 0, 13107, 52428 }, \n" | |
94 | "{ 52428, 0, 0, 0, 52428 },\n" | |
95 | "{ 13107, 0, 0, 13107, 13107 }}\n" | |
96 | " GxPaintBox::icon-set =7\n" | |
97 | " stock['amp_skin'] = {{'"; | |
98 | toparse += plugskin; | |
99 | toparse += "'}}\n" | |
100 | " }\n" | |
101 | "\n" | |
102 | "style 'gx_head_boost_box' \n" | |
103 | " { \n" | |
104 | " fg[NORMAL] = '#838383' \n" | |
105 | " }\n"; | |
106 | toparse += addKnob; | |
107 | ||
108 | toparse += " widget '*.amplabel' style:highest 'gx_head_boost_box'\n" | |
109 | "widget '*."; | |
110 | toparse += plug_name; | |
111 | toparse += "' style 'gx_"; | |
112 | toparse += plug_name; | |
113 | toparse += "_dark-paintbox' "; | |
114 | ||
115 | gtk_rc_parse_string (toparse.c_str()); | |
116 | } | |
117 | ||
118 | void GxboosterGUI::set_plug_name( const char * plugin_uri) | |
119 | { | |
120 | addKnob = ""; | |
121 | ||
122 | if (strcmp("http://guitarix.sourceforge.net/plugins/gxbooster#booster", plugin_uri) == 0) | |
123 | { | |
124 | plugskin = "booster.png"; | |
125 | plug_name = "booster"; | |
126 | set_knob("booster-knob"); | |
127 | } | |
128 | else | |
129 | { | |
130 | plugskin = "booster.png"; | |
131 | plug_name = "booster"; | |
132 | } | |
133 | } | |
134 | ||
135 | GtkWidget* GxboosterGUI::make_gui() | |
136 | { | |
137 | // init the gxwmm library | |
138 | Gxw::init(); | |
139 | set_skin(); | |
140 | GtkWidget* container = gtk_vbox_new(FALSE, 2); | |
141 | widget = new Widget(plug_name); | |
142 | GtkWidget* cWidget = (GtkWidget*)widget->gobj(); | |
143 | gtk_container_add( (GtkContainer*)container, cWidget ); | |
144 | ||
145 | return container; | |
146 | } | |
147 | ||
148 | ||
149 | static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor, | |
150 | const char * plugin_uri, | |
151 | const char * bundle_path, | |
152 | LV2UI_Write_Function write_function, | |
153 | LV2UI_Controller controller, | |
154 | LV2UI_Widget * widget, | |
155 | const LV2_Feature * const * features) | |
156 | { | |
157 | GxboosterGUI* self = new GxboosterGUI(); | |
158 | if (self == NULL) return NULL; | |
159 | self->set_plug_name_static(self, plugin_uri); | |
160 | *widget = (LV2UI_Widget)self->make_gui_static(self); | |
161 | self->widget->controller = controller; | |
162 | self->widget->write_function = write_function; | |
163 | return (LV2UI_Handle)self; | |
164 | } | |
165 | ||
166 | static void cleanup(LV2UI_Handle ui) | |
167 | { | |
168 | GxboosterGUI *pluginGui = (GxboosterGUI *) ui; | |
169 | delete pluginGui->widget; | |
170 | delete pluginGui; | |
171 | } | |
172 | ||
173 | static void port_event(LV2UI_Handle ui, | |
174 | uint32_t port_index, | |
175 | uint32_t buffer_size, | |
176 | uint32_t format, | |
177 | const void * buffer) | |
178 | { | |
179 | GxboosterGUI *self = (GxboosterGUI *) ui; | |
180 | self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget); | |
181 | return; | |
182 | } | |
183 | ||
184 | static LV2UI_Descriptor descriptors[] = | |
185 | { | |
186 | {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL} | |
187 | }; | |
188 | ||
189 | const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index) | |
190 | { | |
191 | //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index); | |
192 | if (index >= sizeof(descriptors) / sizeof(descriptors[0])) | |
193 | { | |
194 | return NULL; | |
195 | } | |
196 | return descriptors + index; | |
197 | } | |
198 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | class HighBooster { | |
21 | private: | |
22 | uint32_t fSamplingFreq; | |
23 | double fConst0; | |
24 | double fConst1; | |
25 | double fConst2; | |
26 | double fVec0[2]; | |
27 | double fConst3; | |
28 | double fConst4; | |
29 | double fRec0[2]; | |
30 | float *fslider0_; | |
31 | float fslider0; | |
32 | void clear_state_f(); | |
33 | void init(uint32_t samplingFreq); | |
34 | void run(uint32_t count, float *input0, float *output0); | |
35 | void connect(uint32_t port,void* data); | |
36 | public: | |
37 | ||
38 | static void init_static(uint32_t samplingFreq, HighBooster*); | |
39 | static void run_static(uint32_t count, float *input0, float *output0, HighBooster*); | |
40 | static void connect_static(uint32_t port,void* data, HighBooster *p); | |
41 | static void clear_state_static(HighBooster*); | |
42 | HighBooster(); | |
43 | ~HighBooster(); | |
44 | }; | |
45 | ||
46 | ||
47 | ||
48 | HighBooster::HighBooster() { | |
49 | } | |
50 | ||
51 | HighBooster::~HighBooster() { | |
52 | } | |
53 | ||
54 | void HighBooster::connect(uint32_t port,void* data) | |
55 | { | |
56 | switch ((EffectPortIndex)port) | |
57 | { | |
58 | case T_LEVEL: | |
59 | fslider0_ = (float*)data; | |
60 | break; | |
61 | default: | |
62 | break; | |
63 | } | |
64 | } | |
65 | ||
66 | inline void HighBooster::clear_state_f() | |
67 | { | |
68 | for (int32_t i=0; i<2; i++) fVec0[i] = 0; | |
69 | for (int32_t i=0; i<2; i++) fRec0[i] = 0; | |
70 | } | |
71 | ||
72 | inline void HighBooster::init(uint32_t samplingFreq) | |
73 | { | |
74 | fSamplingFreq = samplingFreq; | |
75 | fConst0 = (1.0 / tan((4712.38898038469 / min(192000, max(1, fSamplingFreq))))); | |
76 | fConst1 = (1 + fConst0); | |
77 | fConst2 = (0 - ((1 - fConst0) / fConst1)); | |
78 | fConst3 = (0 - fConst0); | |
79 | fConst4 = (1.0 / fConst1); | |
80 | clear_state_f(); | |
81 | } | |
82 | ||
83 | ||
84 | inline void HighBooster::run(uint32_t count, float *input0, float *output0) | |
85 | { | |
86 | fslider0 = (*fslider0_); | |
87 | double fSlow0 = (pow(10,(0.05 * fslider0)) - 1); | |
88 | for (uint32_t i=0; i<count; i++) { | |
89 | double fTemp0 = (double)input0[i]; | |
90 | fVec0[0] = fTemp0; | |
91 | fRec0[0] = ((fConst4 * ((fConst3 * fVec0[1]) + (fConst0 * fVec0[0]))) + (fConst2 * fRec0[1])); | |
92 | output0[i] = (float)(fVec0[0] + (fSlow0 * fRec0[0])); | |
93 | // post processing | |
94 | fRec0[1] = fRec0[0]; | |
95 | fVec0[1] = fVec0[0]; | |
96 | } | |
97 | } | |
98 | ||
99 | void HighBooster::run_static(uint32_t count, float *input0, float *output0, HighBooster *p) | |
100 | { | |
101 | p->run(count, input0, output0); | |
102 | } | |
103 | ||
104 | void HighBooster::init_static(uint32_t samplingFreq, HighBooster *p) | |
105 | { | |
106 | p->init(samplingFreq); | |
107 | } | |
108 | ||
109 | void HighBooster::connect_static(uint32_t port,void* data, HighBooster *p) | |
110 | { | |
111 | p->connect(port, data); | |
112 | } | |
113 | ||
114 | void HighBooster::clear_state_static(HighBooster *p) | |
115 | { | |
116 | p->clear_state_f(); | |
117 | } |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
20 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
21 | ||
22 | <http://guitarix.sourceforge.net/plugins/gxbooster#booster> | |
23 | a lv2:Plugin ; | |
24 | lv2:binary <gxbooster@LIB_EXT@> ; | |
25 | rdfs:seeAlso <gxbooster.ttl> . |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | #include "widget.h" | |
21 | ||
22 | #include <iostream> | |
23 | ||
24 | Widget::Widget(Glib::ustring plug_name) | |
25 | { | |
26 | // set propertys for the main paintbox holding the skin | |
27 | m_paintbox.set_border_width(10); | |
28 | m_paintbox.set_spacing(6); | |
29 | m_paintbox.set_homogeneous(false); | |
30 | m_paintbox.set_name(plug_name); | |
31 | m_paintbox.property_paint_func() = "amp_skin_expose"; | |
32 | add(m_paintbox); | |
33 | // box for the controllers | |
34 | m_hbox_.set_spacing(44); | |
35 | m_hbox_.set_border_width(24); | |
36 | m_hbox_.set_homogeneous(false); | |
37 | // set a vertical box in the paintbox | |
38 | m_paintbox.pack_start(m_vbox_); | |
39 | // and controller box on top | |
40 | m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK); | |
41 | ||
42 | // create all controllers | |
43 | make_controller_box(&m_vbox, &m_bigknob, "Treble", 0.5, 20, 0.5, treble, plug_name); | |
44 | m_bigknob.signal_value_changed().connect(sigc::mem_fun(*this, | |
45 | &Widget::on_knob_value_changed)); | |
46 | ||
47 | make_controller_box(&m_vbox1, &m_bigknob1, "Bass", 0.5, 20, 0.5, bass, plug_name); | |
48 | m_bigknob1.signal_value_changed().connect(sigc::mem_fun(*this, | |
49 | &Widget::on_knob1_value_changed)); | |
50 | ||
51 | ||
52 | // put boxed controllers into controller box | |
53 | m_hbox_.pack_start(m_vbox1); | |
54 | m_hbox_.pack_start(m_vbox); | |
55 | ||
56 | ||
57 | // connect expose handler as resize handler | |
58 | m_paintbox.signal_expose_event().connect( | |
59 | sigc::mem_fun(this, &Widget::_expose_event), true); | |
60 | ||
61 | set_app_paintable(true); | |
62 | show_all(); | |
63 | } | |
64 | ||
65 | Widget::~Widget() | |
66 | { | |
67 | ||
68 | } | |
69 | // create stackboxes with controllers from gxw | |
70 | void Widget::make_controller_box(Gtk::VBox *box, | |
71 | Gxw::Regler *regler, | |
72 | Glib::ustring label, | |
73 | float min, float max, | |
74 | float digits, float value, | |
75 | Glib::ustring plug_name) | |
76 | { | |
77 | Gtk::Label* pr = new Gtk::Label(label, 0); | |
78 | pr->set_name("amplabel"); | |
79 | /*Glib::ustring label_image = GX_STYLE_DIR; | |
80 | label_image += "/"; | |
81 | label_image += label; | |
82 | label_image += "-label.png"; | |
83 | Gtk::Image *pr = new Gtk::Image(label_image);*/ | |
84 | ||
85 | Gtk::VBox* b1 = new Gtk::VBox(); | |
86 | box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING); | |
87 | box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK); | |
88 | regler->cp_configure("KNOB", label, min, max, digits); | |
89 | regler->set_show_value(false); | |
90 | regler->cp_set_value(value); | |
91 | regler->set_name(plug_name); | |
92 | box->pack_start(*regler,Gtk::PACK_SHRINK); | |
93 | Gtk::VBox* b2 = new Gtk::VBox(); | |
94 | box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING); | |
95 | } | |
96 | // set borderwith for paintbox when widget resize | |
97 | // to hold controllers in place | |
98 | bool Widget::_expose_event(GdkEventExpose *event) | |
99 | { | |
100 | int x, y, width, height, depth; | |
101 | m_paintbox.get_window()->get_geometry(x, y, width, height, depth); | |
102 | //double_t height = m_paintbox.get_window()->get_height(); | |
103 | m_paintbox.set_border_width(height/20); | |
104 | return false; | |
105 | } | |
106 | // receive controller value changes from host | |
107 | void Widget::set_value(uint32_t port_index, | |
108 | uint32_t format, | |
109 | const void * buffer) | |
110 | { | |
111 | if ( format == 0 ) | |
112 | { | |
113 | float value = *(float *)buffer; | |
114 | switch ((EffectPortIndex)port_index ) | |
115 | { | |
116 | case T_LEVEL: | |
117 | treble = value; | |
118 | m_bigknob.cp_set_value(treble); | |
119 | break; | |
120 | case B_LEVEL: | |
121 | bass = value; | |
122 | m_bigknob1.cp_set_value(bass); | |
123 | break; | |
124 | default: | |
125 | break; | |
126 | } | |
127 | } | |
128 | } | |
129 | // write value changes to the host->engine | |
130 | void Widget::on_knob_value_changed() | |
131 | { | |
132 | treble = m_bigknob.get_value(); | |
133 | //std::cout << "mastergain = " << mastergain << std::endl; | |
134 | write_function(controller, (EffectPortIndex)T_LEVEL, | |
135 | sizeof(float), 0, (const void*)&treble); | |
136 | } | |
137 | ||
138 | void Widget::on_knob1_value_changed() | |
139 | { | |
140 | bass = m_bigknob1.get_value(); | |
141 | //std::cout << "pregain = " << pregain << std::endl; | |
142 | write_function(controller, (EffectPortIndex)B_LEVEL, | |
143 | sizeof(float), 0, (const void*)&bass); | |
144 | } | |
145 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #pragma once | |
20 | ||
21 | #ifndef SRC_HEADERS_WIDGET_H_ | |
22 | #define SRC_HEADERS_WIDGET_H_ | |
23 | ||
24 | #include <gtkmm.h> | |
25 | #include <gxwmm.h> | |
26 | #include "gxbooster.h" | |
27 | #include "../config.h" // for GX_STYLE_DIR | |
28 | // LV2UI stuff | |
29 | #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" | |
30 | ||
31 | class Widget : public Gtk::HBox | |
32 | { | |
33 | private: | |
34 | void make_controller_box(Gtk::VBox *box, | |
35 | Gxw::Regler *regler, | |
36 | Glib::ustring label, | |
37 | float min, float max, | |
38 | float digits, float value, | |
39 | Glib::ustring plug_name); | |
40 | bool _expose_event(GdkEventExpose *event); | |
41 | void set_value(uint32_t port_index, | |
42 | uint32_t format, | |
43 | const void * buffer); | |
44 | public: | |
45 | ||
46 | // public Lv2 communication stuff | |
47 | LV2UI_Controller controller; | |
48 | LV2UI_Write_Function write_function; | |
49 | static void set_value_static(uint32_t port_index, | |
50 | uint32_t buffer_size, | |
51 | uint32_t format, | |
52 | const void * buffer, Widget *self) | |
53 | { | |
54 | self->set_value(port_index,format,buffer); | |
55 | } | |
56 | ||
57 | Widget(Glib::ustring plug_name); | |
58 | ~Widget(); | |
59 | ||
60 | protected: | |
61 | Gtk::VBox m_vbox_; | |
62 | Gtk::HBox m_hbox_; | |
63 | Gtk::VBox m_vbox; | |
64 | Gtk::VBox m_vbox1; | |
65 | ||
66 | Gxw::PaintBox m_paintbox; | |
67 | Gtk::HBox m_hbox; | |
68 | Gxw::BigKnob m_bigknob; | |
69 | Gxw::BigKnob m_bigknob1; | |
70 | ||
71 | void on_knob_value_changed(); | |
72 | void on_knob1_value_changed(); | |
73 | // stores port values we're currently at. | |
74 | float treble; | |
75 | float bass; | |
76 | ||
77 | }; | |
78 | ||
79 | #endif //SRC_HEADERS_WIDGET_H_ |
0 | #!/usr/bin/env python | |
1 | # encoding: utf-8 | |
2 | ||
3 | import sys, os, TaskGen, ctypes | |
4 | ||
5 | def configure(conf): | |
6 | pass | |
7 | ||
8 | def build(bld): | |
9 | bundle = 'gxbooster.lv2' | |
10 | ||
11 | src = ['gxbooster.cpp' | |
12 | ] | |
13 | incl = ['./'] | |
14 | lib = [] | |
15 | if sys.platform.startswith("linux"): | |
16 | lib.append('dl') | |
17 | uselib = ['LV2CORE'] | |
18 | cxxflag =[] | |
19 | if not bld.env['OPT'] and bld.env['SSE2']: | |
20 | cxxflag = [ "-msse2", "-mfpmath=sse"] | |
21 | lv2_effects = bld( | |
22 | features='cxx cshlib ', | |
23 | includes = incl, | |
24 | lib = lib, | |
25 | uselib = uselib, | |
26 | obj_ext = '_5.o', | |
27 | cxxflags = cxxflag, | |
28 | defines = ["LV2_SO"], | |
29 | target = 'gxbooster', | |
30 | source = src, | |
31 | install_path = '${LV2DIR}/%s' % bundle, | |
32 | chmod = 0o755, | |
33 | ) | |
34 | lv2_effects.env['shlib_PATTERN'] = '%s.so' | |
35 | ||
36 | uselib_local5 = [] | |
37 | libpath5 = [] | |
38 | lib5 = [] | |
39 | incl5 = ['../../../libgxwmm','../../../libgxw','../'] | |
40 | if sys.platform.startswith("linux"): | |
41 | lib5.append('dl') | |
42 | if bld.env["GX_LIB_SHARED"]: | |
43 | lib5 += ['gxwmm','gxw'] | |
44 | libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env), | |
45 | bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)] | |
46 | else: | |
47 | uselib_local5 += ['gxwmm','gxw'] | |
48 | ||
49 | lv2_effetcs_gui = bld( | |
50 | features='cxx cshlib ', | |
51 | includes = incl5, | |
52 | lib = lib5, | |
53 | uselib = 'LV2CORE GTKMM', | |
54 | libpath = libpath5, | |
55 | uselib_local = uselib_local5, | |
56 | linkflags = '-Wl,-z,nodelete', | |
57 | defines = ["LV2_GUI"], | |
58 | target = 'gxbooster_gui', | |
59 | source = 'widget.cpp gxbooster_gui.cpp', | |
60 | install_path = '${LV2DIR}/%s' % bundle, | |
61 | chmod = 0o755, | |
62 | ) | |
63 | lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so' | |
64 | ||
65 | ||
66 | install_path = '${LV2DIR}/%s' % bundle, | |
67 | bld.install_files('${LV2DIR}/gxbooster.lv2', 'manifest.ttl') | |
68 | bld.install_files('${LV2DIR}/gxbooster.lv2', 'gxbooster.ttl') | |
69 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #include <cstdlib> | |
20 | #include <cmath> | |
21 | #include <iostream> | |
22 | #include <cstring> | |
23 | #include <unistd.h> | |
24 | ||
25 | #ifdef __SSE__ | |
26 | /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero) | |
27 | flags to avoid costly denormals */ | |
28 | #ifdef __SSE3__ | |
29 | #include <pmmintrin.h> | |
30 | inline void AVOIDDENORMALS() | |
31 | { | |
32 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | |
33 | _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); | |
34 | } | |
35 | #else | |
36 | #include <xmmintrin.h> | |
37 | inline void AVOIDDENORMALS() | |
38 | { | |
39 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); | |
40 | } | |
41 | #endif //__SSE3__ | |
42 | ||
43 | #else | |
44 | inline void AVOIDDENORMALS() {} | |
45 | #endif //__SSE__ | |
46 | ||
47 | #include "gxts9.h" | |
48 | #include "ts9sim.cc" | |
49 | ||
50 | ////////////////////////////// MONO //////////////////////////////////// | |
51 | ||
52 | class Gxts9 | |
53 | { | |
54 | private: | |
55 | // internal stuff | |
56 | float* output; | |
57 | float* input; | |
58 | ts9sim ts9; | |
59 | ||
60 | public: | |
61 | ||
62 | inline void run_dsp_mono(uint32_t n_samples); | |
63 | void connect_mono(uint32_t port,void* data); | |
64 | inline void init_dsp_mono(uint32_t rate); | |
65 | inline void connect_all_mono_ports(uint32_t port, void* data); | |
66 | void activate_f(); | |
67 | // constructor | |
68 | Gxts9() : | |
69 | output(NULL), | |
70 | input(NULL), | |
71 | ts9(ts9sim()) | |
72 | { | |
73 | }; | |
74 | // destructor | |
75 | ~Gxts9() | |
76 | { | |
77 | }; | |
78 | }; | |
79 | ||
80 | // plugin stuff | |
81 | ||
82 | void Gxts9::init_dsp_mono(uint32_t rate) | |
83 | { | |
84 | AVOIDDENORMALS(); | |
85 | ts9.init_static(rate, &ts9); | |
86 | } | |
87 | ||
88 | void Gxts9::connect_mono(uint32_t port,void* data) | |
89 | { | |
90 | switch ((EffectPortIndex)port) | |
91 | { | |
92 | case EFFECTS_OUTPUT: | |
93 | output = static_cast<float*>(data); | |
94 | break; | |
95 | case EFFECTS_INPUT: | |
96 | input = static_cast<float*>(data); | |
97 | break; | |
98 | default: | |
99 | break; | |
100 | } | |
101 | } | |
102 | ||
103 | void Gxts9::activate_f() | |
104 | { | |
105 | ts9.clear_state_static(&ts9); | |
106 | } | |
107 | ||
108 | void Gxts9::run_dsp_mono(uint32_t n_samples) | |
109 | { | |
110 | // run dsp | |
111 | ts9.run_static(n_samples, input, output, &ts9); | |
112 | } | |
113 | ||
114 | void Gxts9::connect_all_mono_ports(uint32_t port, void* data) | |
115 | { | |
116 | connect_mono(port,data); | |
117 | ts9.connect_static(port,data, &ts9); | |
118 | } | |
119 | ||
120 | ///////////////////////////// LV2 defines ////////////////////////////// | |
121 | ||
122 | static LV2_Handle | |
123 | instantiate(const LV2_Descriptor* descriptor, | |
124 | double rate, | |
125 | const char* bundle_path, | |
126 | const LV2_Feature* const* features) | |
127 | { | |
128 | ||
129 | Gxts9 *self = new Gxts9(); | |
130 | if (!self) | |
131 | { | |
132 | return NULL; | |
133 | } | |
134 | ||
135 | self->init_dsp_mono((uint32_t)rate); | |
136 | ||
137 | return (LV2_Handle)self; | |
138 | } | |
139 | ||
140 | static void | |
141 | connect_port(LV2_Handle instance, | |
142 | uint32_t port, | |
143 | void* data) | |
144 | { | |
145 | Gxts9* self = (Gxts9*)instance; | |
146 | self->connect_all_mono_ports(port, data); | |
147 | } | |
148 | ||
149 | static void | |
150 | activate(LV2_Handle instance) | |
151 | { | |
152 | Gxts9* self = (Gxts9*)instance; | |
153 | self->activate_f(); | |
154 | } | |
155 | ||
156 | static void | |
157 | run(LV2_Handle instance, uint32_t n_samples) | |
158 | { | |
159 | Gxts9* self = (Gxts9*)instance; | |
160 | self->run_dsp_mono(n_samples); | |
161 | } | |
162 | ||
163 | static void | |
164 | cleanup(LV2_Handle instance) | |
165 | { | |
166 | Gxts9* self = (Gxts9*)instance; | |
167 | delete self; | |
168 | } | |
169 | ||
170 | ////////////////////////////////////////////////////////////////// | |
171 | ||
172 | static const LV2_Descriptor descriptor = | |
173 | { | |
174 | GXPLUGIN_URI "#ts9sim", | |
175 | instantiate, | |
176 | connect_port, | |
177 | activate, | |
178 | run, | |
179 | NULL, | |
180 | cleanup, | |
181 | NULL | |
182 | }; | |
183 | ||
184 | extern "C" | |
185 | LV2_SYMBOL_EXPORT | |
186 | const LV2_Descriptor* | |
187 | lv2_descriptor(uint32_t index) | |
188 | { | |
189 | switch (index) | |
190 | { | |
191 | case 0: | |
192 | return &descriptor; | |
193 | default: | |
194 | return NULL; | |
195 | } | |
196 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #pragma once | |
20 | ||
21 | #ifndef SRC_HEADERS_GXEFFECTS_H_ | |
22 | #define SRC_HEADERS_GXEFFECTS_H_ | |
23 | ||
24 | #include <lv2.h> | |
25 | ||
26 | #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxts9" | |
27 | #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxts9#gui" | |
28 | ||
29 | ||
30 | typedef enum | |
31 | { | |
32 | TS9_LEVEL, | |
33 | TS9_TONE, | |
34 | TS9_DRIVE, | |
35 | EFFECTS_OUTPUT, | |
36 | EFFECTS_INPUT, | |
37 | } EffectPortIndex; | |
38 | ||
39 | #endif //SRC_HEADERS_GXEFFECTS_H_ |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | ||
20 | @prefix doap: <http://usefulinc.com/ns/doap#> . | |
21 | @prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
22 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
23 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
24 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
25 | @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>. | |
26 | ||
27 | <http://guitarix.sourceforge.net#me> | |
28 | a foaf:Person ; | |
29 | foaf:name "Hermann Meyer" ; | |
30 | foaf:mbox <mailto:brummer@web.de> ; | |
31 | rdfs:seeAlso <http://guitarix.sourceforge.net> . | |
32 | ||
33 | <http://guitarix.sourceforge.net/plugins/gxts9> | |
34 | a doap:Project ; | |
35 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
36 | doap:name "Gxts9sim" . | |
37 | ||
38 | <http://guitarix.sourceforge.net/plugins/gxts9#ts9sim> | |
39 | a lv2:Plugin , | |
40 | lv2:EffectPlugin ; | |
41 | doap:maintainer <http://guitarix.sourceforge.net#me> ; | |
42 | doap:name "GxTubeScreamer"; | |
43 | doap:license <http://opensource.org/licenses/isc> ; | |
44 | lv2:project <http://guitarix.sourceforge.net/plugins/gxts9> ; | |
45 | lv2:optionalFeature lv2:hardRTCapable ; | |
46 | ||
47 | guiext:ui <http://guitarix.sourceforge.net/plugins/gxts9#gui>; | |
48 | ||
49 | lv2:port [ | |
50 | a lv2:InputPort , | |
51 | lv2:ControlPort ; | |
52 | lv2:index 0 ; | |
53 | lv2:symbol "fslider0_" ; | |
54 | lv2:name "Level"; | |
55 | lv2:default -16.0 ; | |
56 | lv2:minimum -20.0 ; | |
57 | lv2:maximum 4.0 ; | |
58 | ] , [ | |
59 | a lv2:InputPort , | |
60 | lv2:ControlPort ; | |
61 | lv2:index 1 ; | |
62 | lv2:symbol "fslider1_" ; | |
63 | lv2:name "Tone"; | |
64 | lv2:default 400.0 ; | |
65 | lv2:minimum 100.0 ; | |
66 | lv2:maximum 1000.0 ; | |
67 | ] , [ | |
68 | a lv2:InputPort , | |
69 | lv2:ControlPort ; | |
70 | lv2:index 2 ; | |
71 | lv2:symbol "fslider2_" ; | |
72 | lv2:name "Drive"; | |
73 | lv2:default 0.5 ; | |
74 | lv2:minimum 0.0 ; | |
75 | lv2:maximum 1.0 ; | |
76 | ] , [ | |
77 | a lv2:AudioPort , | |
78 | lv2:OutputPort ; | |
79 | lv2:index 3 ; | |
80 | lv2:symbol "out" ; | |
81 | lv2:name "Out" | |
82 | ] , [ | |
83 | a lv2:AudioPort , | |
84 | lv2:InputPort ; | |
85 | lv2:index 4 ; | |
86 | lv2:symbol "in" ; | |
87 | lv2:name "in" | |
88 | ]. | |
89 | ||
90 | <http://guitarix.sourceforge.net/plugins/gxts9#gui> | |
91 | a guiext:GtkUI; | |
92 | guiext:binary <gxts9_gui.so>; | |
93 | guiext:requiredFeature guiext:makeResident . | |
94 |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | #include <string> | |
21 | #include <iostream> | |
22 | ||
23 | #include <gtkmm.h> | |
24 | #include "gxts9.h" | |
25 | #include "widget.h" | |
26 | ||
27 | ||
28 | #include <lv2.h> | |
29 | #include <lv2/lv2plug.in/ns/extensions/ui/ui.h> | |
30 | ||
31 | using namespace std; | |
32 | ||
33 | class Gxts9GUI | |
34 | { | |
35 | private: | |
36 | Glib::ustring plugskin; | |
37 | Glib::ustring addKnob; | |
38 | Glib::ustring plug_name; | |
39 | void set_knob(Glib::ustring knob); | |
40 | void set_skin(); | |
41 | void set_plug_name(const char * plugin_uri); | |
42 | GtkWidget* make_gui(); | |
43 | public: | |
44 | ||
45 | Widget* widget; | |
46 | static void set_plug_name_static(Gxts9GUI *self, const char * plugin_uri) | |
47 | { | |
48 | self->set_plug_name(plugin_uri); | |
49 | } | |
50 | static GtkWidget* make_gui_static(Gxts9GUI *self) | |
51 | { | |
52 | return self->make_gui(); | |
53 | } | |
54 | ||
55 | Gxts9GUI () {}; | |
56 | ~Gxts9GUI () {}; | |
57 | } ; | |
58 | ||
59 | void Gxts9GUI::set_knob( Glib::ustring knob) | |
60 | { | |
61 | addKnob = " style 'gx_"; | |
62 | addKnob += plug_name; | |
63 | addKnob += "_dark_skin_icons'\n" | |
64 | " { \n" | |
65 | " stock['bigknob'] = {{'"; | |
66 | addKnob += knob; | |
67 | addKnob += ".png'}}\n" | |
68 | " stock['smallknob'] = {{'"; | |
69 | addKnob += knob; | |
70 | addKnob += ".png'}}\n" | |
71 | " stock['smallknobr'] = {{'"; | |
72 | addKnob += knob; | |
73 | addKnob += ".png'}}\n" | |
74 | " }\n" | |
75 | "widget '*."; | |
76 | addKnob += plug_name; | |
77 | addKnob += "' style 'gx_"; | |
78 | addKnob += plug_name; | |
79 | addKnob += "_dark_skin_icons' "; | |
80 | } | |
81 | ||
82 | void Gxts9GUI::set_skin() | |
83 | { | |
84 | Glib::ustring toparse = "pixmap_path "; | |
85 | toparse += " '"; | |
86 | toparse += GX_LV2_STYLE_DIR; | |
87 | toparse += "/'\n"; | |
88 | toparse += "style \"gx_"; | |
89 | toparse += plug_name; | |
90 | toparse += "_dark-paintbox\"\n" | |
91 | " { \n" | |
92 | " GxPaintBox::icon-set =9\n" | |
93 | " stock['amp_skin'] = {{'"; | |
94 | toparse += plugskin; | |
95 | toparse += "'}}\n" | |
96 | " }\n" | |
97 | "\n" | |
98 | "style 'gx_head_black_box' \n" | |
99 | " { \n" | |
100 | " fg[NORMAL] = '#237328' \n" | |
101 | " }\n"; | |
102 | toparse += addKnob; | |
103 | ||
104 | toparse += " widget '*.amplabel' style:highest 'gx_head_black_box'\n" | |
105 | "widget '*."; | |
106 | toparse += plug_name; | |
107 | toparse += "' style 'gx_"; | |
108 | toparse += plug_name; | |
109 | toparse += "_dark-paintbox' "; | |
110 | ||
111 | gtk_rc_parse_string (toparse.c_str()); | |
112 | } | |
113 | ||
114 | void Gxts9GUI::set_plug_name( const char * plugin_uri) | |
115 | { | |
116 | addKnob = ""; | |
117 | ||
118 | if (strcmp("http://guitarix.sourceforge.net/plugins/gxts9#ts9sim", plugin_uri) == 0) | |
119 | { | |
120 | plugskin = "ts9.png"; | |
121 | plug_name = "ts9"; | |
122 | set_knob("ts9-knob"); | |
123 | } | |
124 | else | |
125 | { | |
126 | plugskin = "ts9.png"; | |
127 | plug_name = "ts9"; | |
128 | } | |
129 | } | |
130 | ||
131 | GtkWidget* Gxts9GUI::make_gui() | |
132 | { | |
133 | // init the gxwmm library | |
134 | Gxw::init(); | |
135 | set_skin(); | |
136 | GtkWidget* container = gtk_vbox_new(FALSE, 2); | |
137 | widget = new Widget(plug_name); | |
138 | GtkWidget* cWidget = (GtkWidget*)widget->gobj(); | |
139 | gtk_container_add( (GtkContainer*)container, cWidget ); | |
140 | ||
141 | return container; | |
142 | } | |
143 | ||
144 | ||
145 | static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor, | |
146 | const char * plugin_uri, | |
147 | const char * bundle_path, | |
148 | LV2UI_Write_Function write_function, | |
149 | LV2UI_Controller controller, | |
150 | LV2UI_Widget * widget, | |
151 | const LV2_Feature * const * features) | |
152 | { | |
153 | Gxts9GUI* self = new Gxts9GUI(); | |
154 | if (self == NULL) return NULL; | |
155 | self->set_plug_name_static(self, plugin_uri); | |
156 | *widget = (LV2UI_Widget)self->make_gui_static(self); | |
157 | self->widget->controller = controller; | |
158 | self->widget->write_function = write_function; | |
159 | return (LV2UI_Handle)self; | |
160 | } | |
161 | ||
162 | static void cleanup(LV2UI_Handle ui) | |
163 | { | |
164 | Gxts9GUI *pluginGui = (Gxts9GUI *) ui; | |
165 | delete pluginGui->widget; | |
166 | delete pluginGui; | |
167 | } | |
168 | ||
169 | static void port_event(LV2UI_Handle ui, | |
170 | uint32_t port_index, | |
171 | uint32_t buffer_size, | |
172 | uint32_t format, | |
173 | const void * buffer) | |
174 | { | |
175 | Gxts9GUI *self = (Gxts9GUI *) ui; | |
176 | self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget); | |
177 | return; | |
178 | } | |
179 | ||
180 | static LV2UI_Descriptor descriptors[] = | |
181 | { | |
182 | {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL} | |
183 | }; | |
184 | ||
185 | const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index) | |
186 | { | |
187 | //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index); | |
188 | if (index >= sizeof(descriptors) / sizeof(descriptors[0])) | |
189 | { | |
190 | return NULL; | |
191 | } | |
192 | return descriptors + index; | |
193 | } | |
194 |
0 | # | |
1 | # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | # | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 2 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | # -------------------------------------------------------------------------- | |
17 | # | |
18 | ||
19 | @prefix lv2: <http://lv2plug.in/ns/lv2core#> . | |
20 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
21 | ||
22 | <http://guitarix.sourceforge.net/plugins/gxts9#ts9sim> | |
23 | a lv2:Plugin ; | |
24 | lv2:binary <gxts9@LIB_EXT@> ; | |
25 | rdfs:seeAlso <gxts9.ttl> . |
0 | // file generated by tools/ts9sim.py -- do not modify manually | |
1 | ||
2 | static table1d_imp<100> ts9table = { | |
3 | 0,0.970874,101.97,100, { | |
4 | 0.0,-0.0296990148227,-0.0599780676992,-0.0908231643281,-0.122163239629, | |
5 | -0.15376009788,-0.184938007182,-0.214177260107,-0.239335434213,-0.259232575019, | |
6 | -0.274433909887,-0.286183308354,-0.29553854444,-0.303222323477,-0.309706249977, | |
7 | -0.315301338712,-0.320218440785,-0.324604982281,-0.328567120703,-0.332183356975, | |
8 | -0.335513124719,-0.33860236542,-0.34148724693,-0.344196707008,-0.346754233717, | |
9 | -0.34917913798,-0.351487480543,-0.35369275887,-0.355806424152,-0.357838275995, | |
10 | -0.359796767655,-0.361689244919,-0.363522135105,-0.365301098113,-0.367031148289, | |
11 | -0.368716753588,-0.370361916943,-0.371970243537,-0.373544996828,-0.375089145544, | |
12 | -0.376605403346,-0.378096262548,-0.379564022938,-0.381010816596,-0.382438629377, | |
13 | -0.383849319643,-0.385244634694,-0.386626225283,-0.387995658543,-0.389354429565, | |
14 | -0.39070397188,-0.392045667012,-0.393380853288,-0.39471083403,-0.396036885269, | |
15 | -0.397360263098,-0.398682210753,-0.400003965547,-0.401326765733,-0.402651857394, | |
16 | -0.403980501471,-0.405313980999,-0.406653608692,-0.40800073496,-0.409356756504, | |
17 | -0.410723125631,-0.412101360439,-0.413493056085,-0.414899897347,-0.416323672745, | |
18 | -0.417766290556,-0.419229797097,-0.420716397759,-0.422228481377,-0.423768648654, | |
19 | -0.425339745558,-0.426944902828,-0.428587583057,-0.430271637224,-0.432001373102, | |
20 | -0.433781638746,-0.435617925286,-0.437516494692,-0.439484540257,-0.441530390423, | |
21 | -0.443663770898,-0.445896146322,-0.448241172434,-0.450715304661,-0.453338632988, | |
22 | -0.45613605235,-0.45913894467,-0.46238766699,-0.465935359011,-0.469854010456, | |
23 | -0.474244617411,-0.479255257451,-0.48511588606,-0.492212726244,-0.501272723631 | |
24 | } | |
25 | }; |
0 | /* | |
1 | * Copyright (C) 2012 Andreas Degert, Hermann Meyer | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | */ | |
17 | ||
18 | template <int32_t tab_size> | |
19 | struct table1d_imp { | |
20 | float low; | |
21 | float high; | |
22 | float istep; | |
23 | int32_t size; | |
24 | float data[tab_size]; | |
25 | }; | |
26 | ||
27 | #include "ts9nonlin.cc" | |
28 | ||
29 | static inline double ts9nonlin(double x) { | |
30 | double f = fabs(x); | |
31 | f = (f/(3.0 + f) - ts9table.low) * ts9table.istep; | |
32 | int32_t i = static_cast<int32_t>(f); | |
33 | if (i < 0) { | |
34 | f = ts9table.data[0]; | |
35 | } else if (i >= ts9table.size-1) { | |
36 | f = ts9table.data[ts9table.size-1]; | |
37 | } else { | |
38 | f -= i; | |
39 | f = ts9table.data[i]*(1-f) + ts9table.data[i+1]*f; | |
40 | } | |
41 | return copysign(f, -x); | |
42 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #define max(x, y) (((x) > (y)) ? (x) : (y)) | |
20 | #define min(x, y) (((x) < (y)) ? (x) : (y)) | |
21 | ||
22 | #include "ts9nonlin.h" | |
23 | ||
24 | class ts9sim { | |
25 | private: | |
26 | uint32_t fSamplingFreq; | |
27 | float *fslider0_; | |
28 | float fslider0; | |
29 | double fRec0[2]; | |
30 | float *fslider1_; | |
31 | float fslider1; | |
32 | int32_t iConst0; | |
33 | double fConst1; | |
34 | double fVec0[2]; | |
35 | double fConst2; | |
36 | double fConst3; | |
37 | double fConst4; | |
38 | float *fslider2_; | |
39 | float fslider2; | |
40 | double fConst5; | |
41 | double fConst6; | |
42 | double fRec2[2]; | |
43 | double fVec1[2]; | |
44 | double fRec1[2]; | |
45 | void clear_state_f(); | |
46 | void init(uint32_t samplingFreq); | |
47 | void run(uint32_t count, float *input0, float *output0); | |
48 | void connect(uint32_t port,void* data); | |
49 | public: | |
50 | static void init_static(uint32_t samplingFreq, ts9sim*); | |
51 | static void run_static(uint32_t count, float *input0, float *output0, ts9sim*); | |
52 | static void connect_static(uint32_t port, void* data, ts9sim*); | |
53 | static void clear_state_static(ts9sim*); | |
54 | ts9sim(); | |
55 | ~ts9sim(); | |
56 | }; | |
57 | ||
58 | ts9sim::ts9sim() { | |
59 | } | |
60 | ||
61 | ts9sim::~ts9sim() { | |
62 | } | |
63 | ||
64 | inline void ts9sim::clear_state_f() | |
65 | { | |
66 | for (int32_t i=0; i<2; i++) fRec0[i] = 0; | |
67 | for (int32_t i=0; i<2; i++) fVec0[i] = 0; | |
68 | for (int32_t i=0; i<2; i++) fRec2[i] = 0; | |
69 | for (int32_t i=0; i<2; i++) fVec1[i] = 0; | |
70 | for (int32_t i=0; i<2; i++) fRec1[i] = 0; | |
71 | } | |
72 | ||
73 | inline void ts9sim::init(uint32_t samplingFreq) | |
74 | { | |
75 | fSamplingFreq = samplingFreq; | |
76 | iConst0 = min(192000, max(1, fSamplingFreq)); | |
77 | fConst1 = (3.141592653589793 / iConst0); | |
78 | fConst2 = (0.00044179999999999995 * iConst0); | |
79 | fConst3 = (1 + fConst2); | |
80 | fConst4 = (0 - ((1 - fConst2) / fConst3)); | |
81 | fConst5 = (9.4e-08 * iConst0); | |
82 | fConst6 = (1.0 / fConst3); | |
83 | clear_state_f(); | |
84 | } | |
85 | ||
86 | void ts9sim::connect(uint32_t port,void* data) | |
87 | { | |
88 | switch ((EffectPortIndex)port) | |
89 | { | |
90 | case TS9_LEVEL: | |
91 | fslider0_ = (float*)data; | |
92 | break; | |
93 | case TS9_TONE: | |
94 | fslider1_ = (float*)data; | |
95 | break; | |
96 | case TS9_DRIVE: | |
97 | fslider2_ = (float*)data; | |
98 | break; | |
99 | default: | |
100 | break; | |
101 | } | |
102 | } | |
103 | ||
104 | inline void ts9sim::run(uint32_t count, float *input0, float *output0) | |
105 | { | |
106 | fslider0 = (*fslider0_); | |
107 | fslider1 = (*fslider1_); | |
108 | fslider2 = (*fslider2_); | |
109 | ||
110 | double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0))); | |
111 | double fSlow1 = (1.0 / tan((fConst1 * fslider1))); | |
112 | double fSlow2 = (1 + fSlow1); | |
113 | double fSlow3 = (0 - ((1 - fSlow1) / fSlow2)); | |
114 | double fSlow4 = (fConst5 * ((500000 * fslider2) + 55700)); | |
115 | double fSlow5 = (1 + fSlow4); | |
116 | double fSlow6 = (1 - fSlow4); | |
117 | double fSlow7 = (1.0 / fSlow2); | |
118 | for (uint32_t i=0; i<count; i++) { | |
119 | fRec0[0] = (fSlow0 + (0.999 * fRec0[1])); | |
120 | double fTemp0 = (double)input0[i]; | |
121 | fVec0[0] = fTemp0; | |
122 | fRec2[0] = ((fConst6 * ((fSlow6 * fVec0[1]) + (fSlow5 * fVec0[0]))) + (fConst4 * fRec2[1])); | |
123 | double fTemp1 = (fVec0[0] - ts9nonlin((fRec2[0] - fVec0[0]))); | |
124 | fVec1[0] = fTemp1; | |
125 | fRec1[0] = ((fSlow7 * (fVec1[0] + fVec1[1])) + (fSlow3 * fRec1[1])); | |
126 | output0[i] = (float)(fRec1[0] * fRec0[0]); | |
127 | // post processing | |
128 | fRec1[1] = fRec1[0]; | |
129 | fVec1[1] = fVec1[0]; | |
130 | fRec2[1] = fRec2[0]; | |
131 | fVec0[1] = fVec0[0]; | |
132 | fRec0[1] = fRec0[0]; | |
133 | } | |
134 | } | |
135 | ||
136 | void ts9sim::init_static(uint32_t samplingFreq, ts9sim *p) | |
137 | { | |
138 | p->init(samplingFreq); | |
139 | } | |
140 | ||
141 | void ts9sim::run_static(uint32_t count, float *input0, float *output0, ts9sim *p) | |
142 | { | |
143 | p->run(count, input0, output0); | |
144 | } | |
145 | ||
146 | void ts9sim::connect_static(uint32_t port,void* data, ts9sim *p) | |
147 | { | |
148 | p->connect(port, data); | |
149 | } | |
150 | ||
151 | void ts9sim::clear_state_static(ts9sim *p) | |
152 | { | |
153 | p->clear_state_f(); | |
154 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | ||
20 | #include "widget.h" | |
21 | ||
22 | #include <iostream> | |
23 | ||
24 | Widget::Widget(Glib::ustring plug_name) | |
25 | { | |
26 | // init values set by host | |
27 | /*mastergain = -15.0; | |
28 | pregain = -15.0; | |
29 | wet_dry = 20.0; | |
30 | drive = 0.25; | |
31 | mid = 0.5; | |
32 | bass = 0.5; | |
33 | treble = 0.5; | |
34 | clevel = 1.0; | |
35 | alevel = 1.0;*/ | |
36 | ||
37 | ||
38 | ||
39 | // set propertys for the main paintbox holding the skin | |
40 | m_paintbox.set_border_width(10); | |
41 | m_paintbox.set_spacing(6); | |
42 | m_paintbox.set_homogeneous(false); | |
43 | m_paintbox.set_name(plug_name); | |
44 | m_paintbox.property_paint_func() = "amp_skin_expose"; | |
45 | add(m_paintbox); | |
46 | // box for the controllers | |
47 | m_hbox_.set_spacing(6); | |
48 | m_hbox_.set_homogeneous(false); | |
49 | // this box set space for the upper part of the skin | |
50 | m_hbox1_.set_spacing(12); | |
51 | m_hbox1_.set_border_width(65); | |
52 | // set a vertical box in the paintbox | |
53 | m_paintbox.pack_start(m_vbox_); | |
54 | // and controller box on top | |
55 | m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK); | |
56 | // and put space box on bottem | |
57 | m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING); | |
58 | ||
59 | // create all controllers | |
60 | make_controller_box(&m_vbox, &m_bigknob, "level", -20, 4, 0.1, level, plug_name); | |
61 | m_bigknob.signal_value_changed().connect(sigc::mem_fun(*this, | |
62 | &Widget::on_knob_value_changed)); | |
63 | box1.set_border_width(6); | |
64 | m_vbox.pack_start(box1,Gtk::PACK_EXPAND_PADDING); | |
65 | ||
66 | box2.set_border_width(6); | |
67 | m_vbox1.pack_start(box2,Gtk::PACK_EXPAND_PADDING); | |
68 | make_controller_box(&m_vbox1, &m_bigknob1, "tone", 100, 1000, 1, tone, plug_name); | |
69 | m_bigknob1.signal_value_changed().connect(sigc::mem_fun(*this, | |
70 | &Widget::on_knob1_value_changed)); | |
71 | ||
72 | make_controller_box(&m_vbox2, &m_bigknob2, "drive", 0, 1, 0.01, drive, plug_name); | |
73 | m_bigknob2.signal_value_changed().connect(sigc::mem_fun(*this, | |
74 | &Widget::on_knob2_value_changed)); | |
75 | box3.set_border_width(6); | |
76 | m_vbox2.pack_start(box3,Gtk::PACK_EXPAND_PADDING); | |
77 | ||
78 | ||
79 | // put boxed controllers into controller box | |
80 | m_hbox_.pack_start(m_vbox2); | |
81 | m_hbox_.pack_start(m_vbox1); | |
82 | m_hbox_.pack_start(m_vbox); | |
83 | ||
84 | ||
85 | // connect expose handler as resize handler | |
86 | m_paintbox.signal_expose_event().connect( | |
87 | sigc::mem_fun(this, &Widget::_expose_event), true); | |
88 | ||
89 | set_app_paintable(true); | |
90 | show_all(); | |
91 | } | |
92 | ||
93 | Widget::~Widget() | |
94 | { | |
95 | ||
96 | } | |
97 | // create stackboxes with controllers from gxw | |
98 | void Widget::make_controller_box(Gtk::VBox *box, | |
99 | Gxw::Regler *regler, | |
100 | Glib::ustring label, | |
101 | float min, float max, | |
102 | float digits, float value, | |
103 | Glib::ustring plug_name) | |
104 | { | |
105 | Gtk::Label* pr = new Gtk::Label(label, 0); | |
106 | pr->set_name("amplabel"); | |
107 | /*Glib::ustring label_image = GX_STYLE_DIR; | |
108 | label_image += "/"; | |
109 | label_image += label; | |
110 | label_image += "-label.png"; | |
111 | Gtk::Image *pr = new Gtk::Image(label_image);*/ | |
112 | ||
113 | Gtk::VBox* b1 = new Gtk::VBox(); | |
114 | box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING); | |
115 | box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK); | |
116 | regler->cp_configure("KNOB", label, min, max, digits); | |
117 | regler->set_show_value(false); | |
118 | regler->cp_set_value(value); | |
119 | regler->set_name(plug_name); | |
120 | box->pack_start(*regler,Gtk::PACK_SHRINK); | |
121 | Gtk::VBox* b2 = new Gtk::VBox(); | |
122 | box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING); | |
123 | } | |
124 | // set borderwith for paintbox when widget resize | |
125 | // to hold controllers in place | |
126 | bool Widget::_expose_event(GdkEventExpose *event) | |
127 | { | |
128 | int x, y, width, height, depth; | |
129 | m_paintbox.get_window()->get_geometry(x, y, width, height, depth); | |
130 | //double_t height = m_paintbox.get_window()->get_height(); | |
131 | m_paintbox.set_border_width(height/20); | |
132 | return false; | |
133 | } | |
134 | // receive controller value changes from host | |
135 | void Widget::set_value(uint32_t port_index, | |
136 | uint32_t format, | |
137 | const void * buffer) | |
138 | { | |
139 | if ( format == 0 ) | |
140 | { | |
141 | float value = *(float *)buffer; | |
142 | switch ((EffectPortIndex)port_index ) | |
143 | { | |
144 | case TS9_LEVEL: | |
145 | level = value; | |
146 | m_bigknob.cp_set_value(level); | |
147 | break; | |
148 | case TS9_TONE: | |
149 | tone = value; | |
150 | m_bigknob1.cp_set_value(tone); | |
151 | break; | |
152 | case TS9_DRIVE: | |
153 | drive = value; | |
154 | m_bigknob2.cp_set_value(drive); | |
155 | break; | |
156 | default: | |
157 | break; | |
158 | } | |
159 | } | |
160 | } | |
161 | // write value changes to the host->engine | |
162 | void Widget::on_knob_value_changed() | |
163 | { | |
164 | level = m_bigknob.get_value(); | |
165 | //std::cout << "mastergain = " << mastergain << std::endl; | |
166 | write_function(controller, (EffectPortIndex)TS9_LEVEL, | |
167 | sizeof(float), 0, (const void*)&level); | |
168 | } | |
169 | ||
170 | void Widget::on_knob1_value_changed() | |
171 | { | |
172 | tone = m_bigknob1.get_value(); | |
173 | //std::cout << "pregain = " << pregain << std::endl; | |
174 | write_function(controller, (EffectPortIndex)TS9_TONE, | |
175 | sizeof(float), 0, (const void*)&tone); | |
176 | } | |
177 | ||
178 | void Widget::on_knob2_value_changed() | |
179 | { | |
180 | drive = m_bigknob2.get_value(); | |
181 | //std::cout << "wet_dry = " << wet_dry << std::endl; | |
182 | write_function(controller, (EffectPortIndex)TS9_DRIVE, | |
183 | sizeof(float), 0, (const void*)&drive); | |
184 | } |
0 | /* | |
1 | * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose | |
2 | * | |
3 | * This program is free software; you can redistribute it and/or modify | |
4 | * it under the terms of the GNU General Public License as published by | |
5 | * the Free Software Foundation; either version 2 of the License, or | |
6 | * (at your option) any later version. | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
16 | * -------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #pragma once | |
20 | ||
21 | #ifndef SRC_HEADERS_WIDGET_H_ | |
22 | #define SRC_HEADERS_WIDGET_H_ | |
23 | ||
24 | #include <gtkmm.h> | |
25 | #include <gxwmm.h> | |
26 | #include "gxts9.h" | |
27 | #include "../config.h" // for GX_STYLE_DIR | |
28 | // LV2UI stuff | |
29 | #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" | |
30 | ||
31 | class Widget : public Gtk::HBox | |
32 | { | |
33 | private: | |
34 | void make_controller_box(Gtk::VBox *box, | |
35 | Gxw::Regler *regler, | |
36 | Glib::ustring label, | |
37 | float min, float max, | |
38 | float digits, float value, | |
39 | Glib::ustring plug_name); | |
40 | bool _expose_event(GdkEventExpose *event); | |
41 | void set_value(uint32_t port_index, | |
42 | uint32_t format, | |
43 | const void * buffer); | |
44 | public: | |
45 | ||
46 | // public Lv2 communication stuff | |
47 | LV2UI_Controller controller; | |
48 | LV2UI_Write_Function write_function; | |
49 | static void set_value_static(uint32_t port_index, | |
50 | uint32_t buffer_size, | |
51 | uint32_t format, | |
52 | const void * buffer, Widget *self) | |
53 | { | |
54 | self->set_value(port_index,format,buffer); | |
55 | } | |
56 | ||
57 | Widget(Glib::ustring plug_name); | |
58 | ~Widget(); | |
59 | ||
60 | protected: | |
61 | Gtk::VBox m_vbox_; | |
62 | Gtk::HBox m_hbox_; | |
63 | Gtk::HBox m_hbox1_; | |
64 | Gtk::VBox m_vbox; | |
65 | Gtk::VBox m_vbox1; | |
66 | Gtk::VBox m_vbox2; | |
67 | Gtk::VBox box1; | |
68 | Gtk::VBox box2; | |
69 | Gtk::VBox box3; | |
70 | ||
71 | Gxw::PaintBox m_paintbox; | |
72 | Gtk::HBox m_hbox; | |
73 | Gxw::SmallKnob m_bigknob; | |
74 | Gxw::SmallKnob m_bigknob1; | |
75 | Gxw::SmallKnob m_bigknob2; | |
76 | ||
77 | void on_knob_value_changed(); | |
78 | void on_knob1_value_changed(); | |
79 | void on_knob2_value_changed(); | |
80 | // stores port values we're currently at. | |
81 | float level; | |
82 | float tone; | |
83 | float drive; | |
84 | ||
85 | }; | |
86 | ||
87 | #endif //SRC_HEADERS_WIDGET_H_ |
0 | #!/usr/bin/env python | |
1 | # encoding: utf-8 | |
2 | ||
3 | import sys, os, TaskGen, ctypes | |
4 | ||
5 | def configure(conf): | |
6 | pass | |
7 | ||
8 | def build(bld): | |
9 | bundle = 'gxts9.lv2' | |
10 | ||
11 | src = ['gxts9.cpp' | |
12 | ] | |
13 | incl = ['./'] | |
14 | lib = [] | |
15 | if sys.platform.startswith("linux"): | |
16 | lib.append('dl') | |
17 | uselib = ['LV2CORE'] | |
18 | cxxflag =[] | |
19 | if not bld.env['OPT'] and bld.env['SSE2']: | |
20 | cxxflag = [ "-msse2", "-mfpmath=sse"] | |
21 | lv2_effects = bld( | |
22 | features='cxx cshlib ', | |
23 | includes = incl, | |
24 | lib = lib, | |
25 | uselib = uselib, | |
26 | obj_ext = '_4.o', | |
27 | cxxflags = cxxflag, | |
28 | defines = ["LV2_SO"], | |
29 | target = 'gxts9', | |
30 | source = src, | |
31 | install_path = '${LV2DIR}/%s' % bundle, | |
32 | chmod = 0o755, | |
33 | ) | |
34 | lv2_effects.env['shlib_PATTERN'] = '%s.so' | |
35 | ||
36 | uselib_local4 = [] | |
37 | libpath4 = [] | |
38 | lib4 = [] | |
39 | incl4 = ['../../../libgxwmm','../../../libgxw','../'] | |
40 | if sys.platform.startswith("linux"): | |
41 | lib4.append('dl') | |
42 | if bld.env["GX_LIB_SHARED"]: | |
43 | lib4 += ['gxwmm','gxw'] | |
44 | libpath4 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env), | |
45 | bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)] | |
46 | else: | |
47 | uselib_local4 += ['gxwmm','gxw'] | |
48 | ||
49 | lv2_effetcs_gui = bld( | |
50 | features='cxx cshlib ', | |
51 | includes = incl4, | |
52 | lib = lib4, | |
53 | uselib = 'LV2CORE GTKMM', | |
54 | libpath = libpath4, | |
55 | uselib_local = uselib_local4, | |
56 | linkflags = '-Wl,-z,nodelete', | |
57 | defines = ["LV2_GUI"], | |
58 | target = 'gxts9_gui', | |
59 | source = 'widget.cpp gxts9_gui.cpp', | |
60 | install_path = '${LV2DIR}/%s' % bundle, | |
61 | chmod = 0o755, | |
62 | ) | |
63 | lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so' | |
64 | ||
65 | ||
66 | install_path = '${LV2DIR}/%s' % bundle, | |
67 | bld.install_files('${LV2DIR}/gxts9.lv2', 'manifest.ttl') | |
68 | bld.install_files('${LV2DIR}/gxts9.lv2', 'gxts9.ttl') | |
69 |
0 | #!/usr/bin/env python | |
1 | # encoding: utf-8 | |
2 | ||
3 | import os, re | |
4 | ||
5 | def sub_file(src_fname, dst_fname, lst): | |
6 | ||
7 | f = open(src_fname, 'rU') | |
8 | txt = f.read() | |
9 | f.close() | |
10 | ||
11 | for (key, val) in lst: | |
12 | re_pat = re.compile(key, re.M) | |
13 | txt = re_pat.sub(val, txt) | |
14 | ||
15 | f = open(dst_fname, 'w') | |
16 | f.write(txt) | |
17 | f.close() | |
18 | ||
19 | def append_sse_flags(): | |
20 | cpu_model = None | |
21 | x86_flags = None | |
22 | try: | |
23 | for line in open("/proc/cpuinfo"): | |
24 | if cpu_model is None: | |
25 | if line.startswith("model name"): | |
26 | cpu_model = line.split(":",1)[1].strip() | |
27 | elif x86_flags is None: | |
28 | if line.startswith("flags"): | |
29 | x86_flags = line.split(":",1)[1].strip() | |
30 | else: | |
31 | break | |
32 | except IOError: | |
33 | pass | |
34 | if cpu_model is None or x86_flags is None: | |
35 | return False | |
36 | model = cpu_model.split() | |
37 | arch = os.uname()[4] | |
38 | ||
39 | if "sse2" in x86_flags: | |
40 | return True | |
41 | else: | |
42 | return False | |
43 | ||
44 | def configure(conf): | |
45 | conf.env['SSE2'] = append_sse_flags() | |
46 | pa = '.so' | |
47 | sub_file('./src/LV2/gxamp.lv2/manifest.ttl.in', './src/LV2/gxamp.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
48 | conf.sub_config('gxamp.lv2/StereoAmp'); | |
49 | sub_file('./src/LV2/gxamp.lv2/StereoAmp/manifest_stereo.ttl.in', './src/LV2/gxamp.lv2/StereoAmp/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
50 | conf.sub_config('gxts9.lv2'); | |
51 | sub_file('./src/LV2/gxts9.lv2/manifest.ttl.in', './src/LV2/gxts9.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
52 | conf.sub_config('gxbooster.lv2'); | |
53 | sub_file('./src/LV2/gxbooster.lv2/manifest.ttl.in', './src/LV2/gxbooster.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
54 | conf.sub_config('gxautowah.lv2'); | |
55 | sub_file('./src/LV2/gxautowah.lv2/manifest.ttl.in', './src/LV2/gxautowah.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
56 | ||
57 | def build(bld): | |
58 | bld.add_subdirs('gxamp.lv2') | |
59 | bld.add_subdirs('gxamp.lv2/StereoAmp') | |
60 | bld.add_subdirs('gxts9.lv2') | |
61 | bld.add_subdirs('gxbooster.lv2') | |
62 | bld.add_subdirs('gxautowah.lv2') | |
63 | ||
64 | gxlv2style_files = [ | |
65 | 'gxamp.lv2/GUI/amp21.png', | |
66 | 'gxamp.lv2/GUI/amp22.png', | |
67 | 'gxamp.lv2/GUI/amp23.png', | |
68 | 'gxamp.lv2/GUI/amp24.png', | |
69 | 'gxamp.lv2/GUI/amp25.png', | |
70 | 'gxamp.lv2/GUI/mastergain-label.png', | |
71 | 'gxamp.lv2/GUI/pregain-label.png', | |
72 | 'gxamp.lv2/GUI/drive-label.png', | |
73 | 'gxamp.lv2/GUI/distortion-label.png', | |
74 | 'gxamp.lv2/GUI/cabinet-label.png', | |
75 | 'gxamp.lv2/GUI/presence-label.png', | |
76 | 'gxamp.lv2/GUI/presence-label.png', | |
77 | 'gxamp.lv2/GUI/bass-label.png', | |
78 | 'gxamp.lv2/GUI/treble-label.png', | |
79 | 'gxamp.lv2/GUI/mid-label.png', | |
80 | 'gxamp.lv2/GUI/knob.png', | |
81 | 'gxamp.lv2/GUI/knob-middle.png', | |
82 | 'gxamp.lv2/GUI/knob-small.png', | |
83 | 'gxamp.lv2/GUI/metalic1-knob.png', | |
84 | 'gxamp.lv2/GUI/metalic1-knob-middle.png', | |
85 | 'gxamp.lv2/GUI/metalic1-knob-small.png', | |
86 | 'gxamp.lv2/GUI/black-knob.png', | |
87 | 'gxamp.lv2/GUI/black-knob-middle.png', | |
88 | 'gxamp.lv2/GUI/black-knob-small.png', | |
89 | 'gxamp.lv2/GUI/booster.png', | |
90 | 'gxamp.lv2/GUI/booster-knob.png', | |
91 | 'gxamp.lv2/GUI/ts9.png', | |
92 | 'gxamp.lv2/GUI/ts9-knob.png', | |
93 | 'gxamp.lv2/GUI/autowah.png', | |
94 | 'gxamp.lv2/GUI/wah.png', | |
95 | 'gxamp.lv2/GUI/wah-pedal.png', | |
96 | ] | |
97 | ||
98 | bld.install_files(bld.env['GX_LV2_STYLE_DIR'], gxlv2style_files, chmod=0o644) |
50 | 50 | linktask=self.link_task |
51 | 51 | self.latask=self.create_task('fakelibtool',linktask.outputs,linktask.outputs[0].change_ext('.la')) |
52 | 52 | if self.bld.is_install: |
53 | self.bld.install_files('${PREFIX}/lib',linktask.outputs[0],self.env) | |
53 | self.bld.install_files('${LIBDIR}',linktask.outputs[0],self.env) | |
54 | 54 | def apply_libtool(self): |
55 | 55 | self.env['vnum']=self.vnum |
56 | 56 | paths=[] |
100 | 100 | self.shouldnotlink=None |
101 | 101 | self.dlopen=None |
102 | 102 | self.dlpreopen=None |
103 | self.libdir='/usr/lib' | |
103 | self.libdir='${LIBDIR}' | |
104 | 104 | if not self.__parse(): |
105 | 105 | raise ValueError("file %s not found!!"%(la_filename)) |
106 | 106 | def __parse(self): |
50 | 50 | linktask=self.link_task |
51 | 51 | self.latask=self.create_task('fakelibtool',linktask.outputs,linktask.outputs[0].change_ext('.la')) |
52 | 52 | if self.bld.is_install: |
53 | self.bld.install_files('${PREFIX}/lib',linktask.outputs[0],self.env) | |
53 | self.bld.install_files('${LIBDIR}',linktask.outputs[0],self.env) | |
54 | 54 | def apply_libtool(self): |
55 | 55 | self.env['vnum']=self.vnum |
56 | 56 | paths=[] |
100 | 100 | self.shouldnotlink=None |
101 | 101 | self.dlopen=None |
102 | 102 | self.dlpreopen=None |
103 | self.libdir='/usr/lib' | |
103 | self.libdir='${LIBDIR}' | |
104 | 104 | if not self.__parse(): |
105 | 105 | raise ValueError("file %s not found!!"%(la_filename)) |
106 | 106 | def __parse(self): |
23 | 23 | use_2to3 = True |
24 | 24 | |
25 | 25 | # used by waf dist and waf build |
26 | VERSION='0.25.1' | |
26 | VERSION='0.25.2' | |
27 | 27 | APPNAME='guitarix' |
28 | 28 | |
29 | 29 | good_faust_versions = ['0.9.43','0.9.46'] |
120 | 120 | const=True, |
121 | 121 | help=("don't build with new ladspa plugins")) |
122 | 122 | |
123 | comp.add_option('--build-lv2', | |
124 | action='store_const', | |
125 | default=False, | |
126 | const=True, | |
127 | help=("build with new lv2 plugins")) | |
128 | ||
129 | 123 | faust = opt.add_option_group("Faust-Compiler") |
130 | 124 | |
131 | 125 | if len(good_faust_versions) == 1: |
158 | 152 | ladspa.add_option('--ladspadir', |
159 | 153 | type='string', |
160 | 154 | help='LADSPA plugin directory [Default: <prefix>/lib/ladspa]') |
155 | ||
156 | lv2 = opt.add_option_group("LV2 Options (installing LV2 modules)") | |
157 | ||
158 | lv2.add_option('--lv2dir', | |
159 | type='string', | |
160 | help='LV2 plugin directory [Default: <prefix>/lib/lv2]') | |
161 | ||
162 | lv2.add_option('--build-lv2', | |
163 | action='store_const', | |
164 | default=False, | |
165 | const=True, | |
166 | help=("build with new lv2 plugins")) | |
167 | ||
161 | 168 | |
162 | 169 | opt.recurse('pygxw') |
163 | 170 | opt.recurse('glade-gxw') |
548 | 555 | # defines for compilation |
549 | 556 | gxsharedir = os.path.normpath(os.path.join(conf.env['SHAREDIR'], 'gx_head')) |
550 | 557 | conf.define('GX_STYLE_DIR', os.path.join(gxsharedir,'skins')) |
558 | if opt.build_lv2: | |
559 | conf.define('GX_LV2_STYLE_DIR', os.path.join(conf.env['GX_STYLE_DIR'],'LV2')) | |
551 | 560 | conf.define('GX_FACTORY_DIR', os.path.join(gxsharedir,'factorysettings')) |
552 | 561 | conf.define('GX_SOUND_DIR', os.path.join(gxsharedir,'sounds')) |
553 | 562 | conf.define('GX_BUILDER_DIR', os.path.join(gxsharedir,'builder')) |
569 | 578 | |
570 | 579 | conf.env['LV2'] = opt.build_lv2 |
571 | 580 | if opt.build_lv2: |
572 | conf.define('LV2DIR', os.path.normpath(os.path.join(conf.env['LIBDIR'], 'lv2')) ) | |
573 | ||
581 | if opt.lv2dir: | |
582 | conf.define('LV2DIR', opt.lv2dir) | |
583 | else: | |
584 | conf.define('LV2DIR', os.path.normpath(os.path.join(conf.env['LIBDIR'], 'lv2')) ) | |
574 | 585 | |
575 | 586 | conf.env['NEW_LADSPA'] = not opt.no_ladspa and not opt.no_new_ladspa |
576 | 587 | conf.env['LADSPA'] = not opt.no_ladspa |
607 | 618 | conf.sub_config('ladspa'); |
608 | 619 | if conf.env["LV2"]: |
609 | 620 | opt.shared_lib = True; |
610 | conf.sub_config('src/LV2/gxamp.lv2'); | |
611 | pa = '.so' | |
612 | sub_file('./src/LV2/gxamp.lv2/manifest.ttl.in', './src/LV2/gxamp.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
613 | conf.sub_config('src/LV2/gxamp.lv2/StereoAmp'); | |
614 | sub_file('./src/LV2/gxamp.lv2/StereoAmp/manifest_stereo.ttl.in', './src/LV2/gxamp.lv2/StereoAmp/manifest.ttl', (('@LIB_EXT@', '%s' % pa), )) | |
621 | conf.sub_config('src/LV2'); | |
615 | 622 | |
616 | 623 | # config subdirs |
617 | 624 | conf.sub_config('pygxw'); |
623 | 630 | if conf.env["GX_LIB_DEV"]: |
624 | 631 | pa = conf.env['PREFIX'] |
625 | 632 | sub_file('./libgxw/gxw.pc.in', './libgxw/gxw.pc', (('prefix=/path', 'prefix=%s' % pa), )) |
633 | sub_file('./libgxw/gxw.pc', './libgxw/gxw.pc', (('libdir=/path','libdir=%s' % conf.env['LIBDIR']), )) | |
626 | 634 | sub_file('./libgxwmm/gxwmm.pc.in', './libgxwmm/gxwmm.pc', (('prefix=/path', 'prefix=%s' % pa), )) |
635 | sub_file('./libgxwmm/gxwmm.pc', './libgxwmm/gxwmm.pc', (('libdir=/path','libdir=%s' % conf.env['LIBDIR']), )) | |
627 | 636 | |
628 | 637 | |
629 | 638 | # some output |
649 | 658 | display_feature("Use internal zita-convolver", not conf.env['ZITA_CONVOLVER']) |
650 | 659 | display_feature("Jack Session Support", conf.env['HAVE_JACK_SESSION']) |
651 | 660 | |
652 | ||
653 | 661 | display_feature("build ladspa plugins", conf.env['LADSPA']) |
654 | 662 | display_feature("build lv2 plugins", conf.env['LV2']) |
663 | if opt.build_lv2: | |
664 | display_feature("SSE2 support found", conf.env['SSE2']) | |
655 | 665 | display_feature("skip Python Library Wrapper", not conf.env['GX_PYTHON_WRAPPER']) |
656 | 666 | display_feature("use prebuild C++ Library Wrapper", conf.env['USE_GENERATED_CPP']) |
657 | 667 | display_feature("skip building shared lib", not conf.env['GX_LIB_SHARED']) |
706 | 716 | if bld.env["NEW_LADSPA"]: |
707 | 717 | bld.add_subdirs('src/ladspa') |
708 | 718 | if bld.env["LV2"]: |
709 | bld.add_subdirs('src/LV2/gxamp.lv2') | |
710 | bld.add_subdirs('src/LV2/gxamp.lv2/StereoAmp') | |
711 | ||
719 | bld.add_subdirs('src/LV2') | |
720 | ||
712 | 721 | bld.install_files(bld.env['DESKAPPS_DIR'], 'guitarix.desktop', chmod=0o644) |
713 | 722 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/dirlist.js', chmod=0o664) |
714 | 723 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/funkmuscle.gx', chmod=0o664) |
716 | 725 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/zettberlin.gx', chmod=0o664) |
717 | 726 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/autoandimat.gx', chmod=0o664) |
718 | 727 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/jp_n_o_s.gx', chmod=0o664) |
728 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/kokoko3k.gx', chmod=0o664) | |
719 | 729 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/univibe', chmod=0o664) |
720 | 730 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/univibe_mono', chmod=0o664) |
721 | 731 | bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/flanger_mono_gx', chmod=0o664) |
753 | 763 | if bld.env["GX_LIB_DEV"]: |
754 | 764 | bld.install_files('${PREFIX}/include/gxw','libgxw/gxw/*.h') |
755 | 765 | bld.install_files('${PREFIX}/include','libgxw/gxw.h') |
756 | bld.install_files('${PREFIX}/lib/pkgconfig', './libgxw/gxw.pc') | |
766 | bld.install_files('${LIBDIR}/pkgconfig', './libgxw/gxw.pc') | |
757 | 767 | bld.install_files('${PREFIX}/include/gxwmm','libgxwmm/gxwmm-generated/*.h') |
758 | 768 | bld.install_files('${PREFIX}/include/gxwmm','libgxwmm/gxwmm/*.h') |
759 | 769 | bld.install_files('${PREFIX}/include','libgxwmm/gxwmm.h') |
760 | bld.install_files('${PREFIX}/lib/pkgconfig', './libgxwmm/gxwmm.pc') | |
770 | bld.install_files('${LIBDIR}/pkgconfig', './libgxwmm/gxwmm.pc') | |
761 | 771 | |
762 | 772 | ################################################################ |
763 | 773 | # other commands |