-
... 300,150)).front; a = StaticText (w, Rect (45, 10, 200, 20)).background_( Color .rand); a.string = " Current Frequency " ; Button .new(w, Rect (45, 70, 200, 20)).states_([[ "close" , Color .black, Color .rand]]).action_({w.close}); s.waitFor ...
-
... b = SparseArray .reduceArray(a, 10); }.bench ) // accessing: {1000.do{ a[a.size.rand] == 60.rand }}.bench {1000.do{ b[b.size.rand] == 60.rand }}.bench // setting: {1000.do{ a[a.size.rand] = 60.rand }}.bench {1000.do{ b[b.size.rand] = 60.ran ...
-
... 1@1; 20.do{ g= EZRanger (w, 400@16, " test " , \freq ,{ |v| v.value.postln},[50.rand,50+20000.rand],unitWidth:30) .setColors( Color .grey, Color .white, Color .grey(0.7), Color .grey, Color .white, Color .white, Color .yellow) .font_( Font ...
-
... value_(i / q) }); w.front ) // show the area of the view. v.background_( Color .rand) // The sliders automatically expand to the optimal width // Stretching the layout view. Slider height is fixed. ( q = 10; w = Window .new; v = VLayoutView ...
-
... { Pan2 .ar( Mix .new( Gendy3 .ar(3,5,1.0,1.0,( Array .fill(5,{ LFNoise0 .kr(1.3.rand,1,2)})* MouseX .kr(100,378, 'exponential' )), MouseX .kr(0.01,0.05), MouseY .kr(0.001,0.016),5,mul:0.1)))}.play ) //play me { Pan2 .ar( RLPF .ar( Gendy3 .a ...
-
... control, numsines; numsines = 20; control = Control .names( \array ).kr( Array .rand(numsines, 400.0, 1000.0)); sines = Mix ( SinOsc .ar(control, 0, numsines.reciprocal)) ; Out .ar(out, sines ! 2); }).add ) b = Synth ( \help_Control_Sines ) ...
-
... a.postln a.asArray.postln; Examples // "a" is an array-of-arrays a = { { 100.0.rand }.dup(100) }.dup(100); // "b" is an equivalent Array2D, made using the "fromArray" class method b = Array2D .fromArray(100,100, a.flat); // Accessing a[15] ...
-
... q,{ arg i; Slider (h, Rect (0,0,20,75)).value_(i / q) }); h.background_( Color .rand); w.front ) // Stretching the layout view. Slider height fills the View automatically. ( q = 8; w = Window .new; h = HLayoutView (w, Rect (0,0,300,300)); h ...
-
... = { Pen .translate(100, 100); 10.do{ // set the Color Pen .color = Color .red(rrand(0.0, 1), rrand(0.0, 0.5)); Pen .addArc((100.rand)@(100.rand), rrand(10, 100), 2pi.rand, pi); Pen .perform([ \stroke , \fill ].choose); } }; w.refresh; ) *a ...
-
... rray z.rank; // 3 dimensions z.shape; // fill a 2D array Array .fill2D(3,3,{1.0.rand.round(0.01)}); Array .fill2D(2,3,{ |i,j| i@j}); // fill a 3D array Array .fill3D(2,2,2,{1.0.rand.round(0.01)}); Array .fill3D(2,2,2,{ |i,j,k| `[i,j,k]}); / ...