-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathPfunc-one-stream-many-patterns.scd
146 lines (139 loc) · 4.09 KB
/
Pfunc-one-stream-many-patterns.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
(
~degree = Pseq((0 .. 7).mirror1, inf).asStream;
~octave = Pseq((4 .. 7).mirror1, inf).asStream;
~mtranspose = Pseq((0 .. 4).mirror1, inf).asStream;
~scale = Pdup(Pexprand(8, 16), Pseq([
Scale.major.tuning_(Tuning.sept1),
Scale.minor.tuning_(Tuning.sept1),
Scale.harmonicMinor.tuning_(Tuning.sept1),
Scale.aeolian.tuning_(Tuning.sept1),
Scale.locrian.tuning_(Tuning.sept1),
Scale.mixolydian.tuning_(Tuning.sept1),
].mirror1, inf)).asStream;
~pan = Pseq((0.0, 0.025 .. 1).mirror1, inf).asStream;
//~pan = Pseq([0, 1], inf).asStream; // enable for single speaker multichan
~aux = Pxshuf((0 .. 3), inf).asStream;
Pdef(0,
Pbind(*[
type: \cln,
snd: \kps,
amp: Pdup(Pexprand(1, 3), Pexprand(1.5, 3.5)),
scale: Pfunc({~scale}),
octave: Pfunc({~octave}),
degree: Pfunc({~degree}),
pan: Pfunc({~pan}),
mtranspose: Pfunc({~mtranspose}),
//aux: Pfunc({~aux.next}),
dur: 3,
atk: Pexprand(0.01, 0.03) - 0.01,
rel: 1 * Pkey(\dur).linexp(1, 7, 2, 1),
sustain: 1 * Pkey(\dur).linexp(1, 7, 8, 2),
tempo: Pdup(Prand([6, 12, 18, 24], inf), Pseq([1.5, 2.25, 2, 5.75, 2.5, 4.25, 4.0, 5.75, 5.5].reverse, inf)).trace,
lhf: Pexprand(0.15, 0.25),
hpf: 400,
])
).play(quant: 1);
Pdef(1,
Pbind(*[
type: \cln,
snd: \kps,
amp: Pdup(Pexprand(1, 3), Pexprand(1.5, 3.5)),
scale: Pfunc({~scale}),
octave: Pfunc({~octave}),
degree: Pfunc({~degree}),
pan: Pfunc({~pan}),
mtranspose: Pfunc({~mtranspose}),
//aux: Pfunc({~aux.next}),
dur: 4,
atk: Pexprand(0.01, 0.03) - 0.01,
rel: 2 * Pkey(\dur).linexp(1, 7, 2, 1),
sustain: 2 * Pkey(\dur).linexp(1, 7, 8, 2),
lhf: Pexprand(0.15, 0.25),
hpf: 400,
])
).play(quant: 1);
Pdef(2,
Pbind(*[
type: \cln,
snd: \kps,
amp: Pdup(Pexprand(1, 3), Pexprand(1.5, 3.5)),
scale: Pfunc({~scale}),
octave: Pfunc({~octave}),
degree: Pfunc({~degree}),
pan: Pfunc({~pan}),
mtranspose: Pfunc({~mtranspose}),
//aux: Pfunc({~aux.next}),
dur: 5,
atk: Pexprand(0.01, 0.03) - 0.01,
rel: 3 * Pkey(\dur).linexp(1, 7, 2, 1),
sustain: 3 * Pkey(\dur).linexp(1, 7, 8, 2),
lhf: Pexprand(0.15, 0.25),
hpf: 400,
])
).play(quant: 1);
Pdef(3,
Pbind(*[
type: \cln,
snd: \kps,
amp: Pdup(Pexprand(1, 3), Pexprand(1.5, 3.5)),
scale: Pfunc({~scale}),
octave: Pfunc({~octave}),
degree: Pfunc({~degree}),
pan: Pfunc({~pan}),
mtranspose: Pfunc({~mtranspose}),
//aux: Pfunc({~aux.next}),
dur: 6,
atk: Pexprand(0.01, 0.03) - 0.01,
rel: 4 * Pkey(\dur).linexp(1, 7, 2, 1),
sustain: 4 * Pkey(\dur).linexp(1, 7, 8, 2),
lhf: Pexprand(0.15, 0.25),
hpf: 400,
])
).play(quant: 1);
Pdef(4,
Pbind(*[
type: \cln,
snd: \kps,
amp: Pdup(Pexprand(1, 3), Pexprand(1.5, 3.5)),
scale: Pfunc({~scale}),
octave: Pfunc({~octave}),
degree: Pfunc({~degree}),
pan: Pfunc({~pan}),
mtranspose: Pfunc({~mtranspose}),
//aux: Pfunc({~aux.next}),
dur: 7,
atk: Pexprand(0.01, 0.03) - 0.01,
rel: 5 * Pkey(\dur).linexp(1, 7, 2, 1),
sustain: 5 * Pkey(\dur).linexp(1, 7, 8, 2),
lhf: Pexprand(0.15, 0.25),
hpf: 400,
])
).play(quant: 1);
Pdef(5,
Pbind(*[
type: \cln,
snd: \kps,
amp: Pdup(Pexprand(1, 3), Pexprand(1.5, 3.5)),
scale: Pfunc({~scale}),
octave: Pfunc({~octave}),
degree: Pfunc({~degree}),
pan: Pfunc({~pan}),
mtranspose: Pfunc({~mtranspose}),
//aux: Pfunc({~aux.next}),
dur: 8,
atk: Pexprand(0.01, 0.03) - 0.01,
rel: 6 * Pkey(\dur).linexp(1, 7, 2, 1),
sustain: 6 * Pkey(\dur).linexp(1, 7, 8, 2),
lhf: Pexprand(0.15, 0.25),
hpf: 400,
])
).play(quant: 1);
)
(
Pdef(0).stop;
Pdef(1).stop;
Pdef(2).stop;
Pdef(3).stop;
Pdef(4).stop;
Pdef(5).stop;
)