[CM] CM - event scheduling feature request[?]
Bill Sack
bsack23 at gmail.com
Tue Apr 24 13:07:46 PDT 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20070424/440fbe68/attachment.html>
More information about the Cmdist
mailing list