[SCM] calf/master: + Multichorus: add rudimentary LFO phase display to Multichorus

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


The following commit has been merged in the master branch:
commit fe3370163dba1aab2a62a0eb68c7fe0192babdf1
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Wed Oct 29 23:16:59 2008 +0000

    + Multichorus: add rudimentary LFO phase display to Multichorus

diff --git a/src/calf/modules.h b/src/calf/modules.h
index 11fc957..aa6fba9 100644
--- a/src/calf/modules.h
+++ b/src/calf/modules.h
@@ -774,7 +774,7 @@ public:
 class multichorus_audio_module: public null_audio_module
 {
 public:    
-    enum { par_delay, par_depth, par_rate, par_stereo, par_voices, par_vphase, par_amount, param_count };
+    enum { par_delay, par_depth, par_rate, par_stereo, par_voices, par_vphase, par_amount, par_lfophase_l, par_lfophase_r, param_count };
     enum { in_count = 2, out_count = 2, rt_capable = true, support_midi = false };
     float *ins[in_count]; 
     float *outs[out_count];
@@ -826,6 +826,10 @@ public:
     uint32_t process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask) {
         left.process(outs[0] + offset, ins[0] + offset, numsamples);
         right.process(outs[1] + offset, ins[1] + offset, numsamples);
+        if (params[par_lfophase_l])
+            *params[par_lfophase_l] = (double)left.lfo.phase * 360.0 / 4096.0;
+        if (params[par_lfophase_r])
+            *params[par_lfophase_r] = (double)right.lfo.phase * 360.0 / 4096.0;
         return outputs_mask; // XXXKF allow some delay after input going blank
     }
     PLUGIN_NAME_ID_LABEL("multichorus", "multichorus", "Multi Chorus")
diff --git a/src/modules.cpp b/src/modules.cpp
index 2ca0582..45bccef 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -165,6 +165,8 @@ parameter_properties multichorus_audio_module::param_props[] = {
     { 4,          1,   8,   8, PF_INT | PF_SCALE_LINEAR | PF_CTL_FADER, NULL, "voices", "Voices"},
     { 64,         0, 360,  91, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG, NULL, "vphase", "Inter-voice phase" },
     { 2,          0,   4,   0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF | PF_PROP_NOBOUNDS, NULL, "amount", "Amount" },
+    { 180,        0, 360,  91, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "lfo_phase_l", "Left LFO phase" },
+    { 180,        0, 360,  91, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_DEG | PF_PROP_OUTPUT | PF_PROP_OPTIONAL, NULL, "lfo_phase_r", "Right LFO phase" },
 };
 
 synth::ladspa_plugin_info multichorus_audio_module::plugin_info = { 0x8501, "MultiChorus", "Calf MultiChorus", "Krzysztof Foltman", synth::calf_copyright_info, "ChorusPlugin" };

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list