Submit Browse Random
Anonymous Login RSS

SuperCollider Code

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

    ... { o.addForce(o.gravityForce(oo)); }); }; o.update; world.contain(o); //--render Pen.strokeColor= Color.blue; Pen.strokeOval(Rect.aboutRedObject2D(o)); }; world.objects.do{|o, i| bary= bary+(o.loc*o.mass); }; bary= bary/totalMass; Pen.fillCo ...

  2. 021-superfriction Quark

    ... el= obj.vel*0; //stop object }); }); obj.update; world.contain(obj); //--render Pen.fillColor= Color.green; Pen.fillRect(fric); Pen.strokeColor= Color.white; Pen.strokeRect(Rect.aboutRedObject2D(obj)); }; w.play; CmdPeriod.doOnce({w.close}) ...

  3. ScaledUserViewWindow Quark

    ... route them to its ScaledUserView. w = ScaledUserViewWindow ( ); w.drawFunc = { Pen .width = 0.05 ; Pen .line( 0.1 @ 0.1 , 0.9 @ 0.9 ).stroke; }; // now move the sliders and see what happens w.gridLines = [ 10 , 4 ]; ( // grab and move poin ...

  4. SVGTransform Quark

    ... ranslate( 20, 10 ) scale( 1.5 ) rotate( 45, 0, 0 )" this would convert into GUI.pen functions as follows: SVGTransform ( "translate( 20, 10 ) scale( 1.5 ) rotate( 45, 0, 0 )" ).asGUICode; /* result: GUI.pen.translate( 20, 10 ); GUI.pen.scal ...

  5. 009-multiple-3d_synth Quark

    ... e }.dup(n); synths= {Synth("fm3Dtest", [\amp, 0.5/n])}.dup(n); //--loop w.draw{ Pen.strokeColor= Color.grey(0.5); Pen.strokeRect(Rect.aboutRedVector3D(RedVector[width/2, height/2, depth], width/2, width, height, depth, ss, ff)); Pen.strokeC ...

  6. sCluster Quark

    ... SGUI.report(win); SGUI.adapt(win); backgroundImage= Image(200, 200).draw({|img| Pen.fillColor= palette.highlight.complementary; Pen.translate(img.width*0.5, img.height*0.5); 500.do{Pen.addRect(Rect(20.gauss(20), 20.gauss(20), 1, 1))}; Pen.f ...

  7. _DrawLib Quark

    ... ontSize ? 36) }; u.background_(ev.bg ?? { Color.rand(0.80, 0.9).alpha_(0.5) }); Pen.font_(font); Pen.translate(u.bounds.width / 2, u.bounds.height / 2); Pen.scale(scaleFactor, scaleFactor); ev.pos !? { Pen.translate(ev.pos.x, ev.pos.y) }; P ...

  8. CompressorUI Quark

    ... Nil, { orbit.set(key, val); }); }) }; } // Function to draw the grid drawGrid { Pen.color = Color.new255(150, 150, 150); Pen.width = 0.5; // Draw vertical grid lines (Input Level) (0..height).do { |x| if (x % (height / 10) == 0, {Pen.line(P ...

  9. 232-3Dline Quark

    ... a*2]; line.update; //--render line.render(1, 100); //1= exaggerate, 2= standard Pen.translate(width*0.5, height*0.5); Pen.strokeColor= Color.white; line.drawOutlines; Pen.fillColor= Color.white; line.draw(10); //dotSize }; w.play; CmdPeriod ...

  10. USoundFilePlotWindow Quark

    ... n( "Export selection as new SoundFile...", { ULib.savePanel({ |path| soundFile.openRead( soundFile.path ); soundFile.uExportSelection( path, startFrame: startFrame, numFrames: numFrames ); soundFile.close; }, {}, soundFile.path.dirname +/+ ...

prev 21 22 23 24 25 26 27 28 29 30 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow