-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatterns-misc.scd
57 lines (47 loc) · 1.21 KB
/
patterns-misc.scd
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
// you can group parameters in Pbinds
(
~p1 = Pbind(\instrument, \default,
[\midinote,\dur], Pwrand([Pseq([[40, 1], [42,1], [43,0.5]]), Pseq([[40,1],[42,1],[44,0.25], [43,0.25]])],
[7,5].normalizeSum, 4)
);
)
~p1.play;
//you can nest pbinds for sequencing fun
(
~p2 = Array.new(2);
~p2.insert(0,
Pbind(\instrument,\default,
\dur, Pseq([1,1,0.5]),
\midinote, Pseq([40,41,43])
)
);
~p2.insert(1,
Pbind(\instrument,\default,
\dur, Pseq([1,1,0.5]),
\midinote, Pwrand([Pseq([40,41,47]), Pseq([40,42,46])], [7,5].normalizeSum)
)
);
)
~p2master = Pwrand([Pn(~p2[0], 4), Pn(~p2[1], 4)], [5,5].normalizeSum, 2);
~p2master.play;
// here's how to generate random length patterns with Prout
(
Pbind(\instrument, \default,
\scale, Scale.major,
\dur, 0.1,
\octave, 5,
\degree, Prout({ loop {rrand(5,10).do({|i| i.yield;}); }}),
).play;
)
// using Pcollect to detect when our random length pattern starts over,
// we can use Pgate to have patterns that advance only at these new starts
(
Pbind(\instrument, \default,
\scale, Scale.minor,
\dur, 0.1,
\octave, 5,
\degree, Prout({ loop {rrand(5,10).do({|i| i.yield;}); }}),
\newval, Pcollect({|i| i ==0}, Pkey(\degree)),
\pan, Pgate(Pwhite(-1.0,1.0),inf, \newval)
).play;
)