<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:x-small">Thank you for your response, but this is not the problem. I see I forgot to include my play-pattern function that includes the process (sorry for that):<br><br>(define (play-pattern pat rhy times tmpo ampl)<br> ;; plays pattern times times, with tempo tmpo and amplitude ampl:<br> (let* ((dur (in-tempo 1/4 tmpo)))<br> (process repeat times<br> for x = (next pat)<br> for y = (next rhy)<br> do<br> (if (number? x)<br> (mp:midi :key x :dur dur :amp (* ampl (pick .9 .95 1 .85))))<br> (wait (in-tempo y tmpo))<br> )))<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:x-small">The problem arises when I want to use this pattern based composition. make-cycle on the rhythm list made through concat doesn't work (all notes played simultaneously), whereas the rhythm list made through collect *does* work (music plays).<br><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:x-small">I am using Grace 3.9.0 on Windows.<br></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virusvrij. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>                 </td>
        </tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-16 22:09 GMT+02:00 Aykut Caglayan <span dir="ltr"><<a href="mailto:aykut_caglayan@yahoo.com" target="_blank">aykut_caglayan@yahoo.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">'sprout' is sprouting a 'process'.<br>
My suggestion:<br>
<br>
(define (make-rhy-list length)<br>
;; first create your rhythm list and assign it to a variable<br>
(let ((rhy-list (loop with rhy = (list) repeat length<br>
<span class=""> do<br>
(set! rhy (concat rhy (pick '((1/4 1/4)<br>
(1/3 1/3 1/3)<br>
(1/8 1/8 1/8 1/8)<br>
(1/16 1/16 1/8 1/16 1/8 1/16 1/8)<br>
1/2 1/2))))<br>
</span> finally (return rhy))))<br>
;;use the rhythm list within a process<br>
(process for i in rhy-list<br>
do<br>
;;you might want to send it through midi<br>
(send "mp:midi" :dur i)<br>
(wait i))))<br>
<br>
(sprout (make-rhy-list 2))<br>
<br>
> Message: 2<br>
> Date: Fri, 16 Jun 2017 11:58:15 +0200<br>
> From: Nikolaj Tollenaar <<a href="mailto:nikoltoll@gmail.com">nikoltoll@gmail.com</a>><br>
> To: <a href="mailto:cmdist@ccrma.Stanford.EDU">cmdist@ccrma.Stanford.EDU</a><br>
> Subject: [CM] problem with list construction for rhythms<br>
> Message-ID:<br>
> <CAM4zxbXpu=<a href="mailto:e5brMrN8f1-mj2NpAbAHT8YShFhMUSYDssP%2BL2BQ@mail.gmail.com">e5brMrN8f1-<wbr>mj2NpAbAHT8YShFhMUSYDssP+L2BQ@<wbr>mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
<div class="HOEnZb"><div class="h5">><br>
> Dear all,<br>
><br>
> I'm trying to construct a rhythm value list through this function:<br>
><br>
> (define (make-rhy-list length)<br>
> ;; chooses random groupings of values<br>
> (loop with rhy = (list) repeat length<br>
> do<br>
> (set! rhy (concat rhy (pick '((1/4 1/4)<br>
> (1/3 1/3 1/3)<br>
> (1/8 1/8 1/8 1/8)<br>
> (1/16 1/16 1/8 1/16 1/8 1/16 1/8)<br>
> 1/2 1/2))))<br>
> finally (return rhy)))<br>
><br>
> But, when I use these in a sprout, all notes are played simultaneously.<br>
><br>
> (define rhy-lst1 (make-rhy-list 20))<br>
> (sprout (play-pattern (make-cycle '(70 72 80 88)) (make-cycle rhy-lst1) 160<br>
> 115 0.9))<br>
><br>
> Why is this and what can I do about it?<br>
><br>
> If I use the single element construction, sprout works as expected.<br>
><br>
> Like so:<br>
><br>
> (define (make-rhy-list length)<br>
> ;; chooses random single values<br>
> (loop for key from 1 to length<br>
> collect (pick '(1/4 1/4 1/4 1/8 1/8 1/16 1/2 1/2))))<br>
><br>
> Greetings,<br>
><br>
> Nikolaj<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>