updated to use tasks

This commit is contained in:
nik gaffney 2009-04-16 18:28:51 +02:00
parent 2c26fef119
commit 64c2682524

View file

@ -2,6 +2,8 @@
;; in fluxus from pd. requires llink.pd to be running in pd and the
;; 'frame-functions' to be loaded.
(require mzlib/string)
(define t1 0)
(define c1 (vector 0 0 0))
(define v1 (vector 0 0 0))
@ -24,4 +26,22 @@
(draw-cube)
(pop))
(add-frame-fcn spin)
(define (osc-repl)
(cond ((osc-msg "/code")
(printf "eval..~% ~a~%" (pd-filter (osc 0)))
(eval-string (pd-filter (osc 0)) osc-repl-err))
((osc-msg "/ping")
(printf "ping... ~%"))))
(define (osc-repl-err err)
(printf "xcrrERR: ~a~%" err))
(define (pd-filter str)
(regexp-replace* "_" str " "))
(osc-source "88008")
(spawn-task osc-repl)
(spawn-task spin)