'sprout' is sprouting a 'process'. My suggestion: (define (make-rhy-list length) ;; first create your rhythm list and assign it to a variable (let ((rhy-list (loop with rhy = (list) repeat length do (set! rhy (concat rhy (pick '((1/4 1/4) (1/3 1/3 1/3) (1/8 1/8 1/8 1/8) (1/16 1/16 1/8 1/16 1/8 1/16 1/8) 1/2 1/2)))) finally (return rhy)))) ;;use the rhythm list within a process (process for i in rhy-list do ;;you might want to send it through midi (send "mp:midi" :dur i) (wait i))))
(sprout (make-rhy-list 2)) > Message: 2 > Date: Fri, 16 Jun 2017 11:58:15 +0200 > From: Nikolaj Tollenaar <nikolt...@gmail.com> > To: cmdist@ccrma.Stanford.EDU > Subject: [CM] problem with list construction for rhythms > Message-ID: > <CAM4zxbXpu=e5brmrn8f1-mj2npabaht8yshfhmusydssp+l...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear all, > > I'm trying to construct a rhythm value list through this function: > > (define (make-rhy-list length) > ;; chooses random groupings of values > (loop with rhy = (list) repeat length > do > (set! rhy (concat rhy (pick '((1/4 1/4) > (1/3 1/3 1/3) > (1/8 1/8 1/8 1/8) > (1/16 1/16 1/8 1/16 1/8 1/16 1/8) > 1/2 1/2)))) > finally (return rhy))) > > But, when I use these in a sprout, all notes are played simultaneously. > > (define rhy-lst1 (make-rhy-list 20)) > (sprout (play-pattern (make-cycle '(70 72 80 88)) (make-cycle rhy-lst1) 160 > 115 0.9)) > > Why is this and what can I do about it? > > If I use the single element construction, sprout works as expected. > > Like so: > > (define (make-rhy-list length) > ;; chooses random single values > (loop for key from 1 to length > collect (pick '(1/4 1/4 1/4 1/8 1/8 1/16 1/2 1/2)))) > > Greetings, > > Nikolaj > > _______________________________________________ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist