«Many patterns controlling a single synth» by Jonatan Liljedahl

on 09 Oct'12 10:29 in pbindpatternswobbledubsteppmono

This is a demonstration of how several parallell patterns can be controlling a single synth.

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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(
SynthDef(\sawFilt, { |out = 0, freq = 440, amp = 0.1, gate = 1, cf = 100, wobble = 3, t_bd, t_sd, pw = 0.4|
    var base = Splay.ar(RLPF.ar(Pulse.ar(freq * [0.99,0.5,1.01],pw),cf.lag(0.05),0.3).madd(SinOsc.ar(wobble).range(0.5,4)).sin) * 0.5;
    var env = Linen.kr(gate, attackTime: 0.01, releaseTime: 0.5, doneAction: 2);
    var sig = base;
    var bd = tanh(Ringz.ar(LPF.ar(Trig.ar(t_bd,SampleDur.ir),1000),30,0.5,5).sin*2);
    var sd = tanh(Ringz.ar(LPF.ar(Trig.ar(t_sd,SampleDur.ir),1000),120,0.75,PinkNoise.ar(2!2)).sin*2);
    sd = HPF.ar(sd,60);
    sig = tanh(GVerb.ar(HPF.ar(base * env,30), 70, 11, 0.15)*0.5 + sig + bd + sd);
    Out.ar(out, sig*amp*env);
}).add;
)

(
p = Pproto(
    {
        ~id = (
            type: \on,
            dur: 0,
            instrument: \sawFilt,
            amp: 1,
        ).yield[\id];
        ~type = \set;
    },
    Ppar([
        Pbind(
            \args, #[freq],
            \freq, Pseq([49,47,50,48]-12,inf).midicps,
            \dur, 4,
        ),
        Pbind(
            \args, #[cf],
            \cf, Pseq([100,Prand([700,400,1100],3)],inf),
            \stutter, Prand([1,2,4,8],inf),
            \dur, PdurStutter(Pkey(\stutter)*2, 2),
            // NOTE: also useful is .collect on patterns!
            // \dur, Prand([1,2,4,8], inf).collect{ |x| (1/x)!(x*2) }.flatten
        ),
        Pbind(
            \args, #[wobble],
            \wobble, Pxrand([3,1.5,6],inf),
            \dur, Prand([2,1],inf),
        ),
        Pbind(
            \args, #[t_bd],
            \t_bd, Pseq([1,0,0,1],inf),
            \dur, 0.5,
        ),
        Pbind(
            \args, #[t_sd],
            \t_sd, Pseq([0,0,1,0],inf),
            \dur, 0.5,
        ),
        Pbind(
            \args, #[pw],
            \pw, Prand([0.4,0.3,0.5],inf),
            \dur, 2,
        ),
    ])
).play;
)
descendants
«Re: Many patterns controlling a single synth» by Don Smith (private)
full graph
raw 1911 chars (focus & ctrl+a+c to copy)
reception
comments
vividsnow user 10 Oct'12 09:50

will be cool to see Pproto version of this technique here )

Jonatan Liljedahl user 11 Oct'12 07:24

I just edited it, using Proto instead of the old Pfset

vividsnow user 11 Oct'12 09:55

much clearer - thanks!

ivogrig user 25 Oct'16 04:06

Awesome!

Oscar South user 08 Dec'17 09:16

Well there's a familiar name!