[CM] CM - event scheduling feature request[?]
Bill Sack
bsack23@gmail.com
Tue, 24 Apr 2007 16:07:46 -0400
------=_Part_206406_13649120.1177445266529
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
hi,
ever since i learned that multiple processes can be run in parallel within a
defined cm function, i.e.
(define bla...
(list
(process bla ..
(process bla ..
)
i've been using such definitions happily and frequently.
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).
;;examples (freely adapted from cm docs):
(defun test (len knum rhy)
(list
(process repeat len
output (new midi :time (now) :channel 0
:keynum (between knum (+ knum 12))
:duration dur)
wait rhy)
(process repeat len
output (new midi :time (now) :channel 1
:keynum (between (- knum 12) knum)
:duration dur)
wait rhy)))
(events (list (test 30 80 .1)
(test 20 60 .1)
(test 10 40 .1))
"/tmp/test.mid"
'(0 1 2))
;;error:
invalid number of arguments: 4
[Condition of type SB-INT:SIMPLE-PROGRAM-ERROR]
Restarts:
0: [ABORT] Return to SLIME's top level.
1: [ABORT] Exit debugger, returning to top level.
Backtrace:
0: ((LAMBDA (SB-PCL::.ARG0. SB-PCL::.ARG1. #1="#<...>" . #1#))
#<CLOSURE (LAMBDA #) {CF22CFD}>
0
0)
1: ((SB-PCL::FAST-METHOD SCHEDULE-OBJECT (CONS T T))
#<unavailable argument>
#<unavailable argument>
(#<CLOSURE # {CF22CFD}> #<CLOSURE # {CF22D25}>)
0
:EVENTS)
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?
thanks,
bill sack
------=_Part_206406_13649120.1177445266529
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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> (list<br> (process bla ..<br> (process bla ..<br> )<br>i'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> (list<br> (process repeat len<br> output (new midi :time (now) :channel 0 <br> :keynum (between knum (+ knum 12))<br>
:duration dur)<br> wait rhy)<br> (process repeat len<br> output (new midi :time (now) :channel 1<br> :keynum (between (- knum 12) knum)<br> :duration dur)<br> wait rhy)))
<br><br>(events (list (test 30 80 .1)<br> (test 20 60 .1)<br> (test 10 40 .1))<br> "/tmp/test.mid"<br> '(0 1 2))<br>;;error:<br>invalid number of arguments: 4<br> [Condition of type SB-INT:SIMPLE-PROGRAM-ERROR]
<br><br>Restarts:<br> 0: [ABORT] Return to SLIME's top level.<br> 1: [ABORT] Exit debugger, returning to top level.<br><br>Backtrace:<br> 0: ((LAMBDA (SB-PCL::.ARG0. SB-PCL::.ARG1. #1="#<...>" . #1#))
<br> #<CLOSURE (LAMBDA #) {CF22CFD}><br> 0<br> 0)<br> 1: ((SB-PCL::FAST-METHOD SCHEDULE-OBJECT (CONS T T))<br> #<unavailable argument><br> #<unavailable argument><br> (#<CLOSURE # {CF22CFD}> #<CLOSURE # {CF22D25}>)
<br> 0<br> :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>
------=_Part_206406_13649120.1177445266529--