;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*- ;trying to fix longdurs supplanting et's 631 points (define headings (make-cycle '( 258.6 299.5 334.1 38.5 318.5 210.3 215.1 255.5 210.3 221.3 270 297.6 320.2 188.9 239.5 285.7 277 254.2 212.4 209.8 172.1 191.1 308 327.1 242.8 111.3 161.9 329.3 163.5 168.7 ))) (define slopes (make-cycle '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30))) (define speeds (make-cycle '(.125 .125 .125 .125 .125 .25 .25 .25 .25 .25 .5 .5 .5 .5 .5 .75 .75 .75 .75 .75 1 1 1 1 1 1.5 1.5 1.5 1.5 1.5 ))) (define (ruby4 zeronote fullcirclenote shortestnote longestnote quantVal longdurs longdurchanceenv datapoints) (let* ( (longdurs longdurs) (datapoints datapoints) (shortestnote shortestnote) (longestnote longestnote) (longdurchanceenv longdurchanceenv) (quantVal quantVal) (count 0) (newkey 0) (thelongdur 0) (longdurchance 0) (thecase 0) (theslope 0) (outrhythm 0) (start-time 0) (thedurpick 0) (waittime 0) (thespeed 0) (thedur 0) (theheading 0) (theamp 0) (zeronote zeronote) (fullcirclenote fullcirclenote) ) (process repeat datapoints do (set! theslope (next slopes)) (print "theslope is") (print theslope) (cond ((and (>= theslope 1) (<= theslope 5)) (begin (print "chose case 0") (set! thecase 0) )) ((and (>= 6 theslope) (<= theslope 10)) (begin (print "chose case 1") (set! thecase 1) )) ((and (>= theslope 11 ) (<= theslope 15)) (begin (print "chose case 2") (set! thecase 2) )) ((and (>= theslope 16) (<= theslope 20)) (begin (print "chose case 3") (set! thecase 3) )) ((and (>= theslope 21 ) (<= theslope 25)) (begin (print "chose case 4") (set! thecase 4) )) ((and (>= theslope 26) (< theslope 30)) (begin (print "chose case 5") (set! thecase 5) )) ) append (set! longdurchance (interp count longdurchanceenv)) (if (<= (random longdurchance) 1) (begin (set! thedurpick (floor (interp count 0 0 631 (- (length longdurs) 1 )))) (set! thelongdur (nth longdurs thedurpick)) (mp:midi :time start-time :key (pick 28 29) :dur (quantize thelongdur quantVal) :amp 1 :chan 0) (mp:midi :time start-time :key newkey :dur (quantize thelongdur quantVal) :amp (between 0.6 0.75) :chan 1) (mp:midi :time start-time :key (+ newkey (pick 8 9)) :dur (quantize thelongdur quantVal) :amp (between 0.6 0.75) :chan 1) (set! start-time (+ start-time thelongdur)) ) ) (set! outrhythm .5) (set! theheading (next headings)) (set! newkey (floor (rescale theheading 0 359.4 zeronote fullcirclenote))) (set! theamp (between 0.6 0.75)) (case thecase ((0) (print "IN CASE 0") (mp:midi :time start-time :key (pick 28 29) :dur outrhythm :amp theamp :chan 0);normal E0 and F0 (mp:midi :time start-time :key newkey :dur outrhythm :amp theamp :chan 1) (set! start-time (+ start-time outrhythm)) ) ((1) (print "IN CASE 1-pizz") (mp:midi :time start-time :key 90 :dur outrhythm :amp theamp :chan 0) ;pizz (mp:midi :time start-time :key newkey :dur outrhythm :amp theamp :chan 1) (set! start-time (+ start-time outrhythm)) ) ((2) (print "IN CASE 2") (mp:midi :time start-time :key (pick 28 29) :dur outrhythm :amp theamp :chan 0) ;normal (mp:midi :time start-time :key newkey :dur outrhythm :amp theamp :chan 1) (mp:midi :time start-time :key (+ 4 newkey) :dur outrhythm :amp theamp :chan 1) (set! start-time (+ start-time outrhythm)) ) ((3) (print "IN CASE 3") (mp:midi :time start-time :key 89 :dur outrhythm :amp theamp :chan 0) (mp:midi :time start-time :key newkey :dur outrhythm :amp theamp :chan 1) (set! start-time (+ start-time outrhythm)) ) ((4) (print "IN CASE 4") (mp:midi :time start-time :key (pick 28 29) :dur outrhythm :amp theamp :chan 0);normal E0 and F0 (mp:midi :time start-time :key newkey :dur outrhythm :amp theamp :chan 1) (mp:midi :time start-time :key (+ 2 newkey) :dur outrhythm :amp theamp :chan 1) (set! start-time (+ start-time outrhythm)) ) ((5) (print "IN CASE 5") (mp:midi :time start-time :key 91 :dur outrhythm :amp theamp :chan 0) (mp:midi :time start-time :key newkey :dur outrhythm :amp theamp :chan 1) (set! start-time (+ start-time outrhythm)) ) ) ) ) ) (sprout (ruby4 36 82 .125 1 .125 '(2 1 .75 1 2) '(0 1000 630 1000 ) 100))