[SCM] calf/master: + Monosynth: use old PW offset for PW interpolation

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


The following commit has been merged in the master branch:
commit 38e118c91b8972df79a28071f71de082f9e5cee6
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Sun Mar 22 17:59:35 2009 +0000

    + Monosynth: use old PW offset for PW interpolation

diff --git a/src/calf/modules_synths.h b/src/calf/modules_synths.h
index bae680f..cc76545 100644
--- a/src/calf/modules_synths.h
+++ b/src/calf/modules_synths.h
@@ -59,6 +59,7 @@ public:
     float freq, start_freq, target_freq, cutoff, decay_factor, fgain, fgain_delta, separation;
     float detune, xpose, xfade, ampctl, fltctl, queue_vel;
     float odcr, porta_time, lfo_bend, lfo_clock, last_lfov, modwheel_value;
+    float last_pwoffset1, last_pwoffset2;
     int queue_note_on, stop_count, modwheel_value_int;
     int legato;
     dsp::adsr envelope;
diff --git a/src/monosynth.cpp b/src/monosynth.cpp
index a878719..47f059e 100644
--- a/src/monosynth.cpp
+++ b/src/monosynth.cpp
@@ -228,14 +228,17 @@ bool monosynth_audio_module::get_graph(int index, int subindex, float *data, int
 
 void monosynth_audio_module::calculate_buffer_oscs(float lfo)
 {
-    int32_t shift1 = (int32_t)(0x78000000 * dsp::clip11(*params[par_pw1] + last_lfov * *params[par_lfopw]));
-    int32_t shift2 = (int32_t)(0x78000000 * dsp::clip11(*params[par_pw2] + last_lfov * *params[par_lfopw]));
+    int32_t shift1 = (int32_t)(0x78000000 * dsp::clip11(last_pwoffset1 + last_lfov * *params[par_lfopw]));
+    int32_t shift2 = (int32_t)(0x78000000 * dsp::clip11(last_pwoffset2 + last_lfov * *params[par_lfopw]));
     int flag1 = (wave1 == wave_sqr);
     int flag2 = (wave2 == wave_sqr);
     int32_t shift_target1 = (int32_t)(0x78000000 * dsp::clip11(*params[par_pw1] + lfo * *params[par_lfopw]));
     int32_t shift_target2 = (int32_t)(0x78000000 * dsp::clip11(*params[par_pw2] + lfo * *params[par_lfopw]));
     int32_t shift_delta1 = (shift_target1 - shift1) >> step_shift;
     int32_t shift_delta2 = (shift_target2 - shift2) >> step_shift;
+    last_lfov = lfo;
+    last_pwoffset1 = *params[par_pw1];
+    last_pwoffset2 = *params[par_pw2];
     
     shift1 += (flag1 << 31);
     shift2 += (flag2 << 31);
@@ -250,7 +253,6 @@ void monosynth_audio_module::calculate_buffer_oscs(float lfo)
         shift1 += shift_delta1;
         shift2 += shift_delta2;
     }
-    last_lfov = lfo;
 }
 
 void monosynth_audio_module::calculate_buffer_ser()

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list