Submit Browse Random
Anonymous Login RSS

SuperCollider Code

All (764) Code (64) Doc (175) Help (16) Quark (509) SCDoc ↗ Forum ↗ Google ↗
  1. Switch by simon (Dindoléon) Code

    ... r margin = view.bounds.height * 0.01; if( margin < 4, { margin = 4 } ); Pen.fillColor_( states[current_state][2] ); Pen.fillRect( Rect( 0, 0, view.bounds.width, view.bounds.height ) ); Pen.fillCo ...

  2. GrainOTec by simon (Dindoléon) Code

    ... rray; }; // Slider Draw Function draw_slider = { | slider, value, color | Pen.width = stroke_size; // Draw the frame Pen.strokeColor = Color.white; Pen.fillColor = Color.black; Pen.addRect(Rect(0, 0, slider.bounds.width,slid ...

  3. Galton Board Simulator by simon (Dindoléon) Code

    ... barSize = view.bounds.height * displayRatio * timesNotesWerePlayed[index]; Pen.fillColor_( Color( myFavoriteColor.red + (mySecondFavoriteColor.red - myFavoriteColor.red * timers[index]), myFavoriteColor.green + ...

  4. Re: Recursion-toy-like vines with Pen by vividsnow (vividsnow) Code

    ... t.scale; radius = that.radius * scale; // Draw outline Pen.line(that.ox@that.oy,that.x@that.y); // not in qt... if((GUI.scheme == "CocoaGUI") and: (radius > 5.0), { Pen.setShadow(1@1, scal ...

  5. Graphic illustration of granular time-stretching by 0-7r (jamshark70) Code

    ... , ratioSl, d, indexSl; var viewWidth = 500; var buf, synth; f = SoundFile.openRead(p); f.seek(86965); f.readData(d = Signal.newClear((f.sampleRate * 0.333).roundUp)); f.close; w = Window("granular windows", Rect(800, 200, viewWid ...

  6. Space Game by mjsyts (mjsyts) Code

    ... ) .frameRate_(15) .drawFunc_({ starY = (starY+1).wrap(0,hudRect.top); Pen.translate(0, starY); Pen.use({ starArray.do({ arg item; Pen.addOval(Rect( item.at(0), item.at(1), item.at(2), item.at(2) ) ...

  7. Pong by dilots (dilots) Code

    ... e, { |out=0, gain=0.5, length=1, freq=200, depth=20| var bounce, freqenv, ampenv; freqenv = EnvGen.kr(Env.perc(0.01,length,depth)); ampenv = EnvGen.kr(Env.perc(0.01,length,1.0),doneAction:2); bounce = SinOsc.ar(freq+freqenv)!2 * a ...

  8. ColorPicker ( HSV to Color ), RAW Version by simon (Dindoléon) Code

    ... r.blue = color.blue + m; color; }; h_slider.drawFunc_( { | view | Pen.width = 1; view.bounds.height.do( { | index | Pen.strokeColor_( hsv_to_color.value( [ index.linlin( 0, view.bounds. ...

  9. Scanned Synthesis Visualisation by matthew-kane (Matthew Kane) Code

    ... .drawFunc = { |view| var jumpwidth = view.bounds.width / (~numsprings-1); Pen.fillColor = Color.black; Pen.strokeColor = Color.black; ~springs.do({ |spring, i| var height = (spring/~max*view.bounds.height/2) + (view.bounds.h ...

  10. Chopsticks GUI by ludions (ludions) Code

    ... I example of nesting Views and multiplying widgets, including mouse actions and Pen drawing for each of the views. Thanks to hjh for spotting an early bug on sc-users. Add your own sound... ( var numX=12, numY=8, width, height, margin; w ...

prev 1 2 3 4 5 6 7 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow