added make-instrument
This commit is contained in:
parent
83e931612d
commit
e69605a3ee
1 changed files with 11 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue