[CM] nested loop question .. an example
Jerry Kahn
jerry.kahn@db.com
Tue, 11 May 2004 16:48:02 -0400
here is one of my attempts that doesn't work (how exciting!):
(new cycle
:notes '(c2 d2 ef3)
:name 'some-notes)
(define (doit num )
(let ((when 0))
(loop repeat num
for i = (next #&some-notes #t)
collect(loop
for j in i
do (setf when (+ when .5))
collect (new midi
:time when
:duration .5
:keynum j)))))
(events (doit 60 ) "test.midi")
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.