[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

real-time



The following code should produce lists of zeros pushed into
"test" and it does not.  Can anyone tell me why not?  Is there
a problem with "get-internal-real-time?"  This is causing a
nightmare in a real-time playback system, a problem which has
not, I think, existed (at least to this degree) in previous
versions of Mac COMMON LISPSs.

(setq test ())
(play 60 1000 (get-internal-real-time))

(defun play (MM counter start-time)
  (cond ((equal counter 0)())
        ((<= start-time (get-internal-real-time))
         (progn 
           (push (- start-time (get-internal-real-time)) test)
           ;(play-note 60)
           (play MM (1- counter)(+ start-time MM))))
        (t (play MM counter start-time))))

#|
(0 0 0 -13 0 0 0 0 0 0 -11 0 0 0 0 0 0 -7 0 0 0 0 0 0 0 -14 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
3 > 
NIL
3 > 
Aborted
3 > test
(0 0 0 -26 0 0 0 -13 0 0 0 0 0 0 -3 0 0 0 0 0 0 0)
|#

Thanks in advance for help!