Submit Browse Random
Anonymous Login RSS

SuperCollider Code

All (764) Code (64) Doc (175) Help (16) Quark (509) SCDoc ↗ Forum ↗ Google ↗
  1. 002-multiple Doc

    //multiple objects within a world with gravity force //color and size depends on object's mass ( var width= 300, height= 300, w, wgrav, world, n= 80; //--world w= RedWindow("vector test", Rect(128, 64, width, height)).front; wgrav= RedVecto ...

  2. 080-function_plot Doc

    ... rad); //func= cos(theta); func= sin(cnt*rad.cos+(5*theta)); y= y+dy; //--render Pen.strokeColor= Color.grey(func+1); Pen.strokeRect(Rect(i, j, 1, 1)); }; x= x+dx; } }; w.play; CmdPeriod.doOnce({w.close}); )

  3. 055-boids-ga_synth Doc

    ... Phenome(x).asSynthDef2.play(s, [\amp, 0])}; 0.5.wait; //--loop w.draw{ 4.do{|i| Pen.fillColor= Color.red(0.5, i+1/4); Pen.fillOval(Rect.aboutRedVector2D(w.mouse, 4-i/3*25)); }; world.objects.do{|o, i| var amp= 0; o.addForceWander2D; if(i==0 ...

  4. UserView-Subclassing Doc

    ... ne the *viewClass method 3. Set up your view 4. Define a drawing function for SCPen 5. Define typical widget methods 6. Override mouseActions 7. Define default key actions 8. Define default drag and drop actions Custom view template NOTE: T ...

  5. 011-attraction2 Doc

    ... orce(o.gravityForce(oo).neg); }); }); }; o.update; world.contain(o); //--render Pen.strokeColor= Color.grey(1-(o.mass/12)); Pen.strokeRect(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )

  6. 102-particle-system_fountain_synth Doc

    ... rld.gravity= RedVector2D.newFrom(w.mouse/([width, height])-0.5); }); //--render Pen.strokeColor= Color.white; sys.do{|o| //iterate all particles Pen.addOval(Rect.aboutRedObject2D(o)); }; Pen.stroke; }; w.play; CmdPeriod.doOnce({w.close}); } ...

  7. things_you_wanna_know Doc

    ... t to know: Filter: GUI Tutorial Rendering isn't always available Qt limitations Pen usage and resource management Tutorials/GUI | Tutorials > GUI'>GUI GUI: Things you probably want to know Miscellaneous things you probably want to know abou ...

  8. 001-single Doc

    ... loc, vel, acc, 1, 10); //world,loc,vel,acc,mass,size }.dup(n); //--loop w.draw{ Pen.strokeColor= Color.white; world.objects.do{|o| //iterate all objects in this world o.addForce(o.world.gravity); //add gravity o.update; //object update worl ...

  9. 150-track_synth Doc

    ... ynth(\beating), \prefFreq: mass.linexp(2, 20, 2000, 200), //a favourite pitch depends on mass \target: nil //location for that pitch if found ); a.sense= { var listen= human.state.freq; if(listen>0 and:{(a.state.prefFreq-listen).abs<100}, { ...

  10. 052-boids3 Doc

    ... Wander2D; }); o.addForce(world.gravity); o.update; world.contain(o); //--render Pen.fillColor= Color.grey(1-(i/n), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )

prev 11 12 13 14 15 16 17 18 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow