just to beat a dead horse...  in pure data, metro sends a bang out at  
some time interval to do something, ie

        [metro 1000]
        |
        [+ 3 4]
        |
        [print ]

or whatever. In Lisp "doing something" is evaluation,
(+ 3 4)
and you can create functions that do arbitrary evaluation for you

(define  (mybang x)
   (format #t "bang at ~S!~%" x))

(mybang 100)


to  evaluate something at periodic intervals in Grace you put a  
function that does what you in cm's scheduler using 'sprout'.   
scheduled  functions are passed the current time and should return how  
long to wait until they are evaluated again (in seconds).

  so to print "bang" at 1 second intervals you could do

(define  (mybang x)
   (format #t "bang at ~S!~%" x)
   1)

(sprout  mybang)

;;  at some point you will want to stop it

(stop)





_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to