From 5aa154aeb1dbe0694d6c01e405e7bfa3689f33cc Mon Sep 17 00:00:00 2001 From: Krzysztof Foltman Date: Mon, 9 Nov 2009 21:47:03 +0000 Subject: [PATCH 1/4] + Framework: placeholder for waveshaper class (need it to merge further changes from Markus) (cherry picked from commit d48420ce85389af6d20623af83ca20082f1cdcaa) --- plugins/ladspa_effect/calf/calf/waveshaping.h | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/ladspa_effect/calf/calf/waveshaping.h diff --git a/plugins/ladspa_effect/calf/calf/waveshaping.h b/plugins/ladspa_effect/calf/calf/waveshaping.h new file mode 100644 index 000000000..914637c0a --- /dev/null +++ b/plugins/ladspa_effect/calf/calf/waveshaping.h @@ -0,0 +1,37 @@ +/* Calf DSP Library + * Placeholder for waveshaping classes + * + * Copyright (C) 2001-2009 Krzysztof Foltman + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02111-1307, USA. + */ +#ifndef __CALF_WAVESHAPING_H +#define __CALF_WAVESHAPING_H + +/// This will be a waveshaper... when I'll code it (-: +/// (or get Tom Szlagyi's permission to use his own) +class waveshaper { +public: + waveshaper(); + void activate() {} + void deactivate() {} + void set_params(float blend, float drive) {} + void set_sample_rate(uint32_t sr) {} + float process(float in) { return in; } + float get_distortion_level() { return 1; } +}; + +#endif From 40015f001d587716cab16537834409305bb4ccfd Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Mon, 9 Nov 2009 22:01:52 +0000 Subject: [PATCH 2/4] + Gain reduction module: clearer authorship information (cherry picked from commit 55a1aeaf25dd5716d8adfc3322e3a2a00f5caa8f) --- plugins/ladspa_effect/calf/src/modules_dsp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ladspa_effect/calf/src/modules_dsp.cpp b/plugins/ladspa_effect/calf/src/modules_dsp.cpp index 452844ea1..c23bfa4c6 100644 --- a/plugins/ladspa_effect/calf/src/modules_dsp.cpp +++ b/plugins/ladspa_effect/calf/src/modules_dsp.cpp @@ -1640,10 +1640,10 @@ int deesser_audio_module::get_changed_offsets(int index, int generation, int &su return false; } -/// Gain reduction module implemented by Markus Schmidt -/// Nearly all functions of this module are originally written +/// Gain reduction module by Thor +/// All functions of this module are originally written /// by Thor, while some features have been stripped (mainly stereo linking -/// and frequency correction as implemented in his Compressor above) +/// and frequency correction as implemented in Sidechain Compressor above) /// To save some CPU. //////////////////////////////////////////////////////////////////////////////// gain_reduction_audio_module::gain_reduction_audio_module() From 7d92ad6ac70ca570ada7355cb0b84f19bd391027 Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Mon, 9 Nov 2009 22:06:37 +0000 Subject: [PATCH 3/4] + Equalizer: remove unused variables (cherry picked from commit a45db777d5b645a0ce8add2c88d2f3c8940862f3) --- plugins/ladspa_effect/calf/calf/modules.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/ladspa_effect/calf/calf/modules.h b/plugins/ladspa_effect/calf/calf/modules.h index 19075725d..e8c4a5e22 100644 --- a/plugins/ladspa_effect/calf/calf/modules.h +++ b/plugins/ladspa_effect/calf/calf/modules.h @@ -1267,13 +1267,9 @@ public: /// Equalizer 5 Band by Markus Schmidt (based on Krzysztof's filters) class equalizer5band_audio_module: public audio_module, public frequency_response_line_graph { private: - float hp_mode_old, hp_freq_old; - float lp_mode_old, lp_freq_old; float ls_level_old, ls_freq_old; float hs_level_old, hs_freq_old; float p_level_old[3], p_freq_old[3], p_q_old[3]; - float hp_mode_old1, hp_freq_old1, hp_active_old1; - float lp_mode_old1, lp_freq_old1, lp_active_old1; float ls_level_old1, ls_freq_old1, ls_active_old1; float hs_level_old1, hs_freq_old1, hs_active_old1; float p_level_old1[3], p_freq_old1[3], p_q_old1[3], p_active_old1[3]; From 3a046201ba2ae50b7183c68cbe52b03500ef39d1 Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Mon, 9 Nov 2009 22:12:31 +0000 Subject: [PATCH 4/4] + Deesser: use correct threshold (cherry picked from commit beefb7c7f7d8cda828c801942d4daad34d7191ed) --- plugins/ladspa_effect/calf/src/modules_dsp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ladspa_effect/calf/src/modules_dsp.cpp b/plugins/ladspa_effect/calf/src/modules_dsp.cpp index c23bfa4c6..5258c0475 100644 --- a/plugins/ladspa_effect/calf/src/modules_dsp.cpp +++ b/plugins/ladspa_effect/calf/src/modules_dsp.cpp @@ -1543,7 +1543,7 @@ uint32_t deesser_audio_module::process(uint32_t offset, uint32_t numsamples, uin outs[0][offset] = outL; outs[1][offset] = outR; - if(std::max(fabs(leftSC), fabs(rightSC)) > 0.1) { + if(std::max(fabs(leftSC), fabs(rightSC)) > *params[param_threshold]) { detected_led = srate >> 3; } if(std::max(fabs(leftAC), fabs(rightAC)) > 1.f) {