[SCM] calf/master: + MultiChorus: add inter-voice phase parameter, adjust default parameter values to give more noticable effect

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:37:48 UTC 2013


The following commit has been merged in the master branch:
commit 8300a0d7331ecd506408def09026fdc8eaeaad2a
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Tue Oct 28 20:26:01 2008 +0000

    + MultiChorus: add inter-voice phase parameter, adjust default parameter values to give more noticable effect

diff --git a/src/calf/modules.h b/src/calf/modules.h
index 53583ac..2c42203 100644
--- a/src/calf/modules.h
+++ b/src/calf/modules.h
@@ -781,7 +781,7 @@ public:
 class multichorus_audio_module: public null_audio_module
 {
 public:    
-    enum { par_delay, par_depth, par_rate, par_stereo, par_amount, param_count };
+    enum { par_delay, par_depth, par_rate, par_stereo, par_vphase, par_amount, param_count };
     enum { in_count = 2, out_count = 2, rt_capable = true, support_midi = false };
     float *ins[in_count]; 
     float *outs[out_count];
@@ -811,6 +811,8 @@ public:
         left.set_rate(rate); right.set_rate(rate);
         left.set_min_delay(min_delay); right.set_min_delay(min_delay);
         left.set_mod_depth(mod_depth); right.set_mod_depth(mod_depth);
+        float vphase = *params[par_vphase] * (1.f / 360.f);
+        left.lfo.vphase = right.lfo.vphase = vphase * 4096;
         float r_phase = *params[par_stereo] * (1.f / 360.f);
         if (fabs(r_phase - last_r_phase) > 0.0001f) {
             right.lfo.phase = left.lfo.phase;
diff --git a/src/calf/multichorus.h b/src/calf/multichorus.h
index e5b7ef7..f133265 100644
--- a/src/calf/multichorus.h
+++ b/src/calf/multichorus.h
@@ -39,8 +39,14 @@ public:
     chorus_phase phase;
     /// LFO phase increment
     chorus_phase dphase;
+    /// LFO phase per-voice increment
+    chorus_phase vphase;
 
 public:
+    sine_multi_lfo()
+    {
+        phase = dphase = vphase = 0.0;
+    }
     inline uint32_t get_voices() const
     {
         return Voices;
@@ -48,7 +54,7 @@ public:
     /// Get LFO value for given voice, returns a values in range of [-65536, 65536]
     inline int get_value(uint32_t voice) {
         // find this voice's phase (= phase + voice * 360 degrees / number of voices)
-        chorus_phase voice_phase = phase + chorus_phase::from_base(Multiplier * voice);
+        chorus_phase voice_phase = phase + vphase * (int)voice;
         // find table offset
         unsigned int ipart = voice_phase.ipart();
         // interpolate (use 14 bits of precision - because the table itself uses 18 bits and the result of multiplication must fit in int32_t)
diff --git a/src/modules.cpp b/src/modules.cpp
index 41125d8..9b4d752 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -167,9 +167,10 @@ const char *multichorus_audio_module::port_names[] = {"In L", "In R", "Out L", "
 
 parameter_properties multichorus_audio_module::param_props[] = {
     { 0.1,      0.1, 10,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "min_delay", "Minimum delay" },
-    { 0.5,      0.1, 10,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "mod_depth", "Modulation depth" },
+    { 3,        0.1, 10,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "mod_depth", "Modulation depth" },
     { 0.25,    0.01, 20,    0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "mod_rate", "Modulation rate" },
-    { 0,          0, 360,   9, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "stereo", "Stereo phase" },
+    { 180,        0, 360,   9, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "stereo", "Stereo phase" },
+    { 32,         0, 360,  91, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "vphase", "Inter-voice phase" },
     { 1,          0, 2,     0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "amount", "Amount" },
 };
 

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list