[CM] Problem with loop/collect

Rick Taube taube@uiuc.edu
Tue, 1 May 2007 17:52:49 -0500


try:

(events (loop repeat 8
          APPEND (list (jazz-high-hat 120 .99)
                        (jazz-drums 120 .99)))
        "jazz.mid"
        '(0 2 4 6 8 10 12 14))

or if you prefer:

(events (loop repeat 8
          collect (jazz-high-hat 120 .99)
	 collect (jazz-drums 120 .99))
        "jazz.mid"
        '(0 2 4 6 8 10 12 14))

or even:

loop with procs = {}
   repeat 8
   set procs ^= list( jazz-high-hat(120, .99),
                      jazz-drums( 120, .99))
   finally
     sprout procs, {0 2 4 6 8 10 12 14}
end