On Apr 19, 2010, at 4:21 PM, Adam wrote: >>> (define p5 (make-cycle ' (200 220 240 240))) >>> (define p7 (make-cycle '(300 320 340 (next p5))))
ok, first here is what you perhaps want to do: (define p5 (make-cycle ' (200 220 240 240))) (define p7 (make-cycle (list 300 320 340 (next p5)))) (next p7 20) =>(300 320 340 200 300 320 340 200 300 320 340 200 300 320 340 200 300 320 340 200) the use of (list ..) can be rewritten using scheme's BACKQUOTE ` so this is the same thing: (define p5 (make-cycle ' (200 220 240 240))) (define p7 (make-cycle `(300 320 340 , (next p5)))) BUT i think you really want: (define p7 (make-cycle `(300 320 340 ,(make-cycle '(200 220 240 240) :for 1)))) => (300 320 340 200 300 320 340 220 300 320 340 240 300 320 340 240 300 320 340 200) notice that you get your single items from the inner pattern spread out over the outer pattern -- that is, the period length of the inner pattern is 1 so you only get its next element each time the outer pattern starts over _______________________________________________ Cmdist mailing list [email protected] http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
