Skip to content

Instantly share code, notes, and snippets.

View rosejn's full-sized avatar

Jeff Rose rosejn

View GitHub Profile
@rosejn
rosejn / gist:2885724
Created June 7, 2012 00:24 — forked from samaaron/gist:2885344
Dancer with colors and motion paths
(ns examples.rotating-spheres
(:use [quil.core]))
(defn rand-circle-coords []
(let [max-x (* 2 (width))
max-y (* 2 (height))
max-z 800]
[(random (- max-x) max-x) (random (- max-y) max-y) (random (- max-z) max-z)]))
(def circle-coords
@rosejn
rosejn / gist:1016751
Created June 9, 2011 13:44
tone-rich gui
(defn- tr-gui []
(-> (surface "Tone Reich" 300 200)
(fader :cutoff 579 :x 20 :y 15 :mul 2000)
(button :wave true :x 50 :y 85)
(fader :r 0.309 :x 80 :y 15)
(dial :attack 0.059 :x 120 :y 10)
(dial :decay 0.039 :x 120 :y 50 :mul 4)
(dial :sustain 0.269 :x 120 :y 90)
(dial :release 3.6 :x 120 :y 130 :mul 6)
(fader :bass-rate 0.38 :x 160 :y 15)
(use 'overtone.sc)
(boot)
(hit) ; makes a test noise
(hit (now) "kick") ; hits the kick drum right now
(hit (+ (now) 1000) "kick") ; hits the kick drum in 1 second (1,000 ms)
(quit)