File: TESTS.rtf

package info (click to toggle)
supercollider 1%3A3.4.5-1wheezy1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,972 kB
  • sloc: cpp: 116,645; lisp: 64,914; ansic: 10,725; python: 3,548; perl: 766; ruby: 487; sh: 152; makefile: 117; xml: 13
file content (561 lines) | stat: -rw-r--r-- 14,905 bytes parent folder | download
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fnil\fcharset77 Monaco;}
{\colortbl;\red255\green255\blue255;\red191\green0\blue0;\red0\green0\blue191;\red96\green96\blue96;
\red0\green115\blue0;\red0\green0\blue0;\red0\green0\blue191;\red191\green0\blue0;\red0\green115\blue0;
}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs24 \cf2 //
\f1\fs18 \cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 //\cf0 \
\cf2 //// crucial tests\cf0 \
\cf2 //TestCase(Crucial,\cf0 \
\cf2 //	\\patcha -> \{ arg test;\cf0 \
\cf2 //		// patch\cf0 \
\cf2 //		i = Instr("help-Patch",\{ arg freq=100,amp=1.0;\cf0 \
\cf2 //				SinOsc.ar([freq,freq + 30],0,amp)\cf0 \
\cf2 //			\});\cf0 \
\cf2 //		p = Patch(i,[ 500,	0.3 ]);\cf0 \
\cf2 //		p.play;\cf0 \
\cf2 //		\cf0 \
\cf2 //		//message,button wait for confirm\cf0 \
\cf2 //		//test.askMonkey("stereo sin wave");\cf0 \
\cf2 //	\}\cf0 \
\cf2 //).run\cf0 \
\cf2 //\cf0 \
\
(\
\cf2 // patch\cf0 \
i = \cf3 Instr\cf0 (\cf4 "help-Patch"\cf0 ,\{ \cf3 arg\cf0  freq=100,amp=1.0;\
		\cf3 SinOsc\cf0 .ar([freq,freq + 30],0,amp)\
	\});\
p = \cf3 Patch\cf0 (i,[ 500,	0.3 ]);\
p.play;\
)\
\
p.stop;\
\
p.insp\
\
\
\
(\
\cf2 // gui works\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Instr\cf0 (\cf5 \\bubbles\cf0 , \{ \cf3 arg\cf0  amp=1.0;\
	\cf3 var\cf0  f, zout;\
	f = \cf3 LFSaw\cf0 .kr(0.4, 0, 24, \cf3 LFSaw\cf0 .kr([8,7.23], 0, 3, 80)).midicps;\
	zout = \cf3 CombN\cf0 .ar(\cf3 SinOsc\cf0 .ar(f, 0, 0.04), 0.2, 0.2, 4);\
	zout * amp\
\});\
\
\cf3 Instr\cf0 (\cf5 \\rlpf\cf0 ,\{ \cf3 arg\cf0  audio=0,freq=500,rq=0.1;\
	\cf3 RLPF\cf0 .ar(audio, freq, rq)\
\});\
\
p = \cf3 Patch\cf0 (\cf5 \\rlpf\cf0 ,[\
	q = \cf3 Patch\cf0 (\cf5 \\bubbles\cf0 )\
]);\
\
p.gui\
)\
\
		\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // fixed arg\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Instr\cf0 ([\cf5 \\jmcExamples\cf0 ,\cf5 'moto-rev'\cf0 ],\{ \cf3 arg\cf0  lfo=0.2,freq=1000,rq=0.1;\
	\cf3 RLPF\cf0 .ar(\cf3 LFPulse\cf0 .ar(\cf3 SinOsc\cf0 .kr(lfo, 0, 10, 21), [0,0.1], 0.1), freq, rq).clip2(0.4);\
\});\
q = \cf3 Patch\cf0 ([\cf5 \\jmcExamples\cf0 ,\cf5 'moto-rev'\cf0 ],[\
	\cf3 nil\cf0 ,500\
]);\
q.play;\
)\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // should be filtered low\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Instr\cf0 (\cf5 \\bubbles\cf0 , \{ \cf3 arg\cf0  amp=1.0;\
	\cf3 var\cf0  f, zout;\
	f = \cf3 LFSaw\cf0 .kr(0.4, 0, 24, \cf3 LFSaw\cf0 .kr([8,7.23], 0, 3, 80)).midicps;\
	zout = \cf3 CombN\cf0 .ar(\cf3 SinOsc\cf0 .ar(f, 0, 0.04), 0.2, 0.2, 4);\
	zout * amp\
\});\
\cf3 Instr\cf0 (\cf5 \\rlpf\cf0 ,\{ \cf3 arg\cf0  audio=0,freq=200,rq=0.1;\
	\cf3 RLPF\cf0 .ar(audio, freq, rq)\
\});\
p = \cf3 Patch\cf0 (\cf5 \\rlpf\cf0 ,[\
	q = \cf3 Patch\cf0 (\cf5 \\bubbles\cf0 )\
]);\
p.play;\
)\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // tempo bus\cf0 \
t = \cf3 TempoBus\cf0 .new(s);\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Tempo\cf0 .bpm = 60;\
\cf3 SynthDef\cf0 (\cf4 "help-TempoBus"\cf0 ,\{ \cf3 arg\cf0  out=0,tempoBus;\
	\cf3 var\cf0  tempo,trig,amp;\
	tempo = \cf3 In\cf0 .kr(tempoBus);\
	trig = \cf3 Impulse\cf0 .kr(tempo);\
	amp = \cf3 Decay2\cf0 .kr(trig,0.01,0.1).clip2(1.0);\
	\cf3 Out\cf0 .ar(out,\
		amp * \cf3 SinOsc\cf0 .ar(300)\
	)\
\}).play(s,[0,0,1,t.index]);\
)\
\
\cf3 Tempo\cf0 .bpm = 40;\
\
\cf3 Tempo\cf0 .bpm = 666;\
\
\cf3 Tempo\cf0 .bpm = 100;\
\
\
\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // TempoPlayer\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Instr\cf0 (\cf5 \\helpTempoPlayer\cf0 ,\{ \cf3 arg\cf0  tempo;\
	\cf3 Impulse\cf0 .ar( tempo )\
\});\
\cf3 Patch\cf0 (\cf5 \\helpTempoPlayer\cf0 ,[\
	\cf3 TempoPlayer\cf0 .new\
]).play;\
)\
\cf3 Tempo\cf0 .bpm = 40;\
\
\cf3 Tempo\cf0 .bpm = 666;\
\
\cf3 Tempo\cf0 .bpm = 100;\
\
\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // ModalFreq\cf0 \
m = 	\cf3 ModalFreq\cf0 .new(\
			\cf3 StreamKrDur\cf0 .new(\cf3 Pseq\cf0 (#[ 7, 6,1,10 ], \cf3 inf\cf0 ), 1, 0.1), \
			\cf3 FloatArray\cf0 [ 0, 2, 3, 4, 7 ], \
			\cf3 StreamKrDur\cf0 .new(\cf3 Pseq\cf0 (#[ 6, 5 ],\cf3 inf\cf0 ), 4, 0.1), \
			2, \
			12\
		); 	\
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=200;\
	\cf3 Pulse\cf0 .ar(freq,0.3,0.3)\
\},[\
	m\
]).play;\
)\
\
p.stop;\
\
p.play;\
\
\
// NOT WORKING !!\
(\
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=200;\
	\cf3 Pulse\cf0 .ar(freq,0.3,0.3)\
\},[  \
  \cf3 Patch\cf0 (\
		\cf3 UGenInstr\cf0 (\cf3 ModalFreqUGen\cf0 ,\cf5 \\kr\cf0 ),\
		[\
		\cf3 StreamKrDur\cf0 .new(\cf3 Pseq\cf0 (#[ 7, 6,1,10 ], \cf3 inf\cf0 ), 1, 0.1), \
		\cf3 ArrayBuffer\cf0 ( [ 0, 2, 3, 4, 7 ]  ),\
		6,\cf2 //StreamKrDur.new(Pseq(#[ 6, 5 ],inf), 4, 0.1), \cf0 \
		4,\
		12]\
  )\
]);\
p.play;\
)\
\
p.stop;\
\
p.play;\
\
// NOT WORKING	  \
(\
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=200;\
	\cf3 Pulse\cf0 .ar(freq,0.3,0.3)\
\},[  \
  \cf3 Patch\cf0 (\cf3 UGenInstr\cf0 (\cf3 ModalFreqUGen\cf0 ,\cf5 \\kr\cf0 ),\
	[\
	\cf3 StreamKrDur\cf0 .new(\cf3 Pseq\cf0 (#[ 7, 6,1,10 ], \cf3 inf\cf0 ), 1, 0.1), \
	\cf3 ArrayBuffer\cf0 ( [ 0, 2, 3, 4, 7 ]  ),\
	\cf3 StreamKrDur\cf0 .new(\cf3 Pseq\cf0 (#[ 6, 5 ],\cf3 inf\cf0 ), 4, 0.1), \
	2,\
	12]\
  )\
]);\
p.play;\
)\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 thisProcess\cf0 .stop;\
\
p.play;\
\
p.insp\
\
\
(\
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
		\cf3 SinOsc\cf0 .ar([freq,freq + 30],0,amp)\
	\},[	\
		\cf3 StreamKrDur\cf0 (\
			\cf3 ModalFreq\cf0 (\cf3 Pseq\cf0 ([1,2,3,4],\cf3 inf\cf0 )), \
			\cf3 Pseq\cf0 ([0.25,0.5,0.75],\cf3 inf\cf0 ),\
			0.1),\
		0.2\
	]);\
p.play;\
)\
\
p.stop;\
\
p.play;\
\
\cf3 thisProcess\cf0 .stop; \cf2 // command .\cf0 \
\
p.play;	\
\
(\
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
		\cf3 SinOsc\cf0 .ar([freq,freq + 30],0,amp)\
	\},[	\
		\cf3 StreamKrDur\cf0 (\
			\cf3 ModalFreq\cf0 (\cf3 Pseq\cf0 ([1,2,3,4],\cf3 inf\cf0 )), \
			\cf3 Pseq\cf0 ([0.25,0.5,0.75],\cf3 inf\cf0 ),\
			0.1),\
		0.2\
	]);\
q = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
		\cf3 SinOsc\cf0 .ar([freq,freq + 30],0,amp)\
	\},[	\
		\cf3 StreamKrDur\cf0 (\
			\cf3 ModalFreq\cf0 (\cf3 Pseq\cf0 ([1,2,3,4],\cf3 inf\cf0 )), \
			\cf3 Pseq\cf0 ([0.25,0.5,0.75],\cf3 inf\cf0 ),\
			0.1),\
		0.2\
	]);\
p.play;\
q.play;\
)\
\
\cf3 thisProcess\cf0 .stop;\
\
p.play;\
q.play;\
\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // Sample\cf0 \
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  sample;\
	\cf3 PlayBuf\cf0 .ar(sample.numChannels,\
			sample.bufnumIr,\
			sample.bufRateScaleKr,\
			1.0,\
			0.0,\
			1.0)\
\
\},[\
	\cf3 Sample\cf0 (\cf4 "a11wlk01.wav"\cf0 )\
]);\
p.play;\
)\
\
p.stop;\
\
p.play;\
\
p.free;\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Instr\cf0 ([\cf5 \\help\cf0 ,\cf5 \\Sample\cf0 ],\{ \cf3 arg\cf0  sample,tempo;\
	\cf3 PlayBuf\cf0 .ar(\
		sample.numChannels,\
		sample.bufnumKr,\
		sample.sampleRateKr / 44100 * tempo * sample.tempo.reciprocal,\
		1.0,0.0,1.0);\
\},[\
	\cf5 \\sample\cf0 ,\
	\cf5 \\tempo\cf0 \
]);\
p = \cf3 Patch\cf0 ([\cf5 \\help\cf0 ,\cf5 \\Sample\cf0 ],\
[\
	\cf3 Sample\cf0 (\cf4 "a11wlk01.wav"\cf0 ),\
	\cf3 TempoPlayer\cf0 .new\
]);\
p.play;\
)\
\
p.isPlaying\
\
\cf3 Tempo\cf0 .bpm = 150;\
\
\cf3 Tempo\cf0 .bpm = 40;\
\
\cf3 Tempo\cf0 .bpm = 100;\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 //PlayerMixer\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Instr\cf0 (\cf5 \\helpPlayerMixer\cf0 , \{ \cf3 arg\cf0  freq=100,amp=1.0;\
	\cf3 SinOsc\cf0 .ar([freq,freq + 30],0,amp)\
\});\
p= \cf3 PlayerMixer\cf0 ([\
	\cf3 Patch\cf0 (\cf5 \\helpPlayerMixer\cf0 ,[\
		500,\
		0.3\
	]),\
	\cf3 Patch\cf0 (\cf5 \\helpPlayerMixer\cf0 ,[\
		450,\
		0.3\
	]),\
	\cf3 Patch\cf0 (\cf5 \\helpPlayerMixer\cf0 ,[\
		800,\
		0.3\
	])\
]);\
p.play;\
\
)\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 //0.5.wait;\cf0 \
p.stop;\
\cf2 //0.5.wait;\cf0 \
\cf2 //\cf0 \
p.play;\
\cf2 //\cf0 \
\
\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\fs20 \cf3 Tempo\cf0 .bpm = 100; \cf2 // times are in beats\cf0 \
p = \cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq;\
	
\fs18 \cf3 Saw\cf0 .ar(freq,0.2)\
\},[\
	\cf3 StreamKrDur\cf0 ( \
		\cf3 Prand\cf0 (\cf3 Array\cf0 .fill(rrand(4,16),\{ rrand(20,80).midicps \}),\cf3 inf\cf0 ),\
		 0.25,
\fs20 \cf2 // a float
\fs18 \cf0 \
		 0.1)
\fs20 ;
\fs18 \
]);\
p.play;\
)\
p.stop;\
\
p.play;\
\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // still having problems changing tempo\cf0 \
(
\f0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f1 \cf0 	\cf3 Instr\cf0 (\cf5 \\beatClockPlayerTest\cf0 ,\{ \cf3 arg\cf0  gate=0.0,freq=300;\
		\cf3 var\cf0  a,t;\
\
		t = gate;\
		a = \cf3 Decay2\cf0 .kr(t,0.01,0.1).clip2(1.0);\
		a * \cf3 SinOsc\cf0 .ar(freq);\
	\},[\
		\cf5 \\gate\cf0 \
	]);\
	\
	\cf3 PlayerMixer\cf0 ([\
		\cf3 Patch\cf0 .new(\cf5 \\beatClockPlayerTest\cf0 ,\
		[\
			\cf3 BeatClockPlayer\cf0 (16), \cf2 // trig / gate \cf0 \
			300\
		]),\
		\cf3 Patch\cf0 .new(\cf5 \\beatClockPlayerTest\cf0 ,\
		[\
			\cf3 Stream2Trig\cf0 (\cf3 Pseq\cf0 ([0.25],\cf3 inf\cf0 )),\
			600\
		])\
	]).play;\
)\
\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // children are started\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
		\cf3 SinOsc\cf0 .ar([freq,freq + 3],0,amp)\
\},[\cf3 StreamKrDur\cf0 (\cf3 Pseq\cf0 ([1000,660,470,400,500,700,600,570],\cf3 inf\cf0 ), \cf3 Pseq\cf0 ([1],\cf3 inf\cf0 ),0),0.1])\
.play\
)\
\
\
(\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 // children inside of patch inside of player mixer are started\cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf3 PlayerMixer\cf0 ([\
	\cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
		\cf3 SinOsc\cf0 .ar([freq,freq + 3],0,amp)\
	\},[\cf3 StreamKrDur\cf0 (\cf3 Pseq\cf0 ([1000,660,470,400,500,700,600,570],\cf3 inf\cf0 ), \cf3 Pseq\cf0 ([1.0],\cf3 inf\cf0 ),0),0.1])\
]).play\
)\
\
(\
\cf3 PlayerMixer\cf0 ([\
	\cf3 Patch\cf0 (\{ \cf3 arg\cf0  audio=0,freq=500,rq=0.1;\
		\cf3 RLPF\cf0 .ar(audio, freq, rq)\
	\},[\
		\cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
			\cf3 SinOsc\cf0 .ar([freq,freq + 3],0,amp)\
		\},[	\
			\cf3 StreamKrDur\cf0 (\cf3 Pseq\cf0 ([1000,660,470,400,500,700,600,570],\cf3 inf\cf0 ), \cf3 Pseq\cf0 ([1],\cf3 inf\cf0 ),0),\
			0.01\
		]),\
	1000,\
	0.2]),\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\cf2 //	Patch(\\reverb,[\cf0 \
		\cf3 Patch\cf0 (\{ \cf3 arg\cf0  freq=100,amp=1.0;\
			\cf3 SinOsc\cf0 .ar([freq,freq + 3],0,amp)\
		\},[\
			\cf3 Stream2Trig\cf0 (\cf3 Pseq\cf0 ([1],\cf3 inf\cf0 ),\cf3 Pseq\cf0 ([0.75,0.25],\cf3 inf\cf0 ))\
		])\
\cf2 //	20])\cf0 \
]).play;\
)	\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs24 \cf0 \
\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f1\fs18 \cf0 p = \cf3 PlayerSocket\cf0 .new;\
p.play;\
\
q = \cf3 Patch\cf0 (\{ \cf3 Saw\cf0 .ar * 0.2 \});\
r = \cf3 Patch\cf0 (\{ \cf3 Saw\cf0 .ar(800) * 0.2 \});\
\
p.prepareAndSpawn(q);\
\
p.prepareAndSpawn(r);\
\
p.release;\
\
\
\
(\
\
	\cf3 Instr\cf0 ([\cf5 \\oscillOrc\cf0 ,	\cf5 \\pmosc\cf0 ],\{ \cf3 arg\cf0  freq=400, freq2=500,pmindex=0,phasemod=0.0,amp=1.0;\
		\cf3 PMOsc\cf0 .ar(freq,freq2,pmindex,phasemod,amp)\
	\});\
	\
	p = \cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ],\
	[\
		\cf3 KrNumberEditor\cf0 (240.06,\cf5 \\freq\cf0 ), \
		27.7707, \
	  	1.3, \
	 	0, \
	  	0.616317\
	 ]);\
	 \
	 q = \cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ],\
		[\
		\cf3 KrNumberEditor\cf0 (90,\cf5 \\freq\cf0 ), \
	  	27.7707, \
	  	\cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ],\
		[\
			\cf3 KrNumberEditor\cf0 (150.06,\cf5 \\freq\cf0 ), \
			27.7707, \
		  	1.3, \
		 	0, \
		  	0.616317\
		 ]), \
	 	0, \
		\cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ],\
		[\
			\cf3 KrNumberEditor\cf0 (150.06,\cf5 \\freq\cf0 ), \
			27.7707, \
		  	1.3, \
		 	0, \
		  	0.616317\
		 ])\
	 ]);\
	 \
	 r =  \cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ], [\
		\cf3 KrNumberEditor\cf0 (40,\cf5 \\freq\cf0 ), \
	  	\cf3 nil\cf0 , \
	  	\cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ], [\
			\cf3 KrNumberEditor\cf0 (150.06,\cf5 \\freq\cf0 ), \
			27.7707, \
		  	1.3, \
		 	0, \
		  	0.616317\
		 ]),\
	 	0, \
		\cf3 Patch\cf0 .new([ \cf5 'oscillOrc'\cf0 , \cf5 'pmosc'\cf0  ], [\
			\cf3 KrNumberEditor\cf0 (150.06,\cf5 \\freq\cf0 ), \
			27.7707, \
		  	1.3, \
		 	0, \
		  	0.616317\
		 ])\
	 ]);\
\
	 \cf3 PlayerPool\cf0 ([ p,q,r ]).gui\
)\
\
//check that it releases the same busses it allocates, none twice\
// the tempo bus stays\
(\cf6 \
x = 
\f0\fs24 \cf7 ModalFreq\cf6 .new(\
			3, \cf8 //StreamKrDur.new(SeqSliders.new('degree',#[ 2, 2, 1 ], 0, 11, 1), 1, 0.1), \cf6 \
			\cf7 FloatArray\cf6 [ 3, 4, 7, 8, 9 ], \
			0, \
			3, \
			12\
	);\

\f1\fs18 \cf6 \
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs24 \cf7 Patch\cf6 .new(\
	[ \cf9 'synths'\cf6 , \cf9 'PMOsc'\cf6 , \cf9 'FQenv'\cf6  ], \
	[ \cf7 BeatClockPlayer\cf6 .new, 20, \
		x,\
		\
		 5, 400, 80, 0.3, 0.8, \cf7 Env\cf6 .new(\
		[ 0, 0.441358, 0.356481, 0 ], \
		[ 0.01, 0.3, 1 ], \
		-4, \
		2, \
		\cf7 nil\cf6 \
	), 0.0343698, \
	0.2 ]\
).gui\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f1\fs18 \cf6 \
\cf0 )\
}