File: nodeWatcher.test.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 (35 lines) | stat: -rw-r--r-- 850 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
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fnil\fcharset77 Monaco;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\fs18 \cf0 s.boot;\
\
SynthDef("test-SinOsc", \{ arg freq; Out.ar(0, SinOsc.ar(freq, 0, 0.1)) \}).load(s);\
\
\
Routine(\{ inf.do(\{  arg i;\
	var a;\
	a = Synth("test-SinOsc", [\\freq, rrand(1000.0, 800.0)]);\
	0.05.wait;\
	a.free;\
	0.05.wait;\
	if(i % 20 == 0, \{ s.nodeWatcher.nodes.postln \});\
\}) \}).play;\
\
s.nodeWatcher.start;\
s.nodeWatcher.stop;\
\
\
Routine(\{ inf.do(\{  arg i;\
	var a, m;\
	a = Synth.prNew("test-SinOsc", s);\
	m = a.newMsg(s, \\addToTail, [\\freq, rrand(1000.0, 800.0)]);\
	s.listSendMsg(m);\
	0.05.wait;\
	a.free;\
	0.05.wait;\
	if(i % 20 == 0, \{s.nodeWatcher.nodes.postln \});\
\}) \}).play;\
\
}