2
2
// deterministic operations, indefinite duration
3
3
(
4
4
Pdef (0 ,
5
- Pseed (4 ,
5
+ Pseed (8 ,
6
6
Pbind (*[
7
7
type: \cln ,
8
8
snd: \fmx ,
9
- dup: Pexprand (9 , 99 ),
10
- hr1: Pdup (Pkey(\dup ) - Pwhite (0 , 7 ), Pshuf ((1 .. 4 ), inf )),
11
- hr2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pshuf ((1 .. 4 ), inf )),
12
- hr3: Pdup (Pkey(\dup ) - Pwhite (0 , 7 ), Pshuf ((1 .. 4 ), inf )),
13
- hr4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pshuf ((1 .. 4 ), inf )),
14
- fdb: Pexprand (0.0001 , 100.0 ),
15
- mi2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pshuf ((0.0001 .. 4.0 ), inf )),
16
- mi3: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pshuf ((0.0001 .. 4.0 ), inf )),
17
- mi4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pshuf ((0.0001 .. 4.0 ), inf )),
18
- amp: Pexprand (0.3 , 0.8 ),
19
- en1: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pexprand (0.0001 , 0.555 )),
9
+ dup: Pexprand (9 , 29 ),
10
+ hr1: Pdup (Pkey(\dup ) - Pwhite (0 , 7 ), Pxshuf ((1 .. 5 ), inf )),
11
+ hr2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pxshuf ((1 .. 5 ), inf )),
12
+ hr3: Pdup (Pkey(\dup ) - Pwhite (0 , 7 ), Pxshuf ((1 .. 5 ), inf )),
13
+ hr4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pxshuf ((1 .. 5 ), inf )),
14
+ mi1: Pexprand (0.00001 , 19.0 ),
15
+ mi2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pxshuf ((0.1 .. 5.0 ), inf )).trace,
16
+ mi3: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pxshuf ((0.1 .. 5.0 ), inf )),
17
+ mi4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pxshuf ((0.1 .. 5.0 ), inf )),
18
+ en1: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pexprand (0.01 , 0.555 )),
20
19
en2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pkey (\en1 ) * Pexprand (0.2 , 0.666 )),
21
20
en3: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pkey (\en1 ) * Pkey (\en2 ) / Pexprand (0.3 , 0.777 )),
22
21
en4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pkey (\en1 ) * Pkey (\en2 ) / Pkey (\en3 ) * Pexprand (0.4 , 0.888 )),
23
- cu1: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pwhite ( 0.25 , 1 .0 )),
24
- cu2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pwhite ( 0.25 , 1 .0 )),
25
- cu3: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pwhite ( 0.25 , 1 .0 )),
26
- cu4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pwhite ( 0.25 , 1 .0 )),
27
- dur : Pdup (Pkey( \dup ) + Pwhite ( 2 , 9 ), 2 / Pbrown ( 5 , 19 , Pwhite ( 1 , 3 ), inf )),
28
- legato: Pkey (\dur ) * Pexprand ( 16 , 64 ),
29
- freq: (Pdup (Pexprand(4 , 32 ), 10 * Pexprand (1 , 5 ).round )
30
- * Pdup (Pexprand(1 , 64 ), Pexprand (1 , 5 )).round
31
- * Pdup (Pkey(\dup ), Pexprand (1 , 7 ).round )),
32
- cav: 1 ,
33
- ca1 : Pseg (Pexprand (0.25 , 1.0 ), Pexprand (8.0 , 64.0 ), \welch , inf ),
34
- pan: Pbrown (0.0 , 1.0 , Pdup (Pwhite(1 , 3 ), Pwhite (0.01 , 0.1 ))).trace ,
35
- atk: Pexprand (0.01 , 4 .0 ),
22
+ cu1: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pmeanrand (- 4.0 , 4 .0 )),
23
+ cu2: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pmeanrand (- 4.0 , 4 .0 )),
24
+ cu3: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pmeanrand (- 4.0 , 4 .0 )),
25
+ cu4: Pdup (Pkey(\dup ) + Pwhite (0 , 7 ), Pmeanrand (- 4.0 , 4 .0 )),
26
+ amp : Pdup (Plprand( 1 , 5 ), Pexprand ( 0.25 , 0.5 )),
27
+ dur: 1 / Pdup ( Pkey(\dup ) + Pwhite ( 2 , 9 ), Pbrown ( 5 , 19 , Pwhite ( 1 , 3 ), inf ) ),
28
+ freq: (Pdup (Pexprand(4 , 32 ), 10 * Pexprand (1 , 5 ).asInteger )
29
+ * Pdup (Pexprand(1 , 64 ), Pexprand (1 , 5 ).asInteger)
30
+ * Pdup (Pkey(\dup ), Pexprand (1 , 7 ).asInteger )),
31
+ cav: 2 ,
32
+ cai : Pseg (Phprand (0.5 , 1.0 ), Pexprand (8.0 , 64.0 ), \welch , inf ),
33
+ pan: Pbrown (0.0 , 1.0 , Pdup (Pwhite(1 , 3 ), Pwhite (0.01 , 0.1 ))),
34
+ atk: Pexprand (1.0 , 8 .0 ),
36
35
hld: Pkey (\dur ) * 2 ,
37
36
rel: Pkey (\dur ) * 2 ,
38
- crv: 5 ,
39
- sustain: Pexprand ( 2.5 , 5.0 ) ,
37
+ crv: 3 ,
38
+ sustain: Pkey ( \atk ) + Pkey ( \hld ) + Pkey ( \rel ) * 8 ,
40
39
])
41
40
)
42
41
).play
@@ -52,29 +51,29 @@ Pdef(0,
52
51
type: \cln ,
53
52
snd: \mmd ,
54
53
num: Pwhite (0 , 23 ),
55
- dur: Pwrand ([1 /12 , 1 /3 ], [9 , 1 ].normalizeSum , inf ),
54
+ dur: Pwrand2 ([1 /12 , 1 /3 ], [9 , 1 ], inf ),
56
55
rel: Pdup (Pwhite(1 , 8 ), Pseq ([1 /16 , 1 /17 , 1 /18 , 1 /19 , 1 /20 , 1 /21 , 1 /22 , 1 /8 , 2 ], inf )) * Pexprand (0.1 , 10.0 ),
57
56
amp: Pexprand (1.0 , 8.0 ),
58
- pan: Pdup (Pwhite(0 , 28 ), Pwrand ([Pwhite (0.0 , 0.333 ), Pwhite (0.666 , 1.0 )], [1 , 1.5 ].normalizeSum , inf )),
59
- lpf: Pwrand ([625 , 1250 , 2500 , 5000 , 10000 , 20000 ], (1 .. 6 ).normalizeSum , inf ),
60
- spd: Pwrand ([
61
- 1 /64 , 1 /32 , 1 /16 , 1 /8 , 1 /4 , 1 /2 , 1 , 2 , 4 , 8 , 16 , 32 , 64 ],
62
- [1 , 2 , 4 , 8 , 16 , 32 , 64 , 32 , 16 , 8 , 4 , 2 , 1 ].normalizeSum ,inf ),
57
+ pan: Pdup (Pwhite(0 , 28 ), Pwrand2 ([Pwhite (0.0 , 0.333 ), Pwhite (0.666 , 1.0 )], [1 , 1.5 ], inf )),
58
+ lpf: Pwrand2 ([625 , 1250 , 2500 , 5000 , 10000 , 20000 ], (1 .. 6 ), inf ),
59
+ spd: Pwrand2 ([
60
+ 1 /64 , 1 /32 , 1 /16 , 1 /8 , 1 /4 , 1 /2 , 1 , 2 , 4 , 8 , 16 , 32 , 64 ],
61
+ [1 , 2 , 4 , 8 , 16 , 32 , 64 , 32 , 16 , 8 , 4 , 2 , 1 ],inf ),
63
62
shp: Pwhite (0.0 , 1.0 ).trace,
64
63
dla: 0.001 ,
65
64
dlf: 0.94 ,
66
- dlt: 1 /2 / Pdup (Pwrand ([1 , 2 , 3 ], [256 , 16 , 1 ].normalizeSum ,inf ), Pbrown (1 , 199 , Prand ((1 .. 19 ), inf ))),
67
- rin: Pwrand ([0 ,0.05 ], [9 , 1 ].normalizeSum , inf ),
65
+ dlt: 1 /2 / Pdup (Pwrand2 ([1 , 2 , 3 ], [256 , 16 , 1 ],inf ), Pbrown (1 , 199 , Prand ((1 .. 19 ), inf ))),
66
+ rin: Pwrand2 ([0 ,0.05 ], [9 , 1 ], inf ),
68
67
rev: 0.97 ,
69
- dry: Pdup (Pwhite(1 , 9 ), Pwrand ([0.25 , 1 ], [3 , 1 ].normalizeSum , inf )),
68
+ dry: Pdup (Pwhite(1 , 9 ), Pwrand2 ([0.25 , 1 ], [3 , 1 ], inf )),
70
69
hpf: 40 ,
71
70
]), 1 , 15 ,
72
71
)
73
72
)
74
73
).play
75
74
)
76
75
77
- // an example using add which is the built in additive synthesizer
76
+ // an example using add which can be used a kind of additive synthesizer
78
77
// stochastic operations, indefinite duration
79
78
(
80
79
Pdef (0 ,
@@ -114,7 +113,7 @@ Pdef(0,
114
113
hld: Pdup (Pwhite(5 , 11 ), Pwhite (3.0 , 5.0 ), inf ),
115
114
rel: Pdup (Pwhite(5 , 11 ), Pwhite (5.0 , 11.0 ), inf ),
116
115
crv: -8 ,
117
- amp: Pseg (Pexprand(0.5 , 0.9 ), Pexprand (0.25 , 4.0 ), \exp , inf ),
116
+ amp: Pseg (Pexprand(0.425 , 0.85 ), Pexprand (0.25 , 4.0 ), \exp , inf ),
118
117
pan: Pwhite (0.0 , 1.0 ),
119
118
wid: Pwhite (0.0 , 1.0 ),
120
119
iph: Pexprand (0.0001 , 1.0 ),
@@ -162,7 +161,7 @@ Pdef(0,
162
161
Pbind (*[
163
162
type: \cln ,
164
163
snd: \kps ,
165
- amp: Pexprand (0.5 , 1.0 ),
164
+ amp: Pexprand (0.4 , 0.8 ),
166
165
freq: 32 * Prand ([1 , 2 , 4 , 8 , 16 ], inf ) * (1 , 3 .. 11 ),
167
166
dur: 1 / Pdup (Pwhite(5 , 11 ), Pwhite (5 , 11 )),
168
167
sustain: Pexprand (0.5 , 4.0 ),
@@ -197,6 +196,30 @@ Pdef(0,
197
196
).play
198
197
)
199
198
199
+ ( // an example using clp which is a handclap synth
200
+ // stochastic operations, indefinite duration
201
+ Pdef (0 ,
202
+ Pbind (*[
203
+ type: \cln ,
204
+ snd: \clp ,
205
+ atk: 0 ,
206
+ rel: Pseg (Pdup(2 , Pwhite (0.2 , 0.8 )), Pwhite (9.0 , 11.0 ), \lin , inf ),
207
+ crv: -8 ,
208
+ dur: Pseg ([1 , 1 /24 ], 10 , \lin , inf ),
209
+ stretch: Pseg (Pdup(2 , Pwhite (0.01 , 1.0 )), Plprand (1.0 , 11.0 ), \lin , inf ),
210
+ pan: Pseg (Pdup(2 , Pmeanrand (0.0 , 1.0 )), Plprand (1.0 , 11.0 ), \lin , inf ),
211
+ amp: Pseg (Pdup(2 , Plprand (0.4 , 0.8 )), Plprand (1.0 , 11.0 ), \lin , inf ),
212
+ srp: Pseg (Pdup(2 , Pwhite (0.0 , 1.0 )), Pwhite (9.0 , 11.0 ), \lin , inf ),
213
+ srq: Pseg (Pdup(2 , Pwhite (0.0 , 1.0 )), Pwhite (9.0 , 11.0 ), \lin , inf ),
214
+ bdy: Pseg (Pdup(2 , Plprand (0.0 , 1.0 )), Pwhite (9.0 , 11.0 ), \lin , inf ),
215
+ tha: Pseg (Pdup(2 , Plprand (0.0 , 1.0 )), Pwhite (9.0 , 11.0 ), \lin , inf ),
216
+ tho: Pseg (Pdup(2 , Plprand (0.0 , 1.0 )), Pwhite (9.0 , 11.0 ), \lin , inf ),
217
+ dmp: Pseg (Pdup(2 , Phprand (20.0 , 20000.0 )), Plprand (1.0 , 11.0 ), \lin , inf ).trace,
218
+ sustain: Pkey (\rel ),
219
+ ])
220
+ ).play
221
+ )
222
+
200
223
( // an example using dfd which is a transient / noise excited filter that can selfoscillate
201
224
Pdef (0 , // deterministic operations, indefinite duration
202
225
Pseed (192 ,
@@ -216,6 +239,21 @@ Pdef(0, // deterministic operations, indefinite duration
216
239
).play
217
240
)
218
241
242
+ // an example using blp which is a sine wave which lets you add a number of harmonics
243
+ ( // stochastic operations, finite duration
244
+ Pdef (0 ,
245
+ Pbind (*[
246
+ type: \cln ,
247
+ snd: \blp ,
248
+ dur: 1 / Pdup (Plprand(9 , 49 ), Pwhite (7.0 , 13.0 )),
249
+ pan: Pseq ([0 , 0.25 , 0.5 , 1 , 0.75 , 0.5 ], 99 ),
250
+ nmh: Pseries (1 , 1 , inf ) % Pseq ((1 .. 39 ), inf ).trace,
251
+ amp: (Pseries (1 , 1 , inf ) % Pseq ((1 .. 29 ), inf )).linlin(0 , 29 , 0.7 , 0.9 ),
252
+ sustain: 9 ,
253
+ ])
254
+ ).play
255
+ )
256
+
219
257
// an example using bow which is a digital wave guide physical model of a bowed instrument
220
258
( // deterministic operations, indefinite duration
221
259
var a = Pwhite (0.0 , 0.25 ).asStream;
0 commit comments