[SCM] calf/master: + monosynth: newly introduced click bug is no more (hopefully) + monosynth: changed default preset + monosynth: added fingered portamento + monosynth: env-to-resonance uses squared envelope value to control resonance

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:36:45 UTC 2013


The following commit has been merged in the master branch:
commit dbbb2f3070afdfb37c98f6febdbe9e318ac67549
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Sat Dec 15 11:46:35 2007 +0000

    + monosynth: newly introduced click bug is no more (hopefully)
    + monosynth: changed default preset
    + monosynth: added fingered portamento
    + monosynth: env-to-resonance uses squared envelope value to control resonance
    
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@22 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/src/calf/modules_dev.h b/src/calf/modules_dev.h
index 0928d8f..037d2a2 100644
--- a/src/calf/modules_dev.h
+++ b/src/calf/modules_dev.h
@@ -63,7 +63,7 @@ public:
     float detune, xpose, xfade, pitchbend, ampctl, fltctl, queue_vel;
     float odcr, porta_time;
     int queue_note_on;
-    bool legato;
+    int legato;
     adsr envelope;
     
     static parameter_properties param_props[];
@@ -83,8 +83,10 @@ public:
         osc1.waveform = waves[wave1].get_level(osc1.phasedelta);
         osc2.waveform = waves[wave2].get_level(osc2.phasedelta);
         
-        if (!running || envelope.released())
+        if (!running)
         {
+            if (legato >= 2)
+                porta_time = -1.f;
             osc1.reset();
             osc2.reset();
             filter.reset();
@@ -115,10 +117,13 @@ public:
             envelope.note_on();
             running = true;
         }
+        if (legato >= 2 && !gate)
+            porta_time = -1.f;
         gate = true;
         stopping = false;
-        if (!legato)
+        if (!(legato & 1) || envelope.released()) {
             envelope.note_on();
+        }
         queue_note_on = -1;
     }
     void note_on(int note, int vel)
@@ -154,7 +159,7 @@ public:
         detune = pow(2.0, *params[par_detune] / 1200.0);
         xpose = pow(2.0, *params[par_osc2xpose] / 12.0);
         xfade = *params[par_oscmix];
-        legato = *params[par_legato] >= 0.5f;
+        legato = dsp::fastf2i_drm(*params[par_legato]);
         set_frequency();
     }
     void activate() {
@@ -281,7 +286,7 @@ public:
         cutoff = dsp::clip(cutoff , 10.f, 18000.f);
         float resonance = *params[par_resonance];
         float e2r = *params[par_envtores];
-        resonance = resonance * (1 - e2r) + (0.7 + (resonance - 0.7) * env) * e2r;
+        resonance = resonance * (1 - e2r) + (0.7 + (resonance - 0.7) * env * env) * e2r;
         float cutoff2 = dsp::clip(cutoff * separation, 10.f, 18000.f);
         switch(filter_type)
         {
diff --git a/src/modules.cpp b/src/modules.cpp
index f4ae503..13a0fe5 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -150,6 +150,7 @@ const char *monosynth_audio_module::param_names[] = {
 
 const char *monosynth_waveform_names[] = { "Sawtooth", "Square", "Pulse", "Sine", "Triangle" };
 const char *monosynth_mode_names[] = { "0 : 0", "0 : 180", "0 : 90", "90 : 90", "90 : 270", "Random" };
+const char *monosynth_legato_names[] = { "Retrig", "Legato", "Fng Retrig", "Fng Legato" };
 
 const char *monosynth_filter_choices[] = {
     "12dB/oct Lowpass",
@@ -163,30 +164,30 @@ const char *monosynth_filter_choices[] = {
 };
 
 parameter_properties monosynth_audio_module::param_props[] = {
-    { wave_saw,         0,wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names },
-    { wave_pulse,         0,wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names },
+    { wave_saw,         0, wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names },
+    { wave_sqr,         0, wave_count - 1, 1, PF_ENUM | PF_CTL_COMBO, monosynth_waveform_names },
     { 10,         0,  100, 1.01, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL },
     { 12,       -24,   24, 1.01, PF_INT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_SEMITONES, NULL },
     { 0,          0,    5, 1.01, PF_ENUM | PF_CTL_COMBO, monosynth_mode_names },
     { 0.5,        0,    1, 1.01, PF_FLOAT | PF_SCALE_PERC, NULL },
-    { 0,          0,    7, 1.01, PF_ENUM | PF_CTL_COMBO, monosynth_filter_choices },
+    { 1,          0,    7, 1.01, PF_ENUM | PF_CTL_COMBO, monosynth_filter_choices },
     { 33,        10,16000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL },
     { 2,        0.7,    8, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB, NULL },
     { 0,      -2400, 2400, 1.01, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL },
     { 8000,  -10800,10800, 1.01, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB | PF_UNIT_CENTS, NULL },
-    { 0.5,        0,    1, 1.01, PF_FLOAT | PF_SCALE_LINEAR | PF_CTL_KNOB, NULL },
+    { 1,          0,    1, 1.01, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL },
     
-    { 10,         1,20000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL },
+    { 1,          1,20000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL },
     { 350,       10,20000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL },
     { 0.5,        0,    1, 1.01, PF_FLOAT | PF_SCALE_PERC, NULL },
-    { 350,       10,20000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL },
+    { 50,       10,20000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL },
     
     { 0,          0,    1, 1.01, PF_BOOL | PF_CTL_TOGGLE, NULL },
-    { 0,          0,    1, 1.01, PF_BOOL | PF_CTL_TOGGLE, NULL },
+    { 0,          0,    3, 1.01, PF_ENUM | PF_CTL_COMBO, monosynth_legato_names },
     { 1,          1, 2000, 1.01, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL },
     
     { 0,          0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL },
-    { 0,          0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL },
+    { 0.5,        0,    1,  0.1, PF_FLOAT | PF_SCALE_PERC | PF_CTL_KNOB, NULL },
 };
 
 static synth::ladspa_info monosynth_info = { 0x8480, "Monosynth", "Calf Monosynth", "Krzysztof Foltman", copyright, "SynthesizerPlugin" };

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list