[CM] play-pats
First Last
whatalltheshoutingsabout@gmail.com
Sun, 24 Jun 2007 19:09:40 -0400
------=_Part_63616_27947670.1182726580847
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Would appreciate any help...
When attempting to run the following code from Notes from the Metalevel's
dictionary:
CM> (define (play-pats pats trope reps rate)
(process with dur = (* rate 2.5)
repeat reps
for len = (pick 8 12 16)
for pat = (make-instance (next pats)
:keynums trope
:for len)
each k in (next pat #t) as x from 0 by rate
output (new midi :time (+ (now) x)
:keynum k
:duration dur)
wait (* rate len)))
;;; a pattern of pattern class names
(define pcns
(new weighting :of '((heap :weight 2) line cycle
palindrome rotation)))
, I receive the following error:
LOOP ERROR: 'each' does not support initializations.
clause context: 'EACH K IN (NEXT PAT T)'
Anyone?
------=_Part_63616_27947670.1182726580847
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<div>Would appreciate any help...</div>
<div> </div>
<div>When attempting to run the following code from Notes from the Metalevel's dictionary:</div>
<div> </div>
<div>CM> (define (play-pats pats trope reps rate)<br> (process with dur = (* rate 2.5)<br> repeat reps<br> for len = (pick 8 12 16)<br> for pat = (make-instance (next pats)<br> :keynums trope
<br> :for len)<br> each k in (next pat #t) as x from 0 by rate<br> output (new midi :time (+ (now) x)<br> :keynum k<br> :duration dur)
<br> wait (* rate len)))<br> <br>;;; a pattern of pattern class names<br>(define pcns<br> (new weighting :of '((heap :weight 2) line cycle<br> palindrome rotation)))</div>
<div> </div>
<div>, I receive the following error:</div>
<div><br>LOOP ERROR: 'each' does not support initializations.<br>clause context: 'EACH K IN (NEXT PAT T)'</div>
<div> </div>
<div>Anyone?</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
------=_Part_63616_27947670.1182726580847--