Skip to content

Instantly share code, notes, and snippets.

@jcbozonier
Created April 10, 2009 04:54
Show Gist options
  • Save jcbozonier/92945 to your computer and use it in GitHub Desktop.
Save jcbozonier/92945 to your computer and use it in GitHub Desktop.
(au:clear-graph)
(define piano (au:make-node "aumu" "dls " "appl"))
(au:connect-node piano 0 *au:output-node* 0)
(au:update-graph)
(define play-seq
(lambda ()
(play-note (now) piano 60 80 10000)
(play-note (+ (now) 22050) piano 64 80 10000)
(play-note (+ (now) 44100) piano 67 80 10000)))
(define foo
(lambda ()
(let ((note-length (random '(0.25 0.5 1.0 2.0))))
(play-note (now) piano (random 60 80) 80 (* *second* note-length))
(callback (+ (now) (* note-length *second*)) 'foo))))
(foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment