Last active
August 29, 2015 14:05
-
-
Save Agnostic/0ca2536acd908d5db056 to your computer and use it in GitHub Desktop.
Revisions
-
Agnostic revised this gist
Aug 8, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ (au:update-graph) ; Variables (define initialNote 48) ; C / Do ; Internal Variables (define note initialNote) -
Agnostic revised this gist
Aug 8, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,7 @@ (au:update-graph) ; Variables (define initialNote 48) ; DO ; Internal Variables (define note initialNote) -
Agnostic revised this gist
Aug 8, 2014 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -103,10 +103,8 @@ (set! tone 0) ) ; Calling loop again (callback (+ (now) (* 0.20 *second*)) loop ) ) ) -
Agnostic revised this gist
Aug 8, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ ; C Major Chord ; By Gilberto Avalos ; You need Impromptu to run this script ; http://impromptu.moso.com.au/downloads.html ; Clear all (au:clear-graph) -
Agnostic created this gist
Aug 8, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,112 @@ ; C Major Chord ; By Gilberto Avalos ; Clear all (au:clear-graph) ; Define piano instrument (define piano (au:make-node "aumu" "dls " "appl")) (au:connect-node piano 0 *au:output-node* 0) (au:update-graph) ; Variables (define initialNote 48) (define scales 3) ; Internal Variables (define note initialNote) (define notes 0) ; Play function (define play (lambda (base_note bass) ; Bass (if (> bass 0) (play-note (now) piano bass 80 15000) ) (if (and (= notes 0) (> note base_note) ) (set! note (+ note 1)) ) (if (= notes 2) (set! notes -1) ) ; (print "Play Note" note notes) ; Play note (play-note (now) piano note 100 10000) (if (< notes 1) (set! note (+ note 4)) ) (if (= notes 1) (set! note (+ note 3)) ) (set! notes (+ notes 1)) ) ) ; Tone (define tone 0) ; Loop function (define loop (lambda () (define bass 0) ; First tone (if (= tone 0) (set! note initialNote) ) ; Bass 1 (if (= tone 0) (set! bass (- initialNote 12)) ) ; Second tone (if (= tone 3) (set! note (+ initialNote 2)) ) ; Bass 2 (if (= tone 3) (set! bass (- (+ initialNote 4) 12)) ) ; Third tone (if (= tone 6) (set! note (+ initialNote 7)) ) ; Bass 3 (if (= tone 6) (set! bass (- (+ initialNote 7) 12)) ) ; Call Play (play note bass) ; Increase tone (set! tone (+ tone 1)) ; Reset tone to 0 (if (= tone 9) (set! tone 0) ) ; If note < max scales (if (< note (+ initialNote (* 12 scales) ) ) (callback (+ (now) (* 0.20 *second*)) loop ) ) ) ) ; Call loop (loop)