[SCM] calf/master: + Filterclavier: *corrected symbols for bandpass filter modes / introduced them into modules.cpp + Filter: enabled bandpasses for filter / introduced symbols to modules.cpp

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:02 UTC 2013


The following commit has been merged in the master branch:
commit 02f3b8c85a466c7a38a651a566f7a425705eb62c
Author: Hans Baier <hansfbaier at googlemail.com>
Date:   Fri Jan 23 10:13:03 2009 +0700

    + Filterclavier: *corrected symbols for bandpass filter modes / introduced them into modules.cpp
    + Filter: enabled bandpasses for filter / introduced symbols to modules.cpp

diff --git a/src/calf/audio_fx.h b/src/calf/audio_fx.h
index 7bcfa01..4a2b03d 100644
--- a/src/calf/audio_fx.h
+++ b/src/calf/audio_fx.h
@@ -618,7 +618,7 @@ public:
     
     enum { mode_12db_lp = 0, mode_24db_lp = 1, mode_36db_lp = 2, 
            mode_12db_hp = 3, mode_24db_hp = 4, mode_36db_hp = 5,
-           mode_12db_bp = 6, mode_24db_bp = 7, mode_36db_bp = 8,
+           mode_6db_bp  = 6, mode_12db_bp = 7, mode_18db_bp = 8,
            mode_count = 9
     };
     
diff --git a/src/calf/modules_dev.h b/src/calf/modules_dev.h
index f9162c5..5d595f8 100644
--- a/src/calf/modules_dev.h
+++ b/src/calf/modules_dev.h
@@ -85,14 +85,14 @@ class filterclavier_audio_module:
             
             int   mode = dsp::fastf2i_drm(*params[par_mode]);
             // for bandpasses: boost gain for velocities > 0
-            if ( (mode_12db_bp <= mode) && (mode <= mode_36db_bp) ) {
+            if ( (mode_6db_bp <= mode) && (mode <= mode_18db_bp) ) {
                 // gain for velocity 0:   1.0
                 // gain for velocity 127: 32.0
                 float mode_max_gain = max_gain;
-                // max_gain is right for mode_12db_bp
-                if (mode == mode_24db_bp)
+                // max_gain is right for mode_6db_bp
+                if (mode == mode_12db_bp)
                     mode_max_gain /= 6.0;
-                if (mode == mode_36db_bp)
+                if (mode == mode_18db_bp)
                     mode_max_gain /= 10.5;
                 
                 inertia_filter_module::inertia_gain.set_inertia(
diff --git a/src/modules.cpp b/src/modules.cpp
index f2678fe..0836f3a 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -26,6 +26,7 @@
 #endif
 #include <calf/giface.h>
 #include <calf/metadata.h>
+#include <calf/audio_fx.h>
 
 using namespace dsp;
 using namespace calf_plugins;
@@ -98,12 +99,18 @@ const char *filter_choices[] = {
     "12dB/oct Highpass",
     "24dB/oct Highpass",
     "36dB/oct Highpass",
+    "6dB/oct Bandpass",
+    "12dB/oct Bandpass",
+    "18dB/oct Bandpass",
 };
 
 CALF_PORT_PROPS(filter) = {
     { 2000,      10,20000,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ | PF_PROP_GRAPH, NULL, "freq", "Frequency" },
     { 0.707,  0.707,   32,    0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "res", "Resonance" },
-    { 0,          0,    5,    1, PF_ENUM | PF_CTL_COMBO, filter_choices, "mode", "Mode" },
+    { biquad_filter_module::mode_12db_lp,
+      biquad_filter_module::mode_12db_lp,
+      biquad_filter_module::mode_count - 1,
+                                1,  PF_ENUM | PF_CTL_COMBO, filter_choices, "mode", "Mode" },
     { 20,         5,  100,    20, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "inertia", "Inertia"},
 };
 
@@ -111,6 +118,7 @@ CALF_PLUGIN_INFO(filter) = { 0x847f, "Filter", "Calf Filter", "Krzysztof Foltman
 
 ////////////////////////////////////////////////////////////////////////////
 
+#if ENABLE_EXPERIMENTAL
 CALF_PORT_NAMES(filterclavier) = {"In L", "In R", "Out L", "Out R"};
 
 const char *filterclavier_choices[] = {
@@ -120,20 +128,23 @@ const char *filterclavier_choices[] = {
     "12dB/oct Highpass",
     "24dB/oct Highpass",
     "36dB/oct Highpass",
-    "12dB/oct Bandpass", // TODO: are we lying here?
-    "24dB/oct Bandpass", // TODO: are we lying here?
-    "36dB/oct Bandpass", // TODO: are we lying here?
+    "6dB/oct Bandpass",
+    "12dB/oct Bandpass",
+    "18dB/oct Bandpass",
 };
 
 CALF_PORT_PROPS(filterclavier) = {
     { 0,        -48,   48, 48*2+1, PF_INT   | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_SEMITONES, NULL, "transpose", "Transpose" },
     { 0,       -100,  100,      0, PF_INT   | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL, "detune", "Detune" },
-    { 6,          0,    8,      1, PF_ENUM  | PF_CTL_COMBO, filterclavier_choices, "mode", "Mode" },
+    { biquad_filter_module::mode_6db_bp, 
+      biquad_filter_module::mode_12db_lp,
+      biquad_filter_module::mode_count - 1,
+                                1, PF_ENUM  | PF_CTL_COMBO, filterclavier_choices, "mode", "Mode" },
     { 20,         1,  2000,    20, PF_FLOAT | PF_SCALE_LOG    | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "inertia", "Portamento time"}
 };
 
 CALF_PLUGIN_INFO(filterclavier) = { 0x849f, "Filterclavier", "Calf Filterclavier", "Krzysztof Foltman / Hans Baier", calf_plugins::calf_copyright_info, "FilterclavierPlugin" };
-
+#endif
 ////////////////////////////////////////////////////////////////////////////
 
 CALF_PORT_NAMES(vintage_delay) = {"In L", "In R", "Out L", "Out R"};

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list