~ubuntu-branches/ubuntu/trusty/lmms/trusty

« back to all changes in this revision

Viewing changes to plugins/ladspa_effect/caps/Chorus.cc

  • Committer: Charlie Smotherman
  • Date: 2012-12-05 22:08:38 UTC
  • mfrom: (33.1.7 lmms_0.4.13)
  • Revision ID: cjsmo@cableone.net-20121205220838-09pjfzew9m5023hr
* New  Upstream release.
  - Minor tweaking to ZynAddSubFX, CALF, SWH plugins  and Stefan Fendt's RC
    filters.
  - Added UI fixes: Magnentic effect of knobs and Piano-roll fixes
  - Updated German localization and copyright year
* debian/lmms-common.install:
  - added /usr/share/applications so the lmms.desktop file will correctly
    install (LP: #863366)
  - This should also fix the Software Center not displaying lmms in sound
    and video (LP: #824231)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
void
35
35
ChorusI::one_cycle (int frames)
36
36
{
37
 
        d_sample * s = ports[0];
 
37
        sample_t * s = ports[0];
38
38
 
39
39
        double one_over_n = 1 / (double) frames;
40
40
        double ms = .001 * fs;
56
56
        double ff = getport(5);
57
57
        double fb = getport(6);
58
58
 
59
 
        d_sample * d = ports[7];
 
59
        sample_t * d = ports[7];
60
60
 
61
61
        DSP::FPTruncateMode truncate;
62
62
 
63
63
        for (int i = 0; i < frames; ++i)
64
64
        {
65
 
                d_sample x = s[i];
 
65
                sample_t x = s[i];
66
66
 
67
67
                /* truncate the feedback tap to integer, better quality for less
68
68
                 * cycles (just a bit of zipper when changing 't', but it does sound
153
153
void
154
154
StereoChorusI::one_cycle (int frames)
155
155
{
156
 
        d_sample * s = ports[0];
 
156
        sample_t * s = ports[0];
157
157
 
158
158
        double one_over_n = 1 / (double) frames;
159
159
        double ms = .001 * fs;
181
181
        double ff = getport(6);
182
182
        double fb = getport(7);
183
183
 
184
 
        d_sample * dl = ports[8];
185
 
        d_sample * dr = ports[9];
 
184
        sample_t * dl = ports[8];
 
185
        sample_t * dr = ports[9];
186
186
 
187
187
        /* to go sure (on i386) that the fistp instruction does the right thing 
188
188
         * when looking up fractional sample indices */
190
190
 
191
191
        for (int i = 0; i < frames; ++i)
192
192
        {
193
 
                d_sample x = s[i];
 
193
                sample_t x = s[i];
194
194
 
195
195
                /* truncate the feedback tap to integer, better quality for less
196
196
                 * cycles (just a bit of zipper when changing 't', but it does sound
201
201
 
202
202
                delay.put (x + normal);
203
203
 
204
 
                d_sample l = blend * x + ff * delay.get_cubic (t + w * left.lfo.get());
205
 
                d_sample r = blend * x + ff * delay.get_cubic (t + w * right.lfo.get());
 
204
                sample_t l = blend * x + ff * delay.get_cubic (t + w * left.lfo.get());
 
205
                sample_t r = blend * x + ff * delay.get_cubic (t + w * right.lfo.get());
206
206
 
207
207
                F (dl, i, l, adding_gain);
208
208
                F (dr, i, r, adding_gain);
281
281
void
282
282
ChorusII::one_cycle (int frames)
283
283
{
284
 
        d_sample * s = ports[0];
 
284
        sample_t * s = ports[0];
285
285
 
286
286
        double one_over_n = 1 / (double) frames;
287
287
        double ms = .001 * fs;
303
303
        double ff = getport(5);
304
304
        double fb = getport(6);
305
305
 
306
 
        d_sample * d = ports[7];
 
306
        sample_t * d = ports[7];
307
307
 
308
308
        DSP::FPTruncateMode truncate;
309
309
 
310
310
        for (int i = 0; i < frames; ++i)
311
311
        {
312
 
                d_sample x = s[i];
 
312
                sample_t x = s[i];
313
313
 
314
314
                x -= fb * delay.get_cubic (t);
315
315
 
389
389
void
390
390
StereoChorusII::one_cycle (int frames)
391
391
{
392
 
        d_sample * s = ports[0];
 
392
        sample_t * s = ports[0];
393
393
 
394
394
        double one_over_n = 1 / (double) frames;
395
395
        double ms = .001 * fs;
410
410
        double ff = getport(5);
411
411
        double fb = getport(6);
412
412
 
413
 
        d_sample * dl = ports[7];
414
 
        d_sample * dr = ports[8];
 
413
        sample_t * dl = ports[7];
 
414
        sample_t * dr = ports[8];
415
415
 
416
416
        /* to go sure (on i386) that the fistp instruction does the right thing 
417
417
         * when looking up fractional sample indices */
419
419
 
420
420
        for (int i = 0; i < frames; ++i)
421
421
        {
422
 
                d_sample x = s[i];
 
422
                sample_t x = s[i];
423
423
 
424
424
                /* truncate the feedback tap to integer, better quality for less
425
425
                 * cycles (just a bit of zipper when changing 't', but it does sound
432
432
 
433
433
                double m;
434
434
                m = left.lfo_lp.process (left.fractal.get());
435
 
                d_sample l = blend * x + ff * delay.get_cubic (t + w * m);
 
435
                sample_t l = blend * x + ff * delay.get_cubic (t + w * m);
436
436
                m = right.lfo_lp.process (right.fractal.get());
437
 
                d_sample r = blend * x + ff * delay.get_cubic (t + w * m);
 
437
                sample_t r = blend * x + ff * delay.get_cubic (t + w * m);
438
438
 
439
439
                F (dl, i, l, adding_gain);
440
440
                F (dr, i, r, adding_gain);