added bus routing example usage
This commit is contained in:
parent
7e9f99dad2
commit
c49cf584f7
2 changed files with 43 additions and 6 deletions
|
@ -10,7 +10,7 @@
|
||||||
[sig (mul (sin-osc ar
|
[sig (mul (sin-osc ar
|
||||||
(mul-add (lf-pulse ar 15 0 0.5) 200 freq)
|
(mul-add (lf-pulse ar 15 0 0.5) 200 freq)
|
||||||
0)
|
0)
|
||||||
(key-state kr 38 0 0.1 0.1))])
|
(key-state kr 38 0 0.1 0.1))])
|
||||||
(audition (out 16 sig)))
|
(audition (out 16 sig)))
|
||||||
|
|
||||||
(audition (out 0 (free-verb (in 1 ar 16) 0.5
|
(audition (out 0 (free-verb (in 1 ar 16) 0.5
|
||||||
|
@ -19,4 +19,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,53 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
|
|
||||||
|
#|
|
||||||
|
tracks:
|
||||||
|
|
||||||
|
0 - output left speaker
|
||||||
|
1 - output right speaker
|
||||||
|
3 - first track
|
||||||
|
|
||||||
|
## example usage
|
||||||
|
|
||||||
|
; add reverb to track 3
|
||||||
|
(append-effect track3 (reverb-effect 0.5 0.9))
|
||||||
|
|
||||||
|
(append-effect track3 (reverb-effect 0.5 0.9))
|
||||||
|
|
||||||
|
; done internally:
|
||||||
|
; (process-track 3)
|
||||||
|
|
||||||
|
(define my-piano (make-instrument "piano"))
|
||||||
|
|
||||||
|
(note-on my-piano C#3 track3)
|
||||||
|
|
||||||
|
|#
|
||||||
|
|
||||||
|
(define effects-list '())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; adds an effect to the end of the effect chain of the given track
|
;; adds an effect to the end of the effect chain of the given track
|
||||||
;;
|
|
||||||
(define (append-effect track-num effect-ugen)
|
(define (append-effect track-num effect-ugen)
|
||||||
; TODO
|
; TODO
|
||||||
empty)
|
empty)
|
||||||
|
|
||||||
;; creates a ugen that is routed
|
;; creates a ugen that is routed
|
||||||
;; in: input bus channel
|
;; in-bus: input bus channel
|
||||||
;; out: output bus channel
|
;; out-bus: output bus channel
|
||||||
(define (make-effect-ugen effect-ugen in out)
|
(define (make-effect-ugen effect-ugen in-bus out-bus)
|
||||||
; TODO
|
; TODO
|
||||||
empty)
|
empty)
|
||||||
|
|
||||||
|
;; example effect ugen
|
||||||
|
#;(audition (out 0 (free-verb (in 1 ar 16) 0.5
|
||||||
|
(mouse-y kr 0 1 0 0.1)
|
||||||
|
0.5)))
|
||||||
|
|
||||||
|
(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)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue