in progress instrument.rkt
This commit is contained in:
parent
8c3b743ffe
commit
6de25cd357
1 changed files with 25 additions and 0 deletions
25
oregano/instrument.rkt
Normal file
25
oregano/instrument.rkt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#lang racket
|
||||||
|
|
||||||
|
|
||||||
|
(require rsc3 rhs/rhs)
|
||||||
|
|
||||||
|
(define sin-instrument
|
||||||
|
(letc ([bus 0]
|
||||||
|
[freq 440])
|
||||||
|
(out bus (mul 0.2 (sin-osc ar freq 0)))))
|
||||||
|
|
||||||
|
|
||||||
|
;; setup
|
||||||
|
(send-synth fd "sin-inst" sin-instrument)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(define (make-instrument ins)
|
||||||
|
(match ins
|
||||||
|
['sin (begin
|
||||||
|
(with-sc3 (lanbda (fd)
|
||||||
|
(send fd
|
||||||
|
(s-new "sin-inst" -1 1 1
|
||||||
|
|
||||||
|
]
|
||||||
|
[else (error "unknown instrument used")]))h
|
Loading…
Reference in a new issue