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;\
\
}
|