Submit Browse Random
Anonymous Login RSS

SuperCollider Code

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

    ... olors.add(Color.red(rrand(0.0, 1), rrand(0.4, 0.8))) }; makeLine = { arg index; Pen.color = Color.black; Pen.fillOval(Rect(currentForLine.x - 1, currentForLine.y + 3, width: 2, height: 8 )); Pen.stringAtPoint( index.asString, currentForLine ...

  2. 174-springs_interconnected Quark

    ... {|x| x.notNil}; }.flat; syns= {Synth(\imp)}.dup(n); //--loop w.draw{ //--render Pen.smoothing= true; Pen.strokeColor= Color.white; sprs.do{|spr| spr.update; //--render springs Pen.moveTo(spr.object.loc.asPoint); Pen.quadCurveTo(spr.target.l ...

  3. ColorPickerUI Quark

    ... lider setup v_slider.background_( Color.black ); v_slider.drawFunc_( { | view | Pen.width = 1; if (margin.notNil, { (view.bounds.width - (margin * 2)).do( { |index| Pen.strokeColor_( this.hsvToColor( [ index.linlin( 0, (view.bounds.width - ...

  4. RoundView Quark

    ... ; } drawFocusRing { |rect, radius| if( this.hasFocus ) { if( GUI.id === \qt ) { Pen.use({ Pen.width = 1.5; Pen.color = Color.white.alpha_(0.75); Pen.roundedRect( rect.insetBy(1,1), radius-1 ).stroke; Pen.color = focusColor ?? { Color.blue.h ...

  5. MIDIKeyboardWindow Quark

    ... | bounds = theWindow.bounds; //userView.bounds = bounds.copy.top_(0).left_(0); Pen.color = Color.black; nWhiteKeys.do( { |i| var position, keyWidth; keyWidth = bounds.width / nWhiteKeys; position = keyWidth * i; if( activeKeys.includes( i ...

  6. HistoryMeter Quark

    ... eight, width; height = this.bounds.height; width = this.bounds.width.asInteger; Pen.moveTo( 0 @ history[pos].linlin(0,1,height,0) ); (history.size).do({ |item, i| Pen.lineTo( (i+1) @ history.wrapAt(pos+i).linlin(0,1,height,0) ); }); Pen.lin ...

  7. GMLineMultiSlider Quark

    ... or); if(thisFillShape) { this.prFillShape; }; // Draw beat if(thisBeat != -1) { Pen.fillColor_(super.beatColor); if(super.orientation == \horizontal) { Pen.fillRect( Rect( super.interactionRect.left + (thisBeat * (super.interactionRect.widt ...

  8. 172-springs_chain Quark

    ... mouse input trg.loc= w.mouse; }); sprs.do{|spr| spr.update; //--render springs Pen.strokeColor= Color.grey; Pen.line(spr.object.loc.asPoint, spr.target.loc.asPoint); Pen.stroke; }; objs.do{|obj| obj.addForce(world.gravity); obj.update; wor ...

  9. 190-kmeans Quark

    ... |o, i| var index= kmeans.classifications[i]; var cent= kmeans.centroids[index]; Pen.strokeColor= colors[index]; Pen.line(o.loc.asPoint, cent.asPoint); Pen.stroke; Pen.strokeColor= Color.white; Pen.strokeRect(Rect.aboutRedVector2D(o.loc, o.s ...

  10. 044-pendulum-1d Quark

    //simple pendulum in a world with gravity ( var width= 300, height= 100, w, wgrav, world, n= 1, ploc; //--world w= RedWindow("pendulum test 1d", Rect(128, 64, width, height)).front; wgrav= RedVector[0.5]; world= RedWorld(RedVector[width], w ...

prev 11 12 13 14 15 16 17 18 19 20 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow