-
... n't repeat }); ) In SC3 time-based sequences of events can be implemented using Routines. A Routine which yields a number can be scheduled using a clock: ( var w, r; w = Window .new( "trem" , Rect (512, 256, 360, 130)); w.front; r = Routine ...
-
... mber of times. Function-loop repeats the function forever. f = { 3.yield }; x = Routine({ f.loop }); 10.do({ x.next.postln }) Object-repeat(n) repeat to yield the object x = 5; y = x.repeat(6); y.nextN(8); Pattern-repeat(n) x = Prand([1, 2] ...
-
... a stream, not from the pattern. For most patterns, the stream is an instance of Routine . Routines (formally known in computer science as "coroutines") are important because they can yield control back to the caller but still remember exact ...
-
... blocked threads unhang resume threads // example ( c = Condition .new( false ); Routine { 1.wait; "waited for 1 second" .postln; 1.wait; "waited for another second, now waiting for you ... " .postln; c.wait; "the condition has stopped waiti ...
-
... clear the AppClock's scheduler to stop it AppClock .clear *play(task) The task/Routine yields a float value indicating the delta (secs) for the AppClock to wait until resuming the Routine. ( var w, r; w = Window .new( "trem" , Rect (512, 2 ...
-
... rce) create a new instance with a function (the source). the source should be a routine function (see Tdef ) or a pattern of time values. *default a default source, if none is given. the default is a loop that does nothing with a 1.0 beat w ...
-
... ise0 .kr(5.5,1000),0,[32,32])}.play(s); More Examples (send a SynthDef, run the routine then send a different SynthDef) ( // simple detune & pitchmod via FreqShift SynthDef ( "frqShift1" ,{ arg frq,detune=1.5; var e1,left,right; e1 = EnvGen ...
-
... e next value from the stream. It responds to reset by resetting the Stream. x = Routine { 6.do { arg i; i.yield; } }.squared; x.dump ( x = Routine { 6.do { arg i; i.yield; } }.squared; x.next.postln; x.next.postln; x.next.postln; x.next.pos ...
-
... nmax), 0, Line .kr(0.2, 0, 0.01, doneAction:2)) ) }).send(s); ) // towards hi ( Routine ({ loop({ Synth .new( \help_LinRand ); 0.04.wait; }) }).play; ) // towards lo (doesn't work like that yet) ( Routine ({ loop({ Synth .new( \help_LinRand ...
-
... e next value from the stream. It responds to reset by resetting the Stream. x = Routine { 6.do { arg i; i.yield; } }.wrap(0, 3); x.dump; ( x = Routine { 6.do { arg i; i.yield; } }.wrap(0, 3); x.next.postln; x.next.postln; x.next.postln; x.n ...