From 7c08d85df30f4e55ac726b5d047c7c8e53154b5e Mon Sep 17 00:00:00 2001 From: Mustafa Date: Fri, 16 May 2014 13:03:30 -0700 Subject: [PATCH] added moog instrument --- oregano/instrument.rkt | 12 +++++++++++- rsc3/examples/moog-filter.rkt | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/oregano/instrument.rkt b/oregano/instrument.rkt index 65ce91a..31b2288 100644 --- a/oregano/instrument.rkt +++ b/oregano/instrument.rkt @@ -73,12 +73,22 @@ [freq 440]) (out bus (mul 0.2 (saw ar freq))))) - +(define moog-instrument + (letc ([bus 0] + [freq 440]) + (out bus (moog-ff + (mul (saw ar (mouse-x kr 200 1000 0 0.1)) 0.1) freq 3 0)))) + ;; setup ;; show osc messages on server (send-msg (dump-osc 1)) (with-sc3 reset) +(define perset-instrument-map + (hash "sin-inst" sin-instrument + "saw-inst" saw-instrument + "moog-inst" moog-instrument)) + ;; send synthdefs (with-sc3 (lambda (fd) (send-synth fd "sin-inst" sin-instrument) ; (wave-instrument sin-osc)) diff --git a/rsc3/examples/moog-filter.rkt b/rsc3/examples/moog-filter.rkt index 1d100e2..29c596b 100644 --- a/rsc3/examples/moog-filter.rkt +++ b/rsc3/examples/moog-filter.rkt @@ -41,6 +41,16 @@ (x (mouse-x kr 0 4 0 0.1))) (audition (out 0 (moog-ff n y x 0)))) +(let* ((y (mouse-y kr 200 30000 1 0.1)) + (s (mul (saw ar (mouse-x kr 200 1000 0 0.1)) 0.1)) + (x 3)) ;(mouse-x kr 0 4 0 0.1))) + (audition (out 0 (pan2 + (free-verb (moog-ff s y x 0) 0.5 + 0.9 + 0.5) + 0 1)))) + + ;; lorenz-l.help.scm #;(let* ((n (mul (white-noise ar) 0.1)) (y (mouse-y kr 40 80 1 0.1)) @@ -78,7 +88,7 @@ ;; like old telephone ring. uses key-state aaaa ; (let ([freq (mouse-x kr 600 2000 1 0.1)]) -(let ([freq (simple-mouse-x 600 1500)]) +#; (let ([freq (simple-mouse-x 600 1500)]) (audition (out 0 (mul (sin-osc ar (mul-add (lf-pulse ar 15 0 0.5) 200 freq)