;; this is an interesting process that i kept in two step form for explanation. ;; first step: ;; this function takes in a really fat list of numbers such as bone.lisp and guit.lisp and by ;; using a randomly chosen number, picks one of the numbers in the list, and starts from it a ;; new sub-list of 400 numbers. (defun listmake (in) (setf number (length in)) (setf edwu (random number)) (if (< 400 (- number edwu)) (setf gonzo (subseq in edwu (+ edwu 400))) (print '(try again)))) ;; second step: ;; this program pulls the decimal amplitudes from a pre-made list of 400, from ;; above, and computes them into 1 bit representations (0 thru 9 and a) that ;; PlaNet can understand. you mapcar the following function to the 'gonzo' ;; list made in the function above. (defun listgrab (input) (cond ((<= input -.175) (print 0)) ((and (<= input -.050) (> input -.175)) (print 1)) ((and (<= input -.015) (> input -.050)) (print 2)) ((and (<= input -.005) (> input -.015)) (print 3)) ((and (<= input -.0005) (> input -.005)) (print 4)) ((and (> input -.0005) (< input .0005)) (print 5)) ((and (>= input .0005) (< input .005)) (print 6)) ((and (>= input .005) (< input .015)) (print 7)) ((and (>= input .015) (< input .050)) (print 8)) ((and (>= input .050) (< input .175)) (print 9)) ((>= input .175 ) (print 'a)))) ;; you can then type (print (setf gonzo2 (mapcar #'listgrab gonzo))) ;; to organize and print the numbers as a list. ;; from there, a few really simple replace calls, and you've got data ready ;; to be learned.