added make-instrument

This commit is contained in:
Mustafa 2014-05-21 08:33:02 -07:00
parent 83e931612d
commit e69605a3ee

View file

@ -15,6 +15,10 @@
(set! current-node-id (add1 current-node-id)) (set! current-node-id (add1 current-node-id))
current-node-id) current-node-id)
(define custom-synth-num 1)
(define (gen-synth-name)
(set! current-node-id (add1 current-node-id))
current-node-id)
(define (wave-instrument wave-func) (define (wave-instrument wave-func)
(letc ([bus 0] (letc ([bus 0]
@ -41,8 +45,13 @@
;; TODO ;; TODO
(define (make-instrument graph) (define (make-instrument graph)
(letc ([bus 0]) (let ([synthedef (letc ([bus 0])
(out bus graph))) (out bus graph))]
[name (format "synth~a" current-node-id)])
(with-sc3 (lambda (fd)
(send-synth fd name synthdef)))
))
;; setup ;; setup
;; show osc messages on server ;; show osc messages on server