hi,<br>ever since i learned that multiple processes can be run in parallel within a defined cm function, i.e.<br>(define bla...<br>&nbsp; (list<br>&nbsp;&nbsp;&nbsp; (process bla ..<br>&nbsp;&nbsp;&nbsp; (process bla ..<br>&nbsp;&nbsp; )<br>i&#39;ve been using such definitions happily and frequently.
<br><br>i just discovered something, however, which may be a downside to doing things this way (or maybe just a misunderstanding on my part): when i try to schedule such a defined list of processes within a list i.e.:(events (list (etc... , lisp throws an error (or at least sbcl does).
<br><br>;;examples (freely adapted from cm docs):<br>(defun test (len knum rhy)<br>&nbsp; (list<br>&nbsp;&nbsp; (process repeat len<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; output (new midi :time (now) :channel 0 <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; :keynum (between knum (+ knum 12))<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; :duration dur)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wait rhy)<br>&nbsp;&nbsp; (process repeat len<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; output (new midi :time (now) :channel 1<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; :keynum (between (- knum 12) knum)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; :duration dur)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; wait rhy)))
<br><br>(events (list (test 30 80 .1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (test 20 60 .1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (test 10 40 .1))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;/tmp/test.mid&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;(0 1 2))<br>;;error:<br>invalid number of arguments: 4<br>&nbsp;&nbsp; [Condition of type SB-INT:SIMPLE-PROGRAM-ERROR]
<br><br>Restarts:<br>&nbsp;0: [ABORT] Return to SLIME&#39;s top level.<br>&nbsp;1: [ABORT] Exit debugger, returning to top level.<br><br>Backtrace:<br>&nbsp; 0: ((LAMBDA (SB-PCL::.ARG0. SB-PCL::.ARG1. #1=&quot;#&lt;...&gt;&quot; . #1#))
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lt;CLOSURE (LAMBDA #) {CF22CFD}&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0)<br>&nbsp; 1: ((SB-PCL::FAST-METHOD SCHEDULE-OBJECT (CONS T T))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lt;unavailable argument&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lt;unavailable argument&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (#&lt;CLOSURE # {CF22CFD}&gt; #&lt;CLOSURE # {CF22D25}&gt;)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :EVENTS)<br><br>am i infact doing something wrong here, and if not, is it possible in some future cm version to make scheduling of these kind of processes possible?<br><br>thanks,<br>bill sack<br><br>