Does somebody found something?<br><br><div class="gmail_quote">2009/4/10 Alexandre Ficagna <span dir="ltr">&lt;<a href="mailto:alrefi@ibest.com.br">alrefi@ibest.com.br</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sorry, I forgot the example:<br><br><pre>(<span>define</span> (<span>play-pats</span> pats trope reps rate)<br>  (<a>process</a> with dur = (* rate 2.5)<br>
           repeat reps<br>           for len = (<a>pick</a> 8 12 16)<br>           for pat = (make-instance (<a>next</a> pats)<br>
                                    <span>:keynums</span> trope<br>                                    <span>:for</span> len)<div class="im"><br>           each k in (<a>next</a> pat #t) as x from 0 by rate<br></div>
           output (<a>new</a> <a>midi</a> <span>:time</span> (+ (<a>now</a>) x)<br>
                       <span>:keynum</span> k<br>                       <span>:duration</span> dur)<br>           wait (* rate len)))<br><br><span>;;; a pattern of pattern class names</span><br>
(<span>define</span> <span>pcns</span><br>  (<a>new</a> <a>weighting</a> <span>:of</span> &#39;((heap <span>:weight</span> 2) line cycle<br>
                    palindrome rotation))<br><br>(<a>events</a> (play-pats pcns &#39;(a4 b c5 d) 12 .1) <span>&quot;test.mid&quot;</span>)<br><span>&rArr;</span> <span>&quot;test.mid&quot;</span><br>
</pre>The error messages listed before occurs when evaluating &quot;play-pats&quot;.<br><br><div class="gmail_quote">2009/4/8 Alexandre Ficagna <span dir="ltr">&lt;<a href="mailto:alrefi@ibest.com.br" target="_blank">alrefi@ibest.com.br</a>&gt;</span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Here they are:<br><br>&nbsp;/\\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>---\\\---------<br>----\\\--------<br>----/\\\------- Common Music 2.11.3<br>

---/--\\\------<br>--/----\\\-----<br>&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \\\/&nbsp;&nbsp; <br><br><br>OK<br>OK; in: LAMBDA NIL<br>;&nbsp;&nbsp;&nbsp;&nbsp; (CM:PROCESS CM::WITH CM::DUR = (* CM::RATE 2.5) CM::REPEAT CM::REPS CM::FOR<br>
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CM::LEN = (CM:PICK 8 12 16) CM::FOR ...)<br><br>; <br>; caught ERROR:<br>;&nbsp;&nbsp; (in macroexpansion of (PROCESS WITH DUR ...))<br>;&nbsp;&nbsp; (hint: For more precise location, try *BREAK-ON-SIGNALS*.)<br>;&nbsp;&nbsp; illegal loop syntax<br>


<br>;&nbsp;&nbsp;&nbsp;&nbsp; (SB-INT:NAMED-LAMBDA CM::PLAY-PATS (CM::PATS CM::TROPE CM::REPS CM::RATE)<br>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (BLOCK CM::PLAY-PATS<br>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (CM:PROCESS CM::WITH CM::DUR = (* CM::RATE 2.5)<br>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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REPS CM::FOR CM::LEN =<br>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (CM:PICK 8 12 16) CM::FOR ...)))<br>


; <br>; caught STYLE-WARNING:<br>;&nbsp;&nbsp; The variable PATS is defined but never used.<br><br>; <br>; caught STYLE-WARNING:<br>;&nbsp;&nbsp; The variable TROPE is defined but never used.<br><br>; <br>; caught STYLE-WARNING:<br>;&nbsp;&nbsp; The variable REPS is defined but never used.<br>


<br>; <br>; caught STYLE-WARNING:<br>;&nbsp;&nbsp; The variable RATE is defined but never used.<br>; <br>; compilation unit finished<br>;&nbsp;&nbsp; caught 1 ERROR condition<br>;&nbsp;&nbsp; caught 4 STYLE-WARNING conditions<div><br><br>LOOP ERROR: &#39;each&#39; does not support initializations.<br>


clause context: &#39;EACH K IN (NEXT PAT T)&#39;<br><br></div>STYLE-WARNING: redefining PLAY-PATS in DEFUN<br><br>OK<br><br><div class="gmail_quote">2009/4/8 Heinrich Taube <span dir="ltr">&lt;<a href="mailto:taube@uiuc.edu" target="_blank">taube@uiuc.edu</a>&gt;</span><div>

<div></div><div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">can you please send me the full code example? also tell me what version of cm you are using.<div>


<div></div><div><br>
<br>
On Apr 7, 2009, at 5:48 PM, Alexandre Ficagna wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>
Hy,<br>
<br>
I was studying Patterns topic in CM2 and got errors trying to do Example 3 (Creating patterns programatically).<br>
Part of the error message says:<br>
<br>
LOOP ERROR: &#39;each&#39; does not support initializations.<br>
clause context: &#39;EACH K IN (NEXT PAT T)&#39;<br>
<br>
I tried many things (actually I&#39;m a beginner, so it complicates a lot), and it did work when I substituted line:<br>
 &nbsp; &nbsp;each k in (next pat #t) as x from 0 by rate<br>
<br>
by these two lines:<br>
for x from 0 by rate<br>
each k in (next pat #t)<br>
the console gave me no error messages, by I think the sound result was not the expected (it should vary each evaluation, but keeps the same).<br>
<br>
How can I correct this?<br>
<br>
Thanks.<br>
Alexandre Ficagna<br>
-- <br>
<a href="http://www.myspace.com/alexandreficagna" target="_blank">www.myspace.com/alexandreficagna</a><br></div></div>
_______________________________________________<br>
Cmdist mailing list<br>
<a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
<a href="http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
</blockquote>
<br>
</blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br><a href="http://www.myspace.com/alexandreficagna" target="_blank">www.myspace.com/alexandreficagna</a><br>
</font></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br><a href="http://www.myspace.com/alexandreficagna" target="_blank">www.myspace.com/alexandreficagna</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.myspace.com/alexandreficagna">www.myspace.com/alexandreficagna</a><br>