#!r6rs (library (rsc3 supercollider play) (export play audition) (import (rnrs) (rsc3 server command) (rsc3 server server) (rsc3 graphdef graphdef) (rsc3 supercollider synthdef)) ;; Play the graph rooted at the `u' at the server `s'. (define (play s u) (let ((g (if (graphdef? u) u (ugen->graphdef/out u)))) (->< s (/d_recv (encode-graphdef g))) (-> s (/s_new (graphdef-name g) -1 1 1)))) (define (audition u) (with-sc3 (lambda (fd) (play fd u)))) )