-
... hen mix the results: ( play({ Mix .new( Array .fill(8, { SinOsc .ar(500 + 500.0.rand, 0, 0.05) }) ); })) The *fill methods allow this idiom to be written more concisely: ( play({ Mix .fill(8, { SinOsc .ar(500 + 500.0.rand, 0, 0.05) }); })) ...
-
... // example ( var a; a = Prout ({ loop { 1.yield; 2.yield; 7.yield; 10.do { 1.0.rand.yield } }}); a.asStream.nextN(100).plot; ) // sound example ( SynthDef ( \help_sinegrain , { arg out=0, freq=440, sustain=0.05; var env; env = EnvGen .kr( ...
-
... ounds; x = CompositeView (w, w.view.bounds.insetBy(20,20)) .background_( Color .rand) .resize_(i); y = CompositeView (x, x.bounds.moveTo(0,0).insetBy(20,20)) .background_( Color .rand) .resize_(i); y.decorator = FlowLayout (y.bounds).gap_(0 ...
-
Randomness in SC As in any computer program, there are no "truly random" number generators in SC. They are pseudo-random, meaning they use very complex, but deterministic algorithms to generate sequences of numbers that are long enough and ...
-
... ndow .new; v= UserView (w, w.view.bounds.insetBy(50,50)); v.background_( Color .rand); v.drawFunc={ |uview| Pen .moveTo(0@uview.bounds.height.rand); Pen .lineTo(uview.bounds.width@uview.bounds.height.rand); Pen .stroke; }; v.mouseDownAction ...
-
... , 0],1), { arg pat, i; var list; list = pat.list; pat.list = list.put(list.size.rand, 2); }, inf ); x = a.asStream; 30.do({ x.next.postln }); ) Ppatmod used to modify a pattern that produces a sequence of pitches: ( SynthDef ( \help_sinegra ...
-
... ~a + ~b; ~c.value; ) // variables can be assigned later ( ~a = 800; ~b = { 1.0.rand }; ~c.value; ) // variables can be exchanged later ( ~b = { 1000.rand }; ~c.value; ) // making pattern space using LazyEnvir a = LazyEnvir .new; a.proxyCla ...
-
... iers, unicode) The default keydown actions are: key action comment r activex_(1.rand), activey_(1.rand) with action random n activex_(0), activey_(0) with action left lower corner x activex_(1), activey_(1) with action top left corner c act ...
-
... fill(12, { Pan2 .ar( Decay2 .ar( Dust .ar(0.05), 0.1, 0.5, 0.1) * FSinOsc .ar( IRand (36,84).midicps).cubed.max(0), Rand (-1,1)) }); in = in + Pan2 .ar( Decay2 .ar( Dust .ar(0.03), 0.04, 0.3) * BrownNoise .ar, 0); 4.do { in = AllpassN .ar(i ...
-
... s" , { Out .ar( 6, Mix .arFill(7, { CombL .ar( In .ar(4, 1), 0.1, LFNoise1 .kr( Rand (0, 0.1), 0.04, 0.05), 15) }) ) }).load(s); SynthDef ( "allpass" , { arg gain = 0.2; var source; source = In .ar(6, 1); 4.do({ source = AllpassN .ar(source ...