From f18049522518035a54d7bd4a3335c3bd02e7b43a Mon Sep 17 00:00:00 2001 From: Mustafa Date: Thu, 29 May 2014 09:07:17 -0700 Subject: [PATCH] made effects work for a single bus --- oregano/routing.rkt | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/oregano/routing.rkt b/oregano/routing.rkt index 322c804..eb436e3 100644 --- a/oregano/routing.rkt +++ b/oregano/routing.rkt @@ -1,5 +1,6 @@ #lang racket +(require rsc3) #| tracks: @@ -49,7 +50,6 @@ tracks: ;; out-bus: output bus channel (define (make-effect-ugen effect-ugen in-bus out-bus) ; TODO - empty) ;; example effect ugen @@ -57,15 +57,25 @@ tracks: (mouse-y kr 0 1 0 0.1) 0.5))) -;; internal function -#;(define (make-freeverb-with-in-out in-bus out-bus) - (out out-bus (free-verb (in 1 ar in-bus) 0.5 - (mouse-y kr 0 1 0 0.1) - 0.5))) - - - - +;; ======= Effects ========== + +(define (apply-effect bus effect) + (audition (replace-out bus effect))) + +(define (reverb bus) + (apply-effect bus + (free-verb (in 1 ar bus) + 0.5 + (mouse-y kr 0 1 0 0.1) + 0.5))) + +; example: apply reverb on bus 0 +; (reverb 0) + +(define (moog-filter bus freq [resonance 3] [opt 0]) + (apply-effect bus + (moog-ff (in 1 ar bus) freq resonance opt))) +; (add-effect track0 (reverb 0.3 6)