<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&#39;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&amp;utm_source=link&amp;utm_campaign=sig-email&amp;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&amp;utm_source=link&amp;utm_campaign=sig-email&amp;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">&lt;<a href="mailto:aykut_caglayan@yahoo.com" target="_blank">aykut_caglayan@yahoo.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&#39;sprout&#39; is sprouting a &#39;process&#39;.<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 &#39;((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 &quot;mp:midi&quot; :dur i)<br>
             (wait i))))<br>
<br>
(sprout (make-rhy-list 2))<br>
<br>
&gt; Message: 2<br>
&gt; Date: Fri, 16 Jun 2017 11:58:15 +0200<br>
&gt; From: Nikolaj Tollenaar &lt;<a href="mailto:nikoltoll@gmail.com">nikoltoll@gmail.com</a>&gt;<br>
&gt; To: <a href="mailto:cmdist@ccrma.Stanford.EDU">cmdist@ccrma.Stanford.EDU</a><br>
&gt; Subject: [CM] problem with list construction for rhythms<br>
&gt; Message-ID:<br>
&gt;       &lt;CAM4zxbXpu=<a href="mailto:e5brMrN8f1-mj2NpAbAHT8YShFhMUSYDssP%2BL2BQ@mail.gmail.com">e5brMrN8f1-<wbr>mj2NpAbAHT8YShFhMUSYDssP+L2BQ@<wbr>mail.gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<div class="HOEnZb"><div class="h5">&gt;<br>
&gt; Dear all,<br>
&gt;<br>
&gt; I&#39;m trying to construct a rhythm value list through this function:<br>
&gt;<br>
&gt; (define (make-rhy-list length)<br>
&gt;   ;; chooses random groupings of values<br>
&gt;        (loop with rhy = (list) repeat length<br>
&gt;               do<br>
&gt;               (set! rhy (concat rhy (pick &#39;((1/4 1/4)<br>
&gt;                                   (1/3 1/3 1/3)<br>
&gt;                                   (1/8 1/8 1/8 1/8)<br>
&gt;                                   (1/16 1/16 1/8 1/16 1/8 1/16 1/8)<br>
&gt;                                   1/2 1/2))))<br>
&gt;               finally (return rhy)))<br>
&gt;<br>
&gt; But, when I use these in a sprout, all notes are played simultaneously.<br>
&gt;<br>
&gt; (define rhy-lst1 (make-rhy-list 20))<br>
&gt; (sprout (play-pattern (make-cycle &#39;(70 72 80 88)) (make-cycle rhy-lst1) 160<br>
&gt; 115 0.9))<br>
&gt;<br>
&gt; Why is this and what can I do about it?<br>
&gt;<br>
&gt; If I use the single element construction, sprout works as expected.<br>
&gt;<br>
&gt; Like so:<br>
&gt;<br>
&gt; (define (make-rhy-list length)<br>
&gt;   ;; chooses random single values<br>
&gt;   (loop for key from 1 to length<br>
&gt;         collect (pick &#39;(1/4 1/4 1/4 1/8 1/8 1/16 1/2 1/2))))<br>
&gt;<br>
&gt; Greetings,<br>
&gt;<br>
&gt; Nikolaj<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>