io:osc-receive

(io:osc-receive address . args)


Description:

Implement to start receiving OSC events


Arguments:

        address -- osc address string

           args -- a list of osc arguments


Returns: boolean


Related: io:osc-send io:osc-register-events 


Examples:

; setup simple au graph

(define buz (au:make-node "aumu" "dls " "appl"))

(au:connect-node buz 0 *au:output-node* 0)

(au:update-graph)

(program-change (now) buz 57)


; Register this process to receive OSC events

(io:osc-register-events)


; Receives "/buz/start" and "/buz/stop" messages

; Prints all other messages to the log

(define (io:osc-receive address . args)

   (cond ((string=? address "/buz/start")

  (start-note (now) buz (car args) (cadr args)))

((string=? address "/buz/stop")

  (stop-sound (now) buz (car args)))

(else (print address '-> args))))


; Some test messages to send

(define addy (cons "localhost" 7009))

(io:osc-send (now) addy "/buz/start" 60 80)

(io:osc-send (now) addy "/buz/stop" 60)

(io:osc-send (+ (now) (* *second* 4)) addy "/test/msg" "Hello" 500 6.6 "World")



Back to index