«bouncy-ball delay» by snappizz

on 26 Feb'17 06:08 in effectdelaybouncyball

delay effect with accelerating echoes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
~buf = Buffer.alloc(s, s.sampleRate * 5);

(
{
    var trig, freq;
    var dry, snd, phase, iois;
    var cumulDelay;
    var decayFactor, lpfCutoff, numEchoes, ioiScale, ioiDecayFactor;

    // play with these!
    decayFactor = 0.65;
    lpfCutoff = 500;
    numEchoes = 16;
    ioiScale = 0.4;
    ioiDecayFactor = 0.75;

    // example input -- you can substitute other stuff here
    trig = Dust.ar(1);
    dry = Pulse.ar(100 * TIRand.ar(1, 12, trig));
    dry = dry * Decay2.ar(trig, 0.01, 0.2);

    phase = DelTapWr.ar(~buf, dry);
    iois = Array.geom(numEchoes, ioiScale, ioiDecayFactor);
    cumulDelay = iois.sum;
    (cumulDelay > ~buf.duration).if {
        Error("use a larger buffer").throw;
    };
    snd = Silent.ar;
    iois.reverse.do { |ioi|
        snd = (snd + DelTapRd.ar(~buf, phase, cumulDelay, interp: 4)) * decayFactor;
        // one-pole lowpass -- LPF was too aggressive
        snd = OnePole.ar(snd, lpfCutoff / SampleRate.ir);
        cumulDelay = cumulDelay - ioi;
    };
    snd = snd + dry;
    
    snd * 0.5!2;
}.play;

// contributors so far: Nathan Ho
)
raw 1134 chars (focus & ctrl+a+c to copy)
reception
comments
coreyker user 04 Mar'17 18:13

Really cool... I saw that something like this was recently released as a commercial plugin from sinevibes.

snappizz user 07 Mar'17 06:45

yeah, i was inspired by the CDM article on it and i wanted to see how easy it was in SC.