From 6de25cd3570db8991fb76d0b2e37b4cab0b87d59 Mon Sep 17 00:00:00 2001 From: Mustafa Date: Thu, 15 May 2014 14:30:33 -0700 Subject: [PATCH] in progress instrument.rkt --- oregano/instrument.rkt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 oregano/instrument.rkt diff --git a/oregano/instrument.rkt b/oregano/instrument.rkt new file mode 100644 index 0000000..2010b4b --- /dev/null +++ b/oregano/instrument.rkt @@ -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 \ No newline at end of file